History

Merge 5.18-rc5 into driver-core-next

We need the kernfs/driver core fixes in here as well.

Greg Kroah-Hartman committed 4 years ago

Commit 0e509f52 parents f8ae07f 672c0c51035 files · +8377 −5699Browse files

Unified · Split

1035 files
  1. Documentation/ABI/testing/sysfs-class-firmware-attributes +26 −22
  2. Documentation/ABI/testing/sysfs-driver-intel_sdsi +10 −8
  3. Documentation/ABI/testing/sysfs-fs-erofs +3 −2
  4. Documentation/arm64/memory-tagging-extension.rst +2 −2
  5. Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.yaml +0 −1
  6. Documentation/devicetree/bindings/bus/ti-sysc.yaml +0 −1
  7. Documentation/devicetree/bindings/clock/microchip,mpfs.yaml +11 −2
  8. Documentation/devicetree/bindings/clock/samsung,exynos-audss-clock.yaml +1 −1
  9. Documentation/devicetree/bindings/clock/samsung,exynos-clock.yaml +1 −1
  10. Documentation/devicetree/bindings/clock/samsung,exynos-ext-clock.yaml +1 −1
  11. Documentation/devicetree/bindings/clock/samsung,exynos4412-isp-clock.yaml +1 −1
  12. Documentation/devicetree/bindings/clock/samsung,exynos5260-clock.yaml +1 −1
  13. Documentation/devicetree/bindings/clock/samsung,exynos5410-clock.yaml +1 −1
  14. Documentation/devicetree/bindings/clock/samsung,exynos5433-clock.yaml +1 −1
  15. Documentation/devicetree/bindings/clock/samsung,exynos7-clock.yaml +1 −1
  16. Documentation/devicetree/bindings/clock/samsung,exynos7885-clock.yaml +1 −1
  17. Documentation/devicetree/bindings/clock/samsung,exynos850-clock.yaml +1 −1
  18. Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml +1 −1
  19. Documentation/devicetree/bindings/clock/samsung,s5pv210-audss-clock.yaml +1 −1
  20. Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.yaml +1 −1
  21. Documentation/devicetree/bindings/devfreq/event/samsung,exynos-nocp.yaml +1 −1
  22. Documentation/devicetree/bindings/devfreq/event/samsung,exynos-ppmu.yaml +1 −1
  23. Documentation/devicetree/bindings/display/msm/dpu-qcm2290.yaml +2 −2
  24. Documentation/devicetree/bindings/display/panel/panel-timing.yaml +18 −24
  25. Documentation/devicetree/bindings/display/samsung/samsung,exynos-hdmi-ddc.yaml +1 −1
  26. Documentation/devicetree/bindings/display/samsung/samsung,exynos-hdmi.yaml +1 −1
  27. Documentation/devicetree/bindings/display/samsung/samsung,exynos-mixer.yaml +1 −1
  28. Documentation/devicetree/bindings/display/samsung/samsung,exynos5433-decon.yaml +1 −1
  29. Documentation/devicetree/bindings/display/samsung/samsung,exynos5433-mic.yaml +1 −1
  30. Documentation/devicetree/bindings/display/samsung/samsung,exynos7-decon.yaml +1 −1
  31. Documentation/devicetree/bindings/display/samsung/samsung,fimd.yaml +1 −1
  32. Documentation/devicetree/bindings/dma/qcom,gpi.yaml +1 −0
  33. Documentation/devicetree/bindings/extcon/maxim,max77843.yaml +2 −2
  34. Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +4 −1
  35. Documentation/devicetree/bindings/hwmon/lltc,ltc4151.yaml +1 −1
  36. Documentation/devicetree/bindings/hwmon/microchip,mcp3021.yaml +1 −1
  37. Documentation/devicetree/bindings/hwmon/sensirion,sht15.yaml +1 −1
  38. Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml +1 −1
  39. Documentation/devicetree/bindings/hwmon/ti,tmp108.yaml +1 −1
  40. Documentation/devicetree/bindings/hwmon/ti,tmp464.yaml +2 −3
  41. Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml +1 −1
  42. Documentation/devicetree/bindings/i2c/samsung,s3c2410-i2c.yaml +1 −1
  43. Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml +1 −0
  44. Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml +5 −7
  45. Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml +3 −3
  46. Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml +42 −42
  47. Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.yaml +2 −4
  48. Documentation/devicetree/bindings/interrupt-controller/samsung,exynos4210-combiner.yaml +1 −1
  49. Documentation/devicetree/bindings/leds/maxim,max77693.yaml +1 −1
  50. Documentation/devicetree/bindings/media/coda.yaml +0 −1
  51. Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml +0 −2
  52. Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml +0 −3
  53. Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml +0 −1
  54. Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.yaml +1 −1
  55. Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2-timings.yaml +1 −1
  56. Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml +1 −1
  57. Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3-timings.yaml +1 −1
  58. Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml +1 −1
  59. Documentation/devicetree/bindings/memory-controllers/marvell,mvebu-sdram-controller.yaml +1 −1
  60. Documentation/devicetree/bindings/memory-controllers/qca,ath79-ddr-controller.yaml +1 −1
  61. Documentation/devicetree/bindings/memory-controllers/renesas,h8300-bsc.yaml +1 −1
  62. Documentation/devicetree/bindings/memory-controllers/samsung,exynos5422-dmc.yaml +1 −1
  63. Documentation/devicetree/bindings/memory-controllers/synopsys,ddrc-ecc.yaml +5 −3
  64. Documentation/devicetree/bindings/memory-controllers/ti,da8xx-ddrctl.yaml +1 −1
  65. Documentation/devicetree/bindings/mfd/atmel-flexcom.txt +1 −1
  66. Documentation/devicetree/bindings/mfd/maxim,max14577.yaml +1 −1
  67. Documentation/devicetree/bindings/mfd/maxim,max77686.yaml +1 −1
  68. Documentation/devicetree/bindings/mfd/maxim,max77693.yaml +1 −1
  69. Documentation/devicetree/bindings/mfd/maxim,max77802.yaml +1 −1
  70. Documentation/devicetree/bindings/mfd/maxim,max77843.yaml +1 −1
  71. Documentation/devicetree/bindings/mfd/samsung,exynos5433-lpass.yaml +1 −1
  72. Documentation/devicetree/bindings/mfd/samsung,s2mpa01.yaml +1 −1
  73. Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml +1 −1
  74. Documentation/devicetree/bindings/mfd/samsung,s5m8767.yaml +1 −1
  75. Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.yaml +2 −0
  76. Documentation/devicetree/bindings/net/dsa/realtek.yaml +14 −21
  77. Documentation/devicetree/bindings/net/nfc/marvell,nci.yaml +1 −1
  78. Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml +1 −1
  79. Documentation/devicetree/bindings/net/nfc/nxp,pn532.yaml +1 −1
  80. Documentation/devicetree/bindings/net/nfc/nxp,pn544.yaml +1 −1
  81. Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml +1 −1
  82. Documentation/devicetree/bindings/net/nfc/st,st21nfca.yaml +1 −1
  83. Documentation/devicetree/bindings/net/nfc/st,st95hf.yaml +1 −1
  84. Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml +1 −1
  85. Documentation/devicetree/bindings/net/snps,dwmac.yaml +2 −4
  86. Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml +39 −18
  87. Documentation/devicetree/bindings/net/ti,davinci-mdio.yaml +1 −0
  88. Documentation/devicetree/bindings/phy/nvidia,tegra20-usb-phy.yaml +10 −10
  89. Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml +17 −15
  90. Documentation/devicetree/bindings/phy/samsung,dp-video-phy.yaml +1 −1
  91. Documentation/devicetree/bindings/phy/samsung,exynos-hdmi-phy.yaml +1 −1
  92. Documentation/devicetree/bindings/phy/samsung,exynos5250-sata-phy.yaml +1 −1
  93. Documentation/devicetree/bindings/phy/samsung,mipi-video-phy.yaml +1 −1
  94. Documentation/devicetree/bindings/phy/samsung,usb2-phy.yaml +1 −1
  95. Documentation/devicetree/bindings/phy/samsung,usb3-drd-phy.yaml +1 −1
  96. Documentation/devicetree/bindings/pinctrl/cirrus,madera.yaml +5 −6
  97. Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-gpio-bank.yaml +1 −1
  98. Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-pins-cfg.yaml +1 −1
  99. Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml +1 −1
  100. Documentation/devicetree/bindings/pinctrl/samsung,pinctrl.yaml +1 −1
  101. Documentation/devicetree/bindings/power/renesas,apmu.yaml +2 −1
  102. Documentation/devicetree/bindings/power/supply/bq2415x.yaml +0 −1
  103. Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml +1 −1
  104. Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml +1 −1
  105. Documentation/devicetree/bindings/regulator/fixed-regulator.yaml +17 −17
  106. Documentation/devicetree/bindings/regulator/maxim,max14577.yaml +1 −1
  107. Documentation/devicetree/bindings/regulator/maxim,max77686.yaml +1 −1
  108. Documentation/devicetree/bindings/regulator/maxim,max77693.yaml +1 −1
  109. Documentation/devicetree/bindings/regulator/maxim,max77802.yaml +1 −1
  110. Documentation/devicetree/bindings/regulator/maxim,max77843.yaml +1 −1
  111. Documentation/devicetree/bindings/regulator/maxim,max8952.yaml +1 −1
  112. Documentation/devicetree/bindings/regulator/maxim,max8973.yaml +1 −1
  113. Documentation/devicetree/bindings/regulator/maxim,max8997.yaml +1 −1
  114. Documentation/devicetree/bindings/regulator/richtek,rt5190a-regulator.yaml +1 −1
  115. Documentation/devicetree/bindings/regulator/samsung,s2mpa01.yaml +1 −1
  116. Documentation/devicetree/bindings/regulator/samsung,s2mps11.yaml +1 −1
  117. Documentation/devicetree/bindings/regulator/samsung,s2mps13.yaml +1 −1
  118. Documentation/devicetree/bindings/regulator/samsung,s2mps14.yaml +1 −1
  119. Documentation/devicetree/bindings/regulator/samsung,s2mps15.yaml +1 −1
  120. Documentation/devicetree/bindings/regulator/samsung,s2mpu02.yaml +1 −1
  121. Documentation/devicetree/bindings/regulator/samsung,s5m8767.yaml +1 −1
  122. Documentation/devicetree/bindings/remoteproc/qcom,sc7280-wpss-pil.yaml +1 −3
  123. Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.yaml +5 −0
  124. Documentation/devicetree/bindings/reset/socionext,uniphier-reset.yaml +3 −0
  125. Documentation/devicetree/bindings/rng/samsung,exynos5250-trng.yaml +1 −1
  126. Documentation/devicetree/bindings/rng/timeriomem_rng.yaml +1 −1
  127. Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml +12 −3
  128. Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml +1 −1
  129. Documentation/devicetree/bindings/sound/samsung,arndale.yaml +1 −1
  130. Documentation/devicetree/bindings/sound/samsung,smdk5250.yaml +1 −1
  131. Documentation/devicetree/bindings/sound/samsung,snow.yaml +1 −1
  132. Documentation/devicetree/bindings/sound/samsung,tm2.yaml +1 −1
  133. Documentation/devicetree/bindings/sound/st,stm32-sai.yaml +2 −4
  134. Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml +0 −2
  135. Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.yaml +1 −1
  136. Documentation/devicetree/bindings/spi/samsung,spi.yaml +1 −1
  137. Documentation/devicetree/bindings/sram/sram.yaml +8 −8
  138. Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml +1 −1
  139. Documentation/devicetree/bindings/usb/samsung,exynos-dwc3.yaml +1 −1
  140. Documentation/devicetree/bindings/usb/samsung,exynos-usb2.yaml +2 −1
  141. Documentation/filesystems/caching/backend-api.rst +4 −4
  142. Documentation/filesystems/caching/netfs-api.rst +12 −13
  143. Documentation/filesystems/ext4/attributes.rst +1 −1
  144. Documentation/filesystems/f2fs.rst +0 −70
  145. Documentation/networking/bonding.rst +2 −2
  146. Documentation/networking/ip-sysctl.rst +7 −0
  147. Documentation/security/siphash.rst +28 −18
  148. Documentation/virt/kvm/api.rst +18 −7
  149. Documentation/virt/kvm/vcpu-requests.rst +2 −0
  150. Documentation/virt/kvm/x86/amd-memory-encryption.rst +2 −0
  151. Documentation/virt/kvm/x86/errata.rst +1 −1
  152. Documentation/virt/kvm/x86/running-nested-guests.rst +2 −0
  153. Documentation/vm/page_owner.rst +3 −2
  154. MAINTAINERS +76 −59
  155. Makefile +1 −1
  156. arch/Kconfig +2 −4
  157. arch/arc/boot/dts/hsdk.dts +1 −1
  158. arch/arc/include/asm/atomic-llsc.h +16 −16
  159. arch/arc/include/asm/pgtable-levels.h +0 −3
  160. arch/arc/kernel/disasm.c +1 −2
  161. arch/arc/kernel/entry.S +1 −0
  162. arch/arc/kernel/signal.c +1 −1
  163. arch/arc/kernel/smp.c +2 −2
  164. arch/arc/kernel/unaligned.c +1 −1
  165. arch/arc/mm/cache.c +1 −1
  166. arch/arm/boot/dts/am33xx-l4.dtsi +2 −0
  167. arch/arm/boot/dts/am3517-evm.dts +40 −5
  168. arch/arm/boot/dts/am3517-som.dtsi +9 −0
  169. arch/arm/boot/dts/at91-dvk_su60_somc.dtsi +1 −1
  170. arch/arm/boot/dts/at91-q5xr5.dts +1 −1
  171. arch/arm/boot/dts/at91-sam9_l9260.dts +1 −1
  172. arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi +1 −1
  173. arch/arm/boot/dts/at91-sama5d27_wlsom1_ek.dts +1 −1
  174. arch/arm/boot/dts/at91-sama5d2_xplained.dts +1 −1
  175. arch/arm/boot/dts/at91-sama5d3_xplained.dts +4 −4
  176. arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi +1 −1
  177. arch/arm/boot/dts/at91-sama5d4_xplained.dts +3 −3
  178. arch/arm/boot/dts/at91-sama5d4ek.dts +1 −1
  179. arch/arm/boot/dts/at91-sama7g5ek.dts +2 −2
  180. arch/arm/boot/dts/at91-vinco.dts +1 −1
  181. arch/arm/boot/dts/at91rm9200ek.dts +2 −2
  182. arch/arm/boot/dts/at91sam9260ek.dts +1 −1
  183. arch/arm/boot/dts/at91sam9261ek.dts +1 −1
  184. arch/arm/boot/dts/at91sam9263ek.dts +1 −1
  185. arch/arm/boot/dts/at91sam9g20ek_common.dtsi +44 −1
  186. arch/arm/boot/dts/at91sam9m10g45ek.dts +1 −1
  187. arch/arm/boot/dts/at91sam9n12ek.dts +1 −1
  188. arch/arm/boot/dts/at91sam9rlek.dts +1 −1
  189. arch/arm/boot/dts/at91sam9x5ek.dtsi +1 −1
  190. arch/arm/boot/dts/da850-evm.dts +1 −1
  191. arch/arm/boot/dts/dm8168-evm.dts +1 −1
  192. arch/arm/boot/dts/dra7-l4.dtsi +2 −2
  193. arch/arm/boot/dts/imx28-ts4600.dts +1 −1
  194. arch/arm/boot/dts/imx6qdl-apalis.dtsi +8 −2
  195. arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi +16 −16
  196. arch/arm/boot/dts/imx6ul-phytec-segin-peb-av-02.dtsi +2 −2
  197. arch/arm/boot/dts/imx6ull-colibri.dtsi +1 −1
  198. arch/arm/boot/dts/logicpd-som-lv-35xx-devkit.dts +15 −0
  199. arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts +15 −0
  200. arch/arm/boot/dts/logicpd-som-lv.dtsi +0 −15
  201. arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi +2 −2
  202. arch/arm/boot/dts/omap3-gta04.dtsi +2 −0
  203. arch/arm/boot/dts/qcom-apq8064-pins.dtsi +6 −6
  204. arch/arm/boot/dts/qcom-ipq8064.dtsi +4 −4
  205. arch/arm/boot/dts/sama5d3xmb.dtsi +1 −1
  206. arch/arm/boot/dts/sama5d3xmb_cmp.dtsi +1 −1
  207. arch/arm/boot/dts/sama7g5.dtsi +9 −9
  208. arch/arm/boot/dts/spear1310-evb.dts +1 −1
  209. arch/arm/boot/dts/spear1340-evb.dts +1 −1
  210. arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi +1 −1
  211. arch/arm/boot/dts/stm32mp157c-ev1.dts +2 −2
  212. arch/arm/boot/dts/usb_a9263.dts +1 −1
  213. arch/arm/configs/gemini_defconfig +4 −1
  214. arch/arm/configs/imote2_defconfig +0 −365
  215. arch/arm/configs/multi_v7_defconfig +1 −0
  216. arch/arm/configs/tegra_defconfig +2 −1
  217. arch/arm/configs/u8500_defconfig +15 −4
  218. arch/arm/mach-davinci/board-da850-evm.c +3 −1
  219. arch/arm/mach-ep93xx/clock.c +4 −2
  220. arch/arm/mach-exynos/Kconfig +0 −1
  221. arch/arm/mach-iop32x/cp6.c +2 −0
  222. arch/arm/mach-omap2/omap4-common.c +2 −0
  223. arch/arm/mach-vexpress/spc.c +14 −14
  224. arch/arm/xen/enlighten.c +7 −2
  225. arch/arm64/Kconfig +12 −3
  226. arch/arm64/boot/dts/amlogic/meson-g12b-a311d.dtsi +0 −40
  227. arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi +0 −40
  228. arch/arm64/boot/dts/amlogic/meson-s4.dtsi +4 −4
  229. arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts +1 −0
  230. arch/arm64/boot/dts/amlogic/meson-sm1.dtsi +0 −20
  231. arch/arm64/boot/dts/freescale/imx8mm-var-som.dtsi +4 −4
  232. arch/arm64/boot/dts/freescale/imx8mm-venice-gw71xx.dtsi +3 −1
  233. arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx.dtsi +3 −1
  234. arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx.dtsi +3 −1
  235. arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts +4 −0
  236. arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi +4 −4
  237. arch/arm64/boot/dts/freescale/imx8mn.dtsi +5 −5
  238. arch/arm64/boot/dts/freescale/imx8mq-tqma8mq.dtsi +1 −1
  239. arch/arm64/boot/dts/freescale/imx8qm.dtsi +1 −1
  240. arch/arm64/boot/dts/qcom/msm8996.dtsi +2 −2
  241. arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi +1 −1
  242. arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi +1 −1
  243. arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts +1 −1
  244. arch/arm64/include/asm/kvm_emulate.h +20 −8
  245. arch/arm64/include/asm/kvm_host.h +10 −0
  246. arch/arm64/include/asm/pgtable.h +2 −2
  247. arch/arm64/kernel/elfcore.c +1 −1
  248. arch/arm64/kvm/hyp/nvhe/host.S +9 −9
  249. arch/arm64/kvm/inject_fault.c +28 −0
  250. arch/arm64/kvm/mmu.c +26 −4
  251. arch/arm64/kvm/pmu-emul.c +22 −1
  252. arch/arm64/kvm/psci.c +16 −18
  253. arch/arm64/kvm/reset.c +45 −20
  254. arch/arm64/kvm/vgic/vgic-debug.c +5 −5
  255. arch/arm64/kvm/vgic/vgic-its.c +1 −1
  256. arch/powerpc/kernel/module.c +1 −1
  257. arch/powerpc/kernel/time.c +14 −15
  258. arch/powerpc/kvm/book3s_64_mmu_radix.c +5 −4
  259. arch/powerpc/kvm/book3s_64_vio.c +23 −22
  260. arch/powerpc/kvm/book3s_64_vio_hv.c +22 −22
  261. arch/powerpc/kvm/book3s_hv_nested.c +8 −8
  262. arch/powerpc/kvm/book3s_rtas.c +2 −2
  263. arch/powerpc/kvm/powerpc.c +2 −2
  264. arch/powerpc/perf/Makefile +2 −2
  265. arch/powerpc/perf/power10-pmu.c +1 −1
  266. arch/powerpc/perf/power9-pmu.c +4 −4
  267. arch/riscv/Kconfig.socs +1 −1
  268. arch/riscv/boot/dts/microchip/microchip-mpfs-fabric.dtsi +14 −2
  269. arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts +1 −1
  270. arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +5 −5
  271. arch/riscv/configs/defconfig +1 −0
  272. arch/riscv/configs/rv32_defconfig +1 −0
  273. arch/riscv/include/asm/kvm_host.h +0 −3
  274. arch/riscv/kernel/patch.c +1 −1
  275. arch/riscv/kvm/vcpu.c +20 −19
  276. arch/riscv/kvm/vcpu_exit.c +2 −2
  277. arch/riscv/kvm/vcpu_fp.c +1 −0
  278. arch/riscv/kvm/vcpu_sbi.c +3 −2
  279. arch/riscv/mm/init.c +1 −0
  280. arch/s390/Kconfig +19 −0
  281. arch/s390/Makefile +2 −0
  282. arch/s390/configs/debug_defconfig +6 −2
  283. arch/s390/configs/defconfig +4 −2
  284. arch/s390/configs/zfcpdump_defconfig +3 −3
  285. arch/s390/include/asm/entry-common.h +1 −1
  286. arch/s390/include/asm/processor.h +1 −7
  287. arch/s390/include/asm/stacktrace.h +1 −1
  288. arch/s390/kernel/machine_kexec.c +1 −1
  289. arch/s390/kernel/processor.c +4 −0
  290. arch/s390/kvm/interrupt.c +2 −2
  291. arch/s390/kvm/kvm-s390.c +4 −4
  292. arch/s390/kvm/pv.c +1 −6
  293. arch/s390/kvm/vsie.c +2 −2
  294. arch/s390/lib/test_unwind.c +1 −1
  295. arch/sparc/include/asm/cacheflush_32.h +1 −0
  296. arch/x86/Kconfig +1 −1
  297. arch/x86/entry/entry_64.S +3 −0
  298. arch/x86/events/intel/cstate.c +4 −3
  299. arch/x86/include/asm/compat.h +2 −4
  300. arch/x86/include/asm/intel-family.h +3 −0
  301. arch/x86/include/asm/io.h +0 −2
  302. arch/x86/include/asm/kvm-x86-ops.h +1 −0
  303. arch/x86/include/asm/kvm_host.h +6 −5
  304. arch/x86/include/asm/microcode.h +2 −0
  305. arch/x86/include/asm/msr-index.h +2 −2
  306. arch/x86/include/asm/pgtable_types.h +0 −4
  307. arch/x86/include/asm/static_call.h +1 −0
  308. arch/x86/kernel/cpu/common.c +2 −0
  309. arch/x86/kernel/cpu/cpu.h +2 −3
  310. arch/x86/kernel/cpu/intel.c +0 −7
  311. arch/x86/kernel/cpu/microcode/core.c +3 −3
  312. arch/x86/kernel/cpu/tsx.c +94 −10
  313. arch/x86/kernel/crash_dump_64.c +0 −1
  314. arch/x86/kernel/kvm.c +13 −0
  315. arch/x86/kernel/unwind_orc.c +4 −4
  316. arch/x86/kvm/cpuid.c +14 −5
  317. arch/x86/kvm/hyperv.c +8 −32
  318. arch/x86/kvm/hyperv.h +1 −1
  319. arch/x86/kvm/mmu.h +24 −0
  320. arch/x86/kvm/mmu/mmu.c +66 −11
  321. arch/x86/kvm/mmu/spte.h +0 −6
  322. arch/x86/kvm/mmu/tdp_mmu.c +9 −8
  323. arch/x86/kvm/pmu.h +9 −0
  324. arch/x86/kvm/svm/avic.c +2 −1
  325. arch/x86/kvm/svm/pmu.c +1 −0
  326. arch/x86/kvm/svm/sev.c +35 −35
  327. arch/x86/kvm/svm/svm.c +1 −0
  328. arch/x86/kvm/svm/svm.h +2 −0
  329. arch/x86/kvm/vmx/nested.c +5 −0
  330. arch/x86/kvm/vmx/pmu_intel.c +2 −6
  331. arch/x86/kvm/vmx/vmx.c +5 −0
  332. arch/x86/kvm/vmx/vmx.h +1 −0
  333. arch/x86/kvm/x86.c +65 −30
  334. arch/x86/lib/copy_user_64.S +52 −35
  335. arch/x86/lib/putuser.S +4 −0
  336. arch/x86/lib/retpoline.S +1 −1
  337. arch/x86/lib/usercopy_64.c +1 −1
  338. arch/x86/mm/pat/set_memory.c +0 −11
  339. arch/x86/pci/xen.c +5 −1
  340. arch/x86/platform/pvh/head.S +1 −0
  341. arch/x86/power/cpu.c +9 −1
  342. arch/x86/xen/xen-head.S +1 −0
  343. arch/xtensa/kernel/coprocessor.S +2 −2
  344. arch/xtensa/kernel/jump_label.c +1 −1
  345. arch/xtensa/platforms/iss/console.c +0 −8
  346. block/bfq-iosched.c +9 −3
  347. block/bio.c +1 −1
  348. block/blk-iocost.c +11 −1
  349. block/blk-mq.c +3 −9
  350. block/ioctl.c +1 −1
  351. drivers/acpi/processor_idle.c +2 −6
  352. drivers/android/binder.c +9 −1
  353. drivers/ata/pata_marvell.c +2 −0
  354. drivers/base/arch_topology.c +10 −1
  355. drivers/base/dd.c +1 −0
  356. drivers/base/topology.c +10 −0
  357. drivers/block/Kconfig +16 −0
  358. drivers/block/floppy.c +32 −11
  359. drivers/block/null_blk/main.c +1 −1
  360. drivers/bus/fsl-mc/fsl-mc-msi.c +5 −1
  361. drivers/bus/imx-weim.c +2 −3
  362. drivers/bus/mhi/host/pci_generic.c +2 −0
  363. drivers/bus/sunxi-rsb.c +2 −0
  364. drivers/bus/ti-sysc.c +15 −1
  365. drivers/char/random.c +26 −23
  366. drivers/clk/microchip/clk-mpfs.c +164 −31
  367. drivers/clk/qcom/clk-rcg2.c +1 −1
  368. drivers/clk/sunxi-ng/ccu-sun6i-rtc.c +2 −0
  369. drivers/clk/sunxi/clk-sun9i-mmc.c +2 −0
  370. drivers/cpufreq/qcom-cpufreq-hw.c +57 −13
  371. drivers/cpufreq/sun50i-cpufreq-nvmem.c +3 −1
  372. drivers/cpuidle/cpuidle-riscv-sbi.c +1 −0
  373. drivers/dma/at_xdmac.c +7 −5
  374. drivers/dma/dw-edma/dw-edma-v0-core.c +10 −6
  375. drivers/dma/idxd/device.c +4 −2
  376. drivers/dma/idxd/submit.c +3 −2
  377. drivers/dma/idxd/sysfs.c +6 −0
  378. drivers/dma/imx-sdma.c +16 −16
  379. drivers/dma/mediatek/mtk-uart-apdma.c +6 −3
  380. drivers/edac/synopsys_edac.c +11 −5
  381. drivers/firmware/arm_scmi/clock.c +3 −2
  382. drivers/firmware/arm_scmi/driver.c +2 −1
  383. drivers/firmware/arm_scmi/optee.c +4 −4
  384. drivers/firmware/cirrus/cs_dsp.c +1 −2
  385. drivers/gpio/gpio-sim.c +2 −2
  386. drivers/gpio/gpiolib-acpi.c +12 −10
  387. drivers/gpio/gpiolib.c +2 −2
  388. drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +15 −6
  389. drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +2 −0
  390. drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h +1 −0
  391. drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +82 −41
  392. drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +1 −1
  393. drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2 −0
  394. drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +10 −0
  395. drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +37 −46
  396. drivers/gpu/drm/amd/amdkfd/kfd_priv.h +1 −1
  397. drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +7 −3
  398. drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c +1 −1
  399. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c +2 −2
  400. drivers/gpu/drm/amd/display/dc/dc.h +1 −1
  401. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +9 −5
  402. drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +9 −5
  403. drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +1 −0
  404. drivers/gpu/drm/amd/pm/amdgpu_dpm.c +39 −0
  405. drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c +0 −10
  406. drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c +0 −35
  407. drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c +0 −10
  408. drivers/gpu/drm/drm_of.c +33 −51
  409. drivers/gpu/drm/i915/display/intel_dp.c +11 −6
  410. drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +26 −8
  411. drivers/gpu/drm/i915/display/intel_fbc.c +1 −1
  412. drivers/gpu/drm/i915/display/intel_psr.c +21 −17
  413. drivers/gpu/drm/i915/gem/i915_gem_mman.c +1 −1
  414. drivers/gpu/drm/i915/i915_reg.h +3 −3
  415. drivers/gpu/drm/msm/adreno/a6xx_gpu.c +1 −1
  416. drivers/gpu/drm/msm/adreno/adreno_device.c +64 −16
  417. drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c +17 −17
  418. drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c +3 −0
  419. drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c +2 −0
  420. drivers/gpu/drm/msm/dp/dp_display.c +6 −0
  421. drivers/gpu/drm/msm/dp/dp_panel.c +10 −10
  422. drivers/gpu/drm/msm/dp/dp_panel.h +1 −0
  423. drivers/gpu/drm/msm/dsi/dsi_manager.c +1 −1
  424. drivers/gpu/drm/msm/msm_gem.c +1 −0
  425. drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +10 −3
  426. drivers/gpu/drm/radeon/radeon_sync.c +1 −1
  427. drivers/gpu/drm/sun4i/sun4i_frontend.c +0 −3
  428. drivers/gpu/drm/vc4/Kconfig +3 −0
  429. drivers/gpu/drm/vc4/vc4_dsi.c +1 −1
  430. drivers/gpu/drm/vmwgfx/vmwgfx_bo.c +20 −23
  431. drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +2 −6
  432. drivers/gpu/drm/vmwgfx/vmwgfx_surface.c +6 −1
  433. drivers/i2c/busses/i2c-imx.c +33 −0
  434. drivers/i2c/busses/i2c-ismt.c +2 −2
  435. drivers/i2c/busses/i2c-pasemi-core.c +6 −0
  436. drivers/i2c/busses/i2c-qcom-geni.c +2 −4
  437. drivers/i2c/i2c-dev.c +11 −6
  438. drivers/idle/intel_idle.c +15 −12
  439. drivers/iio/adc/ad7280a.c +6 −6
  440. drivers/iio/chemical/scd4x.c +4 −1
  441. drivers/iio/dac/ad3552r.c +3 −3
  442. drivers/iio/dac/ad5446.c +1 −1
  443. drivers/iio/dac/ad5592r-base.c +1 −1
  444. drivers/iio/dac/ltc2688.c +1 −1
  445. drivers/iio/dac/ti-dac5571.c +18 −10
  446. drivers/iio/filter/Kconfig +1 −0
  447. drivers/iio/imu/bmi160/bmi160_core.c +14 −6
  448. drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +9 −6
  449. drivers/iio/magnetometer/ak8975.c +1 −0
  450. drivers/iio/proximity/sx9324.c +25 −7
  451. drivers/iio/proximity/sx_common.c +1 −0
  452. drivers/input/keyboard/cypress-sf.c +14 −0
  453. drivers/input/keyboard/omap4-keypad.c +1 −1
  454. drivers/interconnect/qcom/sc7180.c +0 −21
  455. drivers/interconnect/qcom/sdx55.c +0 −21
  456. drivers/md/bcache/journal.c +1 −1
  457. drivers/md/bcache/request.c +1 −1
  458. drivers/md/dm-integrity.c +5 −2
  459. drivers/md/dm-ps-historical-service-time.c +5 −6
  460. drivers/md/dm-zone.c +28 −21
  461. drivers/md/dm.c +7 −11
  462. drivers/media/platform/nxp/Kconfig +1 −0
  463. drivers/media/platform/rockchip/rga/rga.c +1 −1
  464. drivers/media/tuners/si2157.c +11 −11
  465. drivers/memory/atmel-ebi.c +17 −6
  466. drivers/memory/fsl_ifc.c +1 −2
  467. drivers/memory/renesas-rpc-if.c +55 −15
  468. drivers/misc/eeprom/at25.c +11 −8
  469. drivers/mtd/nand/raw/mtk_ecc.c +8 −4
  470. drivers/mtd/nand/raw/qcom_nandc.c +13 −11
  471. drivers/mtd/nand/raw/sh_flctl.c +8 −6
  472. drivers/net/bonding/bond_main.c +9 −4
  473. drivers/net/dsa/lantiq_gswip.c +0 −3
  474. drivers/net/dsa/mv88e6xxx/port_hidden.c +3 −2
  475. drivers/net/dsa/ocelot/felix.c +23 −0
  476. drivers/net/dsa/ocelot/felix_vsc9959.c +1 −1
  477. drivers/net/dsa/realtek/Kconfig +21 −9
  478. drivers/net/dsa/realtek/realtek-mdio.c +0 −1
  479. drivers/net/dsa/realtek/realtek-smi.c +0 −9
  480. drivers/net/ethernet/Kconfig +13 −13
  481. drivers/net/ethernet/aquantia/atlantic/aq_nic.c +4 −4
  482. drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c +4 −4
  483. drivers/net/ethernet/aquantia/atlantic/aq_vec.c +12 −12
  484. drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +5 −4
  485. drivers/net/ethernet/broadcom/genet/bcmgenet.c +9 −2
  486. drivers/net/ethernet/cadence/macb_main.c +8 −0
  487. drivers/net/ethernet/faraday/ftgmac100.c +5 −5
  488. drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c +6 −2
  489. drivers/net/ethernet/freescale/enetc/enetc_qos.c +0 −4
  490. drivers/net/ethernet/freescale/fec_main.c +1 −1
  491. drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c +5 −1
  492. drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_tqp_stats.c +2 −2
  493. drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c +42 −42
  494. drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +9 −0
  495. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c +20 −11
  496. drivers/net/ethernet/ibm/ibmvnic.c +35 −94
  497. drivers/net/ethernet/ibm/ibmvnic.h +0 −6
  498. drivers/net/ethernet/intel/e1000e/ich8lan.c +2 −2
  499. drivers/net/ethernet/intel/iavf/iavf_main.c +2 −5
  500. drivers/net/ethernet/intel/ice/ice_arfs.c +2 −7
  501. drivers/net/ethernet/intel/ice/ice_eswitch.c +2 −1
  502. drivers/net/ethernet/intel/ice/ice_eswitch.h +1 −1
  503. drivers/net/ethernet/intel/ice/ice_lib.c +4 −1
  504. drivers/net/ethernet/intel/ice/ice_main.c +11 −10
  505. drivers/net/ethernet/intel/ice/ice_nvm.c +1 −0
  506. drivers/net/ethernet/intel/ice/ice_sriov.c +1 −1
  507. drivers/net/ethernet/intel/ice/ice_virtchnl.c +9 −18
  508. drivers/net/ethernet/intel/ice/ice_xsk.c +6 −1
  509. drivers/net/ethernet/intel/igc/igc_i225.c +9 −2
  510. drivers/net/ethernet/intel/igc/igc_phy.c +2 −2
  511. drivers/net/ethernet/intel/igc/igc_ptp.c +14 −1
  512. drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c +2 −1
  513. drivers/net/ethernet/mellanox/mlxsw/i2c.c +1 −0
  514. drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c +1 −1
  515. drivers/net/ethernet/microchip/lan966x/lan966x_mac.c +4 −2
  516. drivers/net/ethernet/microchip/lan966x/lan966x_main.c +9 −0
  517. drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c +4 −4
  518. drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c +1 −2
  519. drivers/net/ethernet/mscc/ocelot.c +14 −2
  520. drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c +0 −8
  521. drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.h +4 −0
  522. drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c +5 −6
  523. drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c +2 −2
  524. drivers/net/hippi/rrunner.c +2 −0
  525. drivers/net/macvlan.c +6 −2
  526. drivers/net/mdio/fwnode_mdio.c +5 −0
  527. drivers/net/phy/marvell10g.c +1 −1
  528. drivers/net/phy/microchip_t1.c +2 −6
  529. drivers/net/tun.c +1 −1
  530. drivers/net/veth.c +1 −1
  531. drivers/net/virtio_net.c +19 −1
  532. drivers/net/vxlan/vxlan_core.c +2 −2
  533. drivers/net/wan/cosa.c +1 −1
  534. drivers/net/wireguard/device.c +2 −1
  535. drivers/net/wireless/ath/ath11k/mac.c +14 −8
  536. drivers/net/wireless/ath/ath9k/main.c +1 −1
  537. drivers/net/wireless/ath/ath9k/xmit.c +21 −12
  538. drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +1 −1
  539. drivers/net/wireless/mediatek/mt76/mt76x2/pci.c +1 −1
  540. drivers/nvme/host/core.c +20 −7
  541. drivers/nvme/host/nvme.h +5 −0
  542. drivers/nvme/host/pci.c +8 −1
  543. drivers/perf/arm_pmu.c +4 −6
  544. drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c +12 −8
  545. drivers/phy/motorola/phy-mapphone-mdm6600.c +2 −1
  546. drivers/phy/samsung/phy-exynos5250-sata.c +15 −6
  547. drivers/phy/ti/phy-am654-serdes.c +1 −1
  548. drivers/phy/ti/phy-omap-usb2.c +1 −1
  549. drivers/phy/ti/phy-ti-pipe3.c +1 −0
  550. drivers/phy/ti/phy-tusb1210.c +9 −3
  551. drivers/pinctrl/intel/pinctrl-alderlake.c +40 −20
  552. drivers/pinctrl/mediatek/Kconfig +1 −0
  553. drivers/pinctrl/pinctrl-pistachio.c +3 −3
  554. drivers/pinctrl/pinctrl-rockchip.c +42 −27
  555. drivers/pinctrl/qcom/pinctrl-sm6350.c +8 −8
  556. drivers/pinctrl/samsung/Kconfig +4 −7
  557. drivers/pinctrl/samsung/pinctrl-exynos-arm64.c +1 −1
  558. drivers/pinctrl/stm32/pinctrl-stm32.c +21 −2
  559. drivers/pinctrl/sunplus/sppctl_sp7021.c +8 −0
  560. drivers/platform/x86/acerhdf.c +3 −18
  561. drivers/platform/x86/amd-pmc.c +13 −1
  562. drivers/platform/x86/asus-wmi.c +10 −5
  563. drivers/platform/x86/barco-p50-gpio.c +0 −1
  564. drivers/platform/x86/dell/dell-laptop.c +13 −0
  565. drivers/platform/x86/gigabyte-wmi.c +1 −0
  566. drivers/platform/x86/intel/pmc/core.h +1 −1
  567. drivers/platform/x86/intel/sdsi.c +30 −14
  568. drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c +3 −0
  569. drivers/platform/x86/samsung-laptop.c +0 −2
  570. drivers/platform/x86/think-lmi.c +15 −29
  571. drivers/platform/x86/think-lmi.h +0 −1
  572. drivers/power/supply/power_supply_core.c +6 −0
  573. drivers/power/supply/samsung-sdi-battery.c +2 −0
  574. drivers/reset/reset-rzg2l-usbphy-ctrl.c +3 −1
  575. drivers/reset/tegra/reset-bpmp.c +8 −1
  576. drivers/scsi/bnx2i/bnx2i_hwi.c +1 −1
  577. drivers/scsi/bnx2i/bnx2i_iscsi.c +1 −1
  578. drivers/scsi/cxgbi/libcxgbi.c +3 −3
  579. drivers/scsi/libiscsi.c +16 −11
  580. drivers/scsi/libiscsi_tcp.c +1 −1
  581. drivers/scsi/pm8001/pm80xx_hwi.c +24 −9
  582. drivers/scsi/qedi/qedi_iscsi.c +34 −35
  583. drivers/scsi/scsi_debug.c +51 −146
  584. drivers/scsi/scsi_transport_iscsi.c +140 −99
  585. drivers/scsi/sr_ioctl.c +12 −3
  586. drivers/soc/imx/imx8m-blk-ctrl.c +1 −1
  587. drivers/spi/atmel-quadspi.c +3 −0
  588. drivers/spi/spi-cadence-quadspi.c +17 −2
  589. drivers/spi/spi-intel-pci.c +1 −0
  590. drivers/spi/spi-mtk-nor.c +11 −1
  591. drivers/target/target_core_pscsi.c +5 −5
  592. drivers/tee/optee/ffa_abi.c +1 −0
  593. drivers/thermal/Kconfig +4 −2
  594. drivers/thermal/gov_user_space.c +1 −2
  595. drivers/thermal/intel/int340x_thermal/int3400_thermal.c +2 −2
  596. drivers/thermal/thermal_sysfs.c +0 −3
  597. drivers/tty/n_gsm.c +276 −201
  598. drivers/tty/serial/8250/8250_pci.c +4 −4
  599. drivers/tty/serial/8250/8250_port.c +3 −3
  600. drivers/tty/serial/amba-pl011.c +7 −2
  601. drivers/tty/serial/imx.c +1 −1
  602. drivers/tty/serial/sc16is7xx.c +2 −4
  603. drivers/usb/cdns3/cdns3-gadget.c +5 −2
  604. drivers/usb/core/devio.c +9 −5
  605. drivers/usb/core/quirks.c +6 −0
  606. drivers/usb/dwc3/core.c +29 −5
  607. drivers/usb/dwc3/drd.c +5 −6
  608. drivers/usb/dwc3/dwc3-pci.c +8 −0
  609. drivers/usb/dwc3/gadget.c +30 −1
  610. drivers/usb/gadget/configfs.c +2 −0
  611. drivers/usb/gadget/function/uvc_queue.c +2 −0
  612. drivers/usb/host/ehci-hcd.c +23 −0
  613. drivers/usb/host/ehci-pci.c +4 −0
  614. drivers/usb/host/ehci.h +1 −0
  615. drivers/usb/host/xhci-hub.c +1 −1
  616. drivers/usb/host/xhci-pci.c +3 −1
  617. drivers/usb/host/xhci-ring.c +1 −0
  618. drivers/usb/host/xhci-tegra.c +2 −2
  619. drivers/usb/host/xhci.c +11 −0
  620. drivers/usb/misc/qcom_eud.c +5 −5
  621. drivers/usb/misc/uss720.c +1 −2
  622. drivers/usb/mtu3/mtu3_dr.c +2 −4
  623. drivers/usb/phy/phy-generic.c +7 −0
  624. drivers/usb/serial/cp210x.c +2 −0
  625. drivers/usb/serial/option.c +12 −0
  626. drivers/usb/serial/whiteheat.c +2 −3
  627. drivers/usb/typec/Kconfig +1 −0
  628. drivers/usb/typec/ucsi/ucsi.c +17 −7
  629. drivers/vfio/pci/vfio_pci_core.c +74 −50
  630. drivers/video/fbdev/arkfb.c +3 −0
  631. drivers/video/fbdev/aty/aty128fb.c +0 −1
  632. drivers/video/fbdev/aty/atyfb_base.c +0 −1
  633. drivers/video/fbdev/aty/radeon_pm.c +0 −1
  634. drivers/video/fbdev/aty/radeonfb.h +1 −1
  635. drivers/video/fbdev/clps711x-fb.c +1 −2
  636. drivers/video/fbdev/controlfb.c +0 −3
  637. drivers/video/fbdev/i740fb.c +4 −1
  638. drivers/video/fbdev/imxfb.c +2 −0
  639. drivers/video/fbdev/kyro/fbdev.c +2 −0
  640. drivers/video/fbdev/matrox/matroxfb_base.h +0 −1
  641. drivers/video/fbdev/mb862xx/mb862xxfbdrv.c +2 −0
  642. drivers/video/fbdev/mmp/core.c +5 −6
  643. drivers/video/fbdev/neofb.c +1 −1
  644. drivers/video/fbdev/omap/hwa742.c +3 −3
  645. drivers/video/fbdev/omap/lcdc.c +3 −3
  646. drivers/video/fbdev/omap/sossi.c +3 −2
  647. drivers/video/fbdev/platinumfb.c +1 −1
  648. drivers/video/fbdev/pm2fb.c +2 −6
  649. drivers/video/fbdev/pxafb.c +2 −2
  650. drivers/video/fbdev/s3fb.c +3 −0
  651. drivers/video/fbdev/sh_mobile_lcdcfb.c +0 −3
  652. drivers/video/fbdev/sis/sis_main.c +1 −1
  653. drivers/video/fbdev/tridentfb.c +3 −0
  654. drivers/video/fbdev/udlfb.c +12 −2
  655. drivers/video/fbdev/valkyriefb.c +1 −2
  656. drivers/video/fbdev/vt8623fb.c +3 −0
  657. drivers/video/of_display_timing.c +1 −1
  658. drivers/xen/balloon.c +23 −31
  659. drivers/xen/gntalloc.c +2 −2
  660. drivers/xen/unpopulated-alloc.c +0 −33
  661. fs/afs/write.c +1 −2
  662. fs/binfmt_elf.c +2 −2
  663. fs/btrfs/block-group.c +27 −13
  664. fs/btrfs/block-group.h +4 −0
  665. fs/btrfs/compression.c +8 −0
  666. fs/btrfs/ctree.h +1 −0
  667. fs/btrfs/dev-replace.c +6 −1
  668. fs/btrfs/disk-io.c +4 −2
  669. fs/btrfs/extent-tree.c +1 −1
  670. fs/btrfs/extent_io.c +29 −15
  671. fs/btrfs/inode.c +12 −15
  672. fs/btrfs/ioctl.c +0 −2
  673. fs/btrfs/scrub.c +25 −1
  674. fs/btrfs/tree-log.c +1 −0
  675. fs/btrfs/volumes.c +2 −0
  676. fs/btrfs/volumes.h +3 −0
  677. fs/btrfs/zoned.h +2 −2
  678. fs/cachefiles/namei.c +24 −9
  679. fs/cachefiles/xattr.c +1 −1
  680. fs/ceph/caps.c +7 −0
  681. fs/ceph/mds_client.c +0 −6
  682. fs/cifs/cifsfs.c +16 −14
  683. fs/cifs/connect.c +11 −2
  684. fs/cifs/dfs_cache.c +12 −7
  685. fs/cifs/link.c +3 −0
  686. fs/cifs/smb2ops.c +14 −3
  687. fs/cifs/trace.h +7 −0
  688. fs/cifs/transport.c +3 −4
  689. fs/erofs/zdata.c +4 −8
  690. fs/erofs/zdata.h +1 −1
  691. fs/ext4/ext4.h +6 −1
  692. fs/ext4/extents.c +25 −7
  693. fs/ext4/inode.c +16 −2
  694. fs/ext4/ioctl.c +16 −0
  695. fs/ext4/namei.c +2 −2
  696. fs/ext4/page-io.c +3 −1
  697. fs/ext4/super.c +29 −11
  698. fs/f2fs/checkpoint.c +3 −3
  699. fs/f2fs/data.c +21 −12
  700. fs/f2fs/f2fs.h +0 −9
  701. fs/f2fs/inode.c +2 −1
  702. fs/f2fs/segment.c +0 −95
  703. fs/f2fs/super.c +1 −31
  704. fs/fscache/Kconfig +0 −3
  705. fs/fscache/cache.c +1 −1
  706. fs/fscache/cookie.c +3 −1
  707. fs/fscache/internal.h +4 −0
  708. fs/fscache/io.c +2 −3
  709. fs/gfs2/file.c +1 −5
  710. fs/hugetlbfs/inode.c +5 −4
  711. fs/io-wq.h +0 −1
  712. fs/io_uring.c +70 −44
  713. fs/jbd2/commit.c +3 −1
  714. fs/kernfs/dir.c +6 −1
  715. fs/ksmbd/misc.c +31 −9
  716. fs/ksmbd/misc.h +2 −1
  717. fs/ksmbd/oplock.c +0 −30
  718. fs/ksmbd/oplock.h +0 −2
  719. fs/ksmbd/smb2pdu.c +16 −18
  720. fs/ksmbd/vfs.c +2 −4
  721. fs/ksmbd/vfs_cache.c +1 −1
  722. fs/ksmbd/vfs_cache.h +0 −1
  723. fs/namei.c +10 −12
  724. fs/namespace.c +13 −1
  725. fs/nfsd/filecache.c +15 −10
  726. fs/nfsd/nfs2acl.c +12 −12
  727. fs/pipe.c +5 −4
  728. fs/posix_acl.c +10 −0
  729. fs/stat.c +10 −9
  730. fs/xattr.c +4 −2
  731. fs/xfs/xfs_buf.c +3 −3
  732. fs/xfs/xfs_buf.h +21 −21
  733. fs/xfs/xfs_inode.c +13 −11
  734. fs/xfs/xfs_trans.h +1 −1
  735. fs/zonefs/super.c +41 −5
  736. include/asm-generic/bug.h +6 −5
  737. include/asm-generic/unaligned.h +1 −1
  738. include/dt-bindings/clock/microchip,mpfs-clock.h +4 −1
  739. include/linux/cpu.h +1 −1
  740. include/linux/dma-buf-map.h +0 −266
  741. include/linux/fscache.h +1 −3
  742. include/linux/gpio/consumer.h +7 −1
  743. include/linux/hugetlb.h +6 −0
  744. include/linux/kernel.h +1 −10
  745. include/linux/kfence.h +24 −0
  746. include/linux/kvm_host.h +25 −1
  747. include/linux/memcontrol.h +5 −0
  748. include/linux/mm.h +8 −0
  749. include/linux/mtd/mtd.h +2 −4
  750. include/linux/netdevice.h +9 −12
  751. include/linux/posix_acl_xattr.h +4 −0
  752. include/linux/sched.h +1 −0
  753. include/linux/sched/mm.h +8 −0
  754. include/linux/sunrpc/svc.h +1 −0
  755. include/linux/t10-pi.h +9 −0
  756. include/linux/timex.h +1 −1
  757. include/linux/usb/pd_bdo.h +1 −1
  758. include/linux/vfio_pci_core.h +2 −0
  759. include/linux/vmalloc.h +2 −2
  760. include/memory/renesas-rpc-if.h +1 −0
  761. include/net/bluetooth/hci.h +1 −0
  762. include/net/bluetooth/hci_core.h +1 −1
  763. include/net/esp.h +0 −2
  764. include/net/flow_dissector.h +2 −0
  765. include/net/ip6_tunnel.h +1 −1
  766. include/net/ip_tunnels.h +10 −3
  767. include/net/netns/ipv6.h +2 −2
  768. include/net/tcp.h +8 −0
  769. include/net/xsk_buff_pool.h +1 −0
  770. include/scsi/libiscsi.h +5 −4
  771. include/scsi/scsi_transport_iscsi.h +3 −1
  772. include/sound/core.h +1 −0
  773. include/sound/memalloc.h +5 −0
  774. include/sound/soc-component.h +4 −0
  775. include/trace/events/sunrpc.h +4 −3
  776. include/uapi/linux/elf.h +1 −1
  777. include/uapi/linux/fb.h +1 −1
  778. include/uapi/linux/input-event-codes.h +21 −0
  779. include/uapi/linux/io_uring.h +1 −0
  780. include/uapi/linux/kvm.h +9 −1
  781. include/uapi/linux/stddef.h +4 −0
  782. kernel/cpu.c +18 −18
  783. kernel/dma/direct.h +2 −1
  784. kernel/events/core.c +1 −1
  785. kernel/events/internal.h +5 −0
  786. kernel/events/ring_buffer.c +0 −5
  787. kernel/irq/affinity.c +3 −2
  788. kernel/irq_work.c +1 −1
  789. kernel/kcov.c +5 −2
  790. kernel/kprobes.c +1 −1
  791. kernel/sched/fair.c +5 −5
  792. kernel/smp.c +1 −1
  793. kernel/time/tick-sched.c +3 −3
  794. kernel/time/timer.c +7 −4
  795. lib/hexdump.c +31 −10
  796. lib/strncpy_from_user.c +1 −1
  797. lib/strnlen_user.c +1 −1
  798. lib/xarray.c +2 −0
  799. mm/compaction.c +5 −5
  800. mm/filemap.c +0 −6
  801. mm/hugetlb.c +20 −7
  802. mm/kasan/hw_tags.c +3 −2
  803. mm/kasan/kasan.h +6 −4
  804. mm/kasan/quarantine.c +7 −0
  805. mm/kfence/core.c +0 −21
  806. mm/kfence/kfence.h +21 −0
  807. mm/kfence/report.c +47 −0
  808. mm/kmemleak.c +4 −4
  809. mm/memcontrol.c +11 −1
  810. mm/memory-failure.c +116 −42
  811. mm/mmap.c +0 −8
  812. mm/mmu_notifier.c +13 −1
  813. mm/nommu.c +2 −0
  814. mm/oom_kill.c +40 −14
  815. mm/page_alloc.c +2 −2
  816. mm/page_io.c +0 −54
  817. mm/secretmem.c +17 −0
  818. mm/shmem.c +20 −11
  819. mm/slab.c +1 −1
  820. mm/slab.h +1 −1
  821. mm/slab_common.c +9 −0
  822. mm/slob.c +1 −1
  823. mm/slub.c +1 −1
  824. mm/userfaultfd.c +9 −6
  825. mm/util.c +9 −2
  826. mm/vmalloc.c +31 −33
  827. mm/workingset.c +1 −1
  828. net/bluetooth/hci_conn.c +24 −8
  829. net/bluetooth/hci_event.c +47 −33
  830. net/bluetooth/hci_sync.c +10 −1
  831. net/bpf/test_run.c +3 −2
  832. net/bridge/br_switchdev.c +2 −0
  833. net/can/isotp.c +9 −1
  834. net/ceph/osd_client.c +5 −1
  835. net/core/dev.c +5 −9
  836. net/core/flow_dissector.c +2 −1
  837. net/core/lwt_bpf.c +3 −4
  838. net/core/rtnetlink.c +3 −0
  839. net/dsa/dsa2.c +10 −13
  840. net/dsa/port.c +2 −0
  841. net/dsa/slave.c +1 −1
  842. net/dsa/tag_hellcreek.c +8 −0
  843. net/ipv4/esp4.c +2 −3
  844. net/ipv4/ip_gre.c +7 −9
  845. net/ipv4/ip_tunnel.c +5 −4
  846. net/ipv4/netfilter/nf_flow_table_ipv4.c +0 −0
  847. net/ipv4/syncookies.c +7 −1
  848. net/ipv4/tcp_input.c +13 −2
  849. net/ipv4/tcp_minisocks.c +1 −1
  850. net/ipv4/tcp_output.c +1 −0
  851. net/ipv4/tcp_rate.c +8 −3
  852. net/ipv6/esp6.c +2 −3
  853. net/ipv6/ip6_gre.c +16 −12
  854. net/ipv6/ip6_output.c +1 −1
  855. net/ipv6/netfilter.c +8 −2
  856. net/ipv6/route.c +6 −5
  857. net/ipv6/syncookies.c +2 −1
  858. net/l3mdev/l3mdev.c +1 −1
  859. net/mac80211/debugfs_sta.c +1 −1
  860. net/mctp/device.c +1 −1
  861. net/netfilter/ipvs/ip_vs_conn.c +1 −1
  862. net/netfilter/nf_conntrack_proto_tcp.c +6 −15
  863. net/netfilter/nf_conntrack_standalone.c +1 −1
  864. net/netfilter/nf_tables_api.c +1 −1
  865. net/netfilter/nft_set_rbtree.c +5 −1
  866. net/netfilter/nft_socket.c +41 −18
  867. net/netlink/af_netlink.c +7 −0
  868. net/nfc/nci/core.c +4 −0
  869. net/openvswitch/flow_netlink.c +1 −1
  870. net/packet/af_packet.c +9 −4
  871. net/rxrpc/net_ns.c +2 −0
  872. net/sched/cls_api.c +1 −1
  873. net/sched/cls_flower.c +13 −5
  874. net/sched/cls_u32.c +14 −10
  875. net/sched/sch_taprio.c +2 −1
  876. net/sctp/sm_sideeffect.c +4 −0
  877. net/sctp/sm_statefuns.c +3 −3
  878. net/sctp/socket.c +1 −1
  879. net/smc/af_smc.c +110 −45
  880. net/smc/smc.h +29 −0
  881. net/smc/smc_clc.c +4 −2
  882. net/smc/smc_close.c +4 −1
  883. net/smc/smc_pnet.c +3 −2
  884. net/sunrpc/svc_xprt.c +3 −0
  885. net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +1 −1
  886. net/tls/tls_device.c +7 −5
  887. net/wireless/nl80211.c +2 −1
  888. net/wireless/scan.c +2 −0
  889. net/xdp/xsk.c +14 −1
  890. net/xdp/xsk_buff_pool.c +12 −4
  891. net/xfrm/xfrm_policy.c +3 −1
  892. scripts/Makefile.build +1 −1
  893. scripts/gcc-plugins/latent_entropy_plugin.c +27 −17
  894. scripts/link-vmlinux.sh +1 −1
  895. sound/core/init.c +28 −0
  896. sound/core/memalloc.c +110 −1
  897. sound/core/pcm_misc.c +1 −1
  898. sound/drivers/mtpav.c +2 −2
  899. sound/hda/hdac_i915.c +18 −10
  900. sound/hda/intel-dsp-config.c +25 −2
  901. sound/isa/galaxy/galaxy.c +6 −1
  902. sound/isa/sc6000.c +6 −1
  903. sound/oss/dmasound/dmasound.h +0 −6
  904. sound/oss/dmasound/dmasound_core.c +2 −24
  905. sound/pci/ad1889.c +8 −2
  906. sound/pci/ali5451/ali5451.c +8 −2
  907. sound/pci/als300.c +6 −2
  908. sound/pci/als4000.c +8 −2
  909. sound/pci/atiixp.c +8 −2
  910. sound/pci/atiixp_modem.c +8 −2
  911. sound/pci/au88x0/au88x0.c +7 −1
  912. sound/pci/aw2/aw2-alsa.c +6 −2
  913. sound/pci/azt3328.c +7 −1
  914. sound/pci/bt87x.c +8 −2
  915. sound/pci/ca0106/ca0106_main.c +8 −2
  916. sound/pci/cmipci.c +6 −2
  917. sound/pci/cs4281.c +8 −2
  918. sound/pci/cs5535audio/cs5535audio.c +8 −2
  919. sound/pci/echoaudio/echoaudio.c +7 −2
  920. sound/pci/emu10k1/emu10k1x.c +8 −2
  921. sound/pci/ens1370.c +8 −2
  922. sound/pci/es1938.c +8 −2
  923. sound/pci/es1968.c +8 −2
  924. sound/pci/fm801.c +8 −2
  925. sound/pci/hda/patch_hdmi.c +5 −2
  926. sound/pci/hda/patch_realtek.c +12 −2
  927. sound/pci/ice1712/ice1724.c +8 −2
  928. sound/pci/intel8x0.c +8 −2
  929. sound/pci/intel8x0m.c +8 −2
  930. sound/pci/korg1212/korg1212.c +6 −2
  931. sound/pci/lola/lola.c +8 −2
  932. sound/pci/lx6464es/lx6464es.c +6 −2
  933. sound/pci/maestro3.c +7 −1
  934. sound/pci/nm256/nm256.c +1 −1
  935. sound/pci/oxygen/oxygen_lib.c +11 −1
  936. sound/pci/riptide/riptide.c +7 −1
  937. sound/pci/rme32.c +7 −1
  938. sound/pci/rme96.c +8 −2
  939. sound/pci/rme9652/hdsp.c +6 −2
  940. sound/pci/rme9652/hdspm.c +6 −2
  941. sound/pci/rme9652/rme9652.c +6 −2
  942. sound/pci/sis7019.c +10 −4
  943. sound/pci/sonicvibes.c +8 −2
  944. sound/pci/via82xx.c +8 −2
  945. sound/pci/via82xx_modem.c +8 −2
  946. sound/soc/atmel/sam9g20_wm8731.c +0 −61
  947. sound/soc/codecs/cs35l41-lib.c +6 −4
  948. sound/soc/codecs/lpass-rx-macro.c +10 −4
  949. sound/soc/codecs/lpass-tx-macro.c +10 −4
  950. sound/soc/codecs/lpass-va-macro.c +6 −2
  951. sound/soc/codecs/msm8916-wcd-digital.c +8 −1
  952. sound/soc/codecs/rk817_codec.c +1 −1
  953. sound/soc/codecs/rt5682.c +13 −7
  954. sound/soc/codecs/rt5682s.c +4 −7
  955. sound/soc/codecs/rt711.c +7 −0
  956. sound/soc/codecs/wcd934x.c +1 −25
  957. sound/soc/codecs/wm8731.c +11 −8
  958. sound/soc/fsl/fsl_sai.c +1 −1
  959. sound/soc/generic/simple-card-utils.c +4 −2
  960. sound/soc/intel/boards/sof_es8336.c +89 −28
  961. sound/soc/intel/boards/sof_rt5682.c +13 −0
  962. sound/soc/intel/common/soc-acpi-intel-tgl-match.c +2 −2
  963. sound/soc/meson/aiu-acodec-ctrl.c +3 −0
  964. sound/soc/meson/aiu-codec-ctrl.c +3 −0
  965. sound/soc/meson/aiu.c +3 −0
  966. sound/soc/soc-core.c +5 −0
  967. sound/soc/soc-dapm.c +2 −4
  968. sound/soc/soc-pcm.c +1 −1
  969. sound/soc/soc-topology.c +2 −2
  970. sound/soc/sof/sof-pci-dev.c +8 −1
  971. sound/soc/sof/topology.c +49 −1
  972. sound/usb/midi.c +1 −0
  973. sound/usb/mixer_maps.c +4 −0
  974. sound/usb/pcm.c +14 −2
  975. sound/usb/usbaudio.h +1 −1
  976. sound/x86/intel_hdmi_audio.c +6 −1
  977. tools/arch/x86/include/asm/msr-index.h +2 −2
  978. tools/include/linux/slab.h +7 −1
  979. tools/lib/perf/evlist.c +1 −2
  980. tools/objtool/check.c +49 −45
  981. tools/objtool/elf.c +166 −23
  982. tools/objtool/include/objtool/elf.h +2 −2
  983. tools/objtool/include/objtool/objtool.h +1 −1
  984. tools/objtool/objtool.c +0 −1
  985. tools/perf/arch/arm64/util/arm-spe.c +10 −0
  986. tools/perf/arch/arm64/util/machine.c +0 −21
  987. tools/perf/arch/powerpc/util/Build +0 −1
  988. tools/perf/arch/powerpc/util/machine.c +0 −25
  989. tools/perf/arch/s390/util/machine.c +0 −16
  990. tools/perf/bench/numa.c +101 −35
  991. tools/perf/builtin-record.c +17 −5
  992. tools/perf/builtin-report.c +14 −0
  993. tools/perf/builtin-script.c +1 −1
  994. tools/perf/tests/attr/README +1 −0
  995. tools/perf/tests/attr/test-record-spe-physical-address +12 −0
  996. tools/perf/tests/perf-time-to-tsc.c +4 −0
  997. tools/perf/util/arm-spe.c +3 −2
  998. tools/perf/util/c++/clang.cpp +4 −0
  999. tools/perf/util/header.c +51 −0
  1000. tools/perf/util/header.h +1 −0
  1001. tools/perf/util/parse-events.c +3 −2
  1002. tools/perf/util/session.c +1 −1
  1003. tools/perf/util/stat.c +2 −1
  1004. tools/perf/util/symbol-elf.c +1 −1
  1005. tools/perf/util/symbol.c +27 −10
  1006. tools/perf/util/symbol.h +1 −2
  1007. tools/power/x86/intel-speed-select/Makefile +1 −1
  1008. tools/testing/radix-tree/linux.c +2 −1
  1009. tools/testing/selftests/drivers/net/mlxsw/spectrum-2/vxlan_flooding_ipv6.sh +17 −0
  1010. tools/testing/selftests/drivers/net/mlxsw/vxlan_flooding.sh +17 −0
  1011. tools/testing/selftests/kvm/.gitignore +2 −0
  1012. tools/testing/selftests/kvm/Makefile +1 −0
  1013. tools/testing/selftests/kvm/aarch64/arch_timer.c +11 −4
  1014. tools/testing/selftests/kvm/aarch64/get-reg-list.c +10 −4
  1015. tools/testing/selftests/kvm/aarch64/vcpu_width_config.c +122 −0
  1016. tools/testing/selftests/kvm/dirty_log_perf_test.c +31 −3
  1017. tools/testing/selftests/kvm/include/riscv/processor.h +3 −1
  1018. tools/testing/selftests/kvm/include/x86_64/processor.h +17 −0
  1019. tools/testing/selftests/kvm/kvm_page_table_test.c +1 −1
  1020. tools/testing/selftests/kvm/lib/riscv/processor.c +1 −1
  1021. tools/testing/selftests/kvm/lib/x86_64/processor.c +82 −120
  1022. tools/testing/selftests/kvm/x86_64/amx_test.c +0 −1
  1023. tools/testing/selftests/kvm/x86_64/emulator_error_test.c +0 −1
  1024. tools/testing/selftests/kvm/x86_64/smm_test.c +0 −2
  1025. tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c +0 −1
  1026. tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c +0 −1
  1027. tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c +0 −1
  1028. tools/testing/selftests/mqueue/mq_perf_tests.c +17 −8
  1029. tools/testing/selftests/vm/mremap_test.c +80 −5
  1030. tools/testing/selftests/vm/run_vmtests.sh +8 −3
  1031. tools/testing/selftests/wireguard/qemu/arch/i686.config +1 −0
  1032. tools/testing/selftests/wireguard/qemu/arch/x86_64.config +1 −0
  1033. virt/kvm/dirty_ring.c +1 −1
  1034. virt/kvm/kvm_main.c +36 −8
  1035. virt/kvm/kvm_mm.h +1 −1
Documentation/ABI/testing/sysfs-class-firmware-attributes+26−22
@@ -116,7 +116,7 @@ Description: · 115 unmodified lines
116116 <value>[ForceIf:<attribute>=<value>]
117117 <value>[ForceIfNot:<attribute>=<value>]
118118
119− For example:
119+ For example::
120120
121121 LegacyOrom/dell_value_modifier has value:
122122 Disabled[ForceIf:SecureBoot=Enabled]
@@ -212,7 +212,7 @@ Description: · 89 unmodified lines
212212 the next boot.
213213
214214 Lenovo specific class extensions
215− ------------------------------
215+ --------------------------------
216216
217217 On Lenovo systems the following additional settings are available:
218218
@@ -246,9 +246,7 @@ Description: · 27 unmodified lines
246246 that is being referenced (e.g hdd0, hdd1 etc)
247247 This attribute defaults to device 0.
248248
249− certificate:
250− signature:
251− save_signature:
249+ certificate, signature, save_signature:
252250 These attributes are used for certificate based authentication. This is
253251 used in conjunction with a signing server as an alternative to password
254252 based authentication.
@@ -257,22 +255,27 @@ Description: · 2 unmodified lines
257255 The attributes can be displayed to check the stored value.
258256
259257 Some usage examples:
260− Installing a certificate to enable feature:
261− echo <supervisor password > authentication/Admin/current_password
262− echo <signed certificate> > authentication/Admin/certificate
263258
264− Updating the installed certificate:
265− echo <signature> > authentication/Admin/signature
266− echo <signed certificate> > authentication/Admin/certificate
259+ Installing a certificate to enable feature::
260+
261+ echo "supervisor password" > authentication/Admin/current_password
262+ echo "signed certificate" > authentication/Admin/certificate
263+
264+ Updating the installed certificate::
265+
266+ echo "signature" > authentication/Admin/signature
267+ echo "signed certificate" > authentication/Admin/certificate
267268
268− Removing the installed certificate:
269− echo <signature> > authentication/Admin/signature
270− echo '' > authentication/Admin/certificate
269+ Removing the installed certificate::
271270
272− Changing a BIOS setting:
273− echo <signature> > authentication/Admin/signature
274− echo <save signature> > authentication/Admin/save_signature
275− echo Enable > attribute/PasswordBeep/current_value
271+ echo "signature" > authentication/Admin/signature
272+ echo "" > authentication/Admin/certificate
273+
274+ Changing a BIOS setting::
275+
276+ echo "signature" > authentication/Admin/signature
277+ echo "save signature" > authentication/Admin/save_signature
278+ echo Enable > attribute/PasswordBeep/current_value
276279
277280 You cannot enable certificate authentication if a supervisor password
278281 has not been set.
@@ -288,9 +291,10 @@ Description: · 9 unmodified lines
288291 certificate_to_password:
289292 Write only attribute used to switch from certificate based authentication
290293 back to password based.
291− Usage:
292− echo <signature> > authentication/Admin/signature
293− echo <password> > authentication/Admin/certificate_to_password
294+ Usage::
295+
296+ echo "signature" > authentication/Admin/signature
297+ echo "password" > authentication/Admin/certificate_to_password
294298
295299
296300 What: /sys/class/firmware-attributes/*/attributes/pending_reboot
@@ -345,7 +349,7 @@ Description: · 48 unmodified lines
345349
346350 # echo "factory" > /sys/class/firmware-attributes/*/device/attributes/reset_bios
347351 # cat /sys/class/firmware-attributes/*/device/attributes/reset_bios
348− # builtinsafe lastknowngood [factory] custom
352+ builtinsafe lastknowngood [factory] custom
349353
350354 Note that any changes to this attribute requires a reboot
351355 for changes to take effect.
Documentation/ABI/testing/sysfs-driver-intel_sdsi+10−8
@@ -13,17 +13,19 @@ Description: · 12 unmodified lines
1313 Should the operation fail, one of the following error codes
1414 may be returned:
1515
16+ ========== =====
1617 Error Code Cause
17− ---------- -----
18− EIO General mailbox failure. Log may indicate cause.
19− EBUSY Mailbox is owned by another agent.
20− EPERM SDSI capability is not enabled in hardware.
21− EPROTO Failure in mailbox protocol detected by driver.
18+ ========== =====
19+ EIO General mailbox failure. Log may indicate cause.
20+ EBUSY Mailbox is owned by another agent.
21+ EPERM SDSI capability is not enabled in hardware.
22+ EPROTO Failure in mailbox protocol detected by driver.
2223 See log for details.
23− EOVERFLOW For provision commands, the size of the data
24+ EOVERFLOW For provision commands, the size of the data
2425 exceeds what may be written.
25− ESPIPE Seeking is not allowed.
26− ETIMEDOUT Failure to complete mailbox transaction in time.
26+ ESPIPE Seeking is not allowed.
27+ ETIMEDOUT Failure to complete mailbox transaction in time.
28+ ========== =====
2729
2830 What: /sys/bus/auxiliary/devices/intel_vsec.sdsi.X/guid
2931 Date: Feb 2022
Documentation/ABI/testing/sysfs-fs-erofs+3−2
@@ -9,8 +9,9 @@ Description: Shows all enabled kernel features. · 8 unmodified lines
99 What: /sys/fs/erofs/<disk>/sync_decompress
1010 Date: November 2021
1111 Contact: "Huang Jianan" <huangjianan@oppo.com>
12−Description: Control strategy of sync decompression
12+Description: Control strategy of sync decompression:
13+
1314 - 0 (default, auto): enable for readpage, and enable for
14− readahead on atomic contexts only,
15+ readahead on atomic contexts only.
1516 - 1 (force on): enable for readpage and readahead.
1617 - 2 (force off): disable for all situations.
Documentation/arm64/memory-tagging-extension.rst+2−2
@@ -228,10 +228,10 @@ Core dump support · 227 unmodified lines
228228 -----------------
229229
230230 The allocation tags for user memory mapped with ``PROT_MTE`` are dumped
231−in the core file as additional ``PT_ARM_MEMTAG_MTE`` segments. The
231+in the core file as additional ``PT_AARCH64_MEMTAG_MTE`` segments. The
232232 program header for such segment is defined as:
233233
234−:``p_type``: ``PT_ARM_MEMTAG_MTE``
234+:``p_type``: ``PT_AARCH64_MEMTAG_MTE``
235235 :``p_flags``: 0
236236 :``p_offset``: segment file offset
237237 :``p_vaddr``: segment virtual address, same as the corresponding
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.yaml+0−1
@@ -13,7 +13,6 @@ maintainers: · 12 unmodified lines
1313 properties:
1414 compatible:
1515 enum:
16− - nvidia,tegra20-pmc
1716 - nvidia,tegra20-pmc
1817 - nvidia,tegra30-pmc
1918 - nvidia,tegra114-pmc
Documentation/devicetree/bindings/bus/ti-sysc.yaml+0−1
@@ -34,7 +34,6 @@ properties: · 33 unmodified lines
3434 oneOf:
3535 - items:
3636 - enum:
37− - ti,sysc-omap2
3837 - ti,sysc-omap2
3938 - ti,sysc-omap4
4039 - ti,sysc-omap4-simple
Documentation/devicetree/bindings/clock/microchip,mpfs.yaml+11−2
@@ -22,7 +22,16 @@ properties: · 21 unmodified lines
2222 const: microchip,mpfs-clkcfg
2323
2424 reg:
25− maxItems: 1
25+ items:
26+ - description: |
27+ clock config registers:
28+ These registers contain enable, reset & divider tables for the, cpu,
29+ axi, ahb and rtc/mtimer reference clocks as well as enable and reset
30+ for the peripheral clocks.
31+ - description: |
32+ mss pll dri registers:
33+ Block of registers responsible for dynamic reconfiguration of the mss
34+ pll
2635
2736 clocks:
2837 maxItems: 1
@@ -51,7 +60,7 @@ examples: · 22 unmodified lines
5160 #size-cells = <2>;
5261 clkcfg: clock-controller@20002000 {
5362 compatible = "microchip,mpfs-clkcfg";
54− reg = <0x0 0x20002000 0x0 0x1000>;
63+ reg = <0x0 0x20002000 0x0 0x1000>, <0x0 0x3E001000 0x0 0x1000>;
5564 clocks = <&ref>;
5665 #clock-cells = <1>;
5766 };
Documentation/devicetree/bindings/clock/samsung,exynos-audss-clock.yaml+1−1
@@ -8,7 +8,7 @@ title: Samsung Exynos SoC Audio SubSystem clock controller · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1313 - Tomasz Figa <tomasz.figa@gmail.com>
1414
Documentation/devicetree/bindings/clock/samsung,exynos-clock.yaml+1−1
@@ -8,7 +8,7 @@ title: Samsung Exynos SoC clock controller · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1313 - Tomasz Figa <tomasz.figa@gmail.com>
1414
Documentation/devicetree/bindings/clock/samsung,exynos-ext-clock.yaml+1−1
@@ -8,7 +8,7 @@ title: Samsung SoC external/osc/XXTI/XusbXTI clock · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1313 - Tomasz Figa <tomasz.figa@gmail.com>
1414
Documentation/devicetree/bindings/clock/samsung,exynos4412-isp-clock.yaml+1−1
@@ -8,7 +8,7 @@ title: Samsung Exynos4412 SoC ISP clock controller · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1313 - Tomasz Figa <tomasz.figa@gmail.com>
1414
Documentation/devicetree/bindings/clock/samsung,exynos5260-clock.yaml+1−1
@@ -8,7 +8,7 @@ title: Samsung Exynos5260 SoC clock controller · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1313 - Tomasz Figa <tomasz.figa@gmail.com>
1414
Documentation/devicetree/bindings/clock/samsung,exynos5410-clock.yaml+1−1
@@ -8,7 +8,7 @@ title: Samsung Exynos5410 SoC clock controller · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1313 - Tomasz Figa <tomasz.figa@gmail.com>
1414
Documentation/devicetree/bindings/clock/samsung,exynos5433-clock.yaml+1−1
@@ -8,7 +8,7 @@ title: Samsung Exynos5433 SoC clock controller · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1313 - Tomasz Figa <tomasz.figa@gmail.com>
1414
Documentation/devicetree/bindings/clock/samsung,exynos7-clock.yaml+1−1
@@ -8,7 +8,7 @@ title: Samsung Exynos7 SoC clock controller · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1313 - Tomasz Figa <tomasz.figa@gmail.com>
1414
Documentation/devicetree/bindings/clock/samsung,exynos7885-clock.yaml+1−1
@@ -9,7 +9,7 @@ title: Samsung Exynos7885 SoC clock controller · 8 unmodified lines
99 maintainers:
1010 - Dávid Virág <virag.david003@gmail.com>
1111 - Chanwoo Choi <cw00.choi@samsung.com>
12− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
12+ - Krzysztof Kozlowski <krzk@kernel.org>
1313 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1414 - Tomasz Figa <tomasz.figa@gmail.com>
1515
Documentation/devicetree/bindings/clock/samsung,exynos850-clock.yaml+1−1
@@ -9,7 +9,7 @@ title: Samsung Exynos850 SoC clock controller · 8 unmodified lines
99 maintainers:
1010 - Sam Protsenko <semen.protsenko@linaro.org>
1111 - Chanwoo Choi <cw00.choi@samsung.com>
12− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
12+ - Krzysztof Kozlowski <krzk@kernel.org>
1313 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1414 - Tomasz Figa <tomasz.figa@gmail.com>
1515
Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S2M and S5M family clock generator block
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for S2M and S5M family of Power
Documentation/devicetree/bindings/clock/samsung,s5pv210-audss-clock.yaml+1−1
@@ -8,7 +8,7 @@ title: Samsung S5Pv210 SoC Audio SubSystem clock controller · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1313 - Tomasz Figa <tomasz.figa@gmail.com>
1414
Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.yaml+1−1
@@ -8,7 +8,7 @@ title: Samsung S5P6442/S5PC110/S5PV210 SoC clock controller · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1313 - Tomasz Figa <tomasz.figa@gmail.com>
1414
Documentation/devicetree/bindings/devfreq/event/samsung,exynos-nocp.yaml+1−1
@@ -8,7 +8,7 @@ title: Samsung Exynos NoC (Network on Chip) Probe · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212
1313 description: |
1414 The Samsung Exynos542x SoC has a NoC (Network on Chip) Probe for NoC bus.
Documentation/devicetree/bindings/devfreq/event/samsung,exynos-ppmu.yaml+1−1
@@ -8,7 +8,7 @@ title: Samsung Exynos SoC PPMU (Platform Performance Monitoring Unit) · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212
1313 description: |
1414 The Samsung Exynos SoC has PPMU (Platform Performance Monitoring Unit) for
Documentation/devicetree/bindings/display/msm/dpu-qcm2290.yaml+2−2
@@ -160,7 +160,7 @@ examples: · 159 unmodified lines
160160 mdss: mdss@5e00000 {
161161 #address-cells = <1>;
162162 #size-cells = <1>;
163− compatible = "qcom,qcm2290-mdss", "qcom,mdss";
163+ compatible = "qcom,qcm2290-mdss";
164164 reg = <0x05e00000 0x1000>;
165165 reg-names = "mdss";
166166 power-domains = <&dispcc MDSS_GDSC>;
@@ -180,7 +180,7 @@ examples: · 13 unmodified lines
180180 <&apps_smmu 0x421 0x0>;
181181 ranges;
182182
183− mdss_mdp: mdp@5e01000 {
183+ mdss_mdp: display-controller@5e01000 {
184184 compatible = "qcom,qcm2290-dpu";
185185 reg = <0x05e01000 0x8f000>,
186186 <0x05eb0000 0x2008>;
Documentation/devicetree/bindings/display/panel/panel-timing.yaml+18−24
@@ -71,78 +71,72 @@ properties: · 70 unmodified lines
7171
7272 hfront-porch:
7373 description: Horizontal front porch panel timing
74+ $ref: /schemas/types.yaml#/definitions/uint32-array
7475 oneOf:
75− - $ref: /schemas/types.yaml#/definitions/uint32
76− maxItems: 1
76+ - maxItems: 1
7777 items:
7878 description: typical number of pixels
79− - $ref: /schemas/types.yaml#/definitions/uint32-array
80− minItems: 3
79+ - minItems: 3
8180 maxItems: 3
8281 items:
8382 description: min, typ, max number of pixels
8483
8584 hback-porch:
8685 description: Horizontal back porch timing
86+ $ref: /schemas/types.yaml#/definitions/uint32-array
8787 oneOf:
88− - $ref: /schemas/types.yaml#/definitions/uint32
89− maxItems: 1
88+ - maxItems: 1
9089 items:
9190 description: typical number of pixels
92− - $ref: /schemas/types.yaml#/definitions/uint32-array
93− minItems: 3
91+ - minItems: 3
9492 maxItems: 3
9593 items:
9694 description: min, typ, max number of pixels
9795
9896 hsync-len:
9997 description: Horizontal sync length panel timing
98+ $ref: /schemas/types.yaml#/definitions/uint32-array
10099 oneOf:
101− - $ref: /schemas/types.yaml#/definitions/uint32
102− maxItems: 1
100+ - maxItems: 1
103101 items:
104102 description: typical number of pixels
105− - $ref: /schemas/types.yaml#/definitions/uint32-array
106− minItems: 3
103+ - minItems: 3
107104 maxItems: 3
108105 items:
109106 description: min, typ, max number of pixels
110107
111108 vfront-porch:
112109 description: Vertical front porch panel timing
110+ $ref: /schemas/types.yaml#/definitions/uint32-array
113111 oneOf:
114− - $ref: /schemas/types.yaml#/definitions/uint32
115− maxItems: 1
112+ - maxItems: 1
116113 items:
117114 description: typical number of lines
118− - $ref: /schemas/types.yaml#/definitions/uint32-array
119− minItems: 3
115+ - minItems: 3
120116 maxItems: 3
121117 items:
122118 description: min, typ, max number of lines
123119
124120 vback-porch:
125121 description: Vertical back porch panel timing
122+ $ref: /schemas/types.yaml#/definitions/uint32-array
126123 oneOf:
127− - $ref: /schemas/types.yaml#/definitions/uint32
128− maxItems: 1
124+ - maxItems: 1
129125 items:
130126 description: typical number of lines
131− - $ref: /schemas/types.yaml#/definitions/uint32-array
132− minItems: 3
127+ - minItems: 3
133128 maxItems: 3
134129 items:
135130 description: min, typ, max number of lines
136131
137132 vsync-len:
138133 description: Vertical sync length panel timing
134+ $ref: /schemas/types.yaml#/definitions/uint32-array
139135 oneOf:
140− - $ref: /schemas/types.yaml#/definitions/uint32
141− maxItems: 1
136+ - maxItems: 1
142137 items:
143138 description: typical number of lines
144− - $ref: /schemas/types.yaml#/definitions/uint32-array
145− minItems: 3
139+ - minItems: 3
146140 maxItems: 3
147141 items:
148142 description: min, typ, max number of lines
Documentation/devicetree/bindings/display/samsung/samsung,exynos-hdmi-ddc.yaml+1−1
@@ -11,7 +11,7 @@ maintainers: · 10 unmodified lines
1111 - Joonyoung Shim <jy0922.shim@samsung.com>
1212 - Seung-Woo Kim <sw0312.kim@samsung.com>
1313 - Kyungmin Park <kyungmin.park@samsung.com>
14− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
14+ - Krzysztof Kozlowski <krzk@kernel.org>
1515
1616 properties:
1717 compatible:
Documentation/devicetree/bindings/display/samsung/samsung,exynos-hdmi.yaml+1−1
@@ -11,7 +11,7 @@ maintainers: · 10 unmodified lines
1111 - Joonyoung Shim <jy0922.shim@samsung.com>
1212 - Seung-Woo Kim <sw0312.kim@samsung.com>
1313 - Kyungmin Park <kyungmin.park@samsung.com>
14− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
14+ - Krzysztof Kozlowski <krzk@kernel.org>
1515
1616 properties:
1717 compatible:
Documentation/devicetree/bindings/display/samsung/samsung,exynos-mixer.yaml+1−1
@@ -11,7 +11,7 @@ maintainers: · 10 unmodified lines
1111 - Joonyoung Shim <jy0922.shim@samsung.com>
1212 - Seung-Woo Kim <sw0312.kim@samsung.com>
1313 - Kyungmin Park <kyungmin.park@samsung.com>
14− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
14+ - Krzysztof Kozlowski <krzk@kernel.org>
1515
1616 description:
1717 Samsung Exynos SoC Mixer is responsible for mixing and blending multiple data
Documentation/devicetree/bindings/display/samsung/samsung,exynos5433-decon.yaml+1−1
@@ -11,7 +11,7 @@ maintainers: · 10 unmodified lines
1111 - Joonyoung Shim <jy0922.shim@samsung.com>
1212 - Seung-Woo Kim <sw0312.kim@samsung.com>
1313 - Kyungmin Park <kyungmin.park@samsung.com>
14− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
14+ - Krzysztof Kozlowski <krzk@kernel.org>
1515
1616 description: |
1717 DECON (Display and Enhancement Controller) is the Display Controller for the
Documentation/devicetree/bindings/display/samsung/samsung,exynos5433-mic.yaml+1−1
@@ -11,7 +11,7 @@ maintainers: · 10 unmodified lines
1111 - Joonyoung Shim <jy0922.shim@samsung.com>
1212 - Seung-Woo Kim <sw0312.kim@samsung.com>
1313 - Kyungmin Park <kyungmin.park@samsung.com>
14− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
14+ - Krzysztof Kozlowski <krzk@kernel.org>
1515
1616 description: |
1717 MIC (Mobile Image Compressor) resides between DECON and MIPI DSI. MIPI DSI is
Documentation/devicetree/bindings/display/samsung/samsung,exynos7-decon.yaml+1−1
@@ -11,7 +11,7 @@ maintainers: · 10 unmodified lines
1111 - Joonyoung Shim <jy0922.shim@samsung.com>
1212 - Seung-Woo Kim <sw0312.kim@samsung.com>
1313 - Kyungmin Park <kyungmin.park@samsung.com>
14− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
14+ - Krzysztof Kozlowski <krzk@kernel.org>
1515
1616 description: |
1717 DECON (Display and Enhancement Controller) is the Display Controller for the
Documentation/devicetree/bindings/display/samsung/samsung,fimd.yaml+1−1
@@ -11,7 +11,7 @@ maintainers: · 10 unmodified lines
1111 - Joonyoung Shim <jy0922.shim@samsung.com>
1212 - Seung-Woo Kim <sw0312.kim@samsung.com>
1313 - Kyungmin Park <kyungmin.park@samsung.com>
14− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
14+ - Krzysztof Kozlowski <krzk@kernel.org>
1515
1616 properties:
1717 compatible:
Documentation/devicetree/bindings/dma/qcom,gpi.yaml+1−0
@@ -29,6 +29,7 @@ properties: · 28 unmodified lines
2929 interrupts:
3030 description:
3131 Interrupt lines for each GPI instance
32+ minItems: 1
3233 maxItems: 13
3334
3435 "#dma-cells":
Documentation/devicetree/bindings/extcon/maxim,max77843.yaml+2−2
@@ -8,7 +8,7 @@ title: Maxim MAX77843 MicroUSB and Companion Power Management IC Extcon · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212
1313 description: |
1414 This is a part of device tree bindings for Maxim MAX77843 MicroUSB
@@ -25,7 +25,7 @@ properties: · 10 unmodified lines
2525 $ref: /schemas/connector/usb-connector.yaml#
2626
2727 ports:
28− $ref: /schemas/graph.yaml#/properties/port
28+ $ref: /schemas/graph.yaml#/properties/ports
2929 description:
3030 Any connector to the data bus of this controller should be modelled using
3131 the OF graph bindings specified
Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml+4−1
@@ -20,6 +20,7 @@ properties: · 19 unmodified lines
2020 - mediatek,mt8183-mali
2121 - realtek,rtd1619-mali
2222 - renesas,r9a07g044-mali
23+ - renesas,r9a07g054-mali
2324 - rockchip,px30-mali
2425 - rockchip,rk3568-mali
2526 - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable
@@ -109,7 +110,9 @@ allOf: · 83 unmodified lines
109110 properties:
110111 compatible:
111112 contains:
112− const: renesas,r9a07g044-mali
113+ enum:
114+ - renesas,r9a07g044-mali
115+ - renesas,r9a07g054-mali
113116 then:
114117 properties:
115118 interrupts:
Documentation/devicetree/bindings/hwmon/lltc,ltc4151.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: LTC4151 High Voltage I2C Current and Voltage Monitor
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/hwmon/microchip,mcp3021.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Microchip MCP3021 A/D converter
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/hwmon/sensirion,sht15.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Sensirion SHT15 humidity and temperature sensor
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: TMP102 temperature sensor
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/hwmon/ti,tmp108.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: TMP108 temperature sensor
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/hwmon/ti,tmp464.yaml+2−3
@@ -58,9 +58,8 @@ patternProperties: · 57 unmodified lines
5858 The value (two's complement) to be programmed in the channel specific N correction register.
5959 For remote channels only.
6060 $ref: /schemas/types.yaml#/definitions/int32
61− items:
62− minimum: -128
63− maximum: 127
61+ minimum: -128
62+ maximum: 127
6463
6564 required:
6665 - reg
Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung's High Speed I2C controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 The Samsung's High Speed I2C controller is used to interface with I2C devices
Documentation/devicetree/bindings/i2c/samsung,s3c2410-i2c.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S3C/S5P/Exynos SoC I2C Controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml+1−0
@@ -98,6 +98,7 @@ allOf: · 97 unmodified lines
9898 - ti,adc121s
9999 - ti,ads7866
100100 - ti,ads7868
101+ then:
101102 required:
102103 - vcc-supply
103104 # Devices with a vref
Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml+5−7
@@ -108,9 +108,7 @@ patternProperties: · 107 unmodified lines
108108 - [1-5]: order 1 to 5.
109109 For audio purpose it is recommended to use order 3 to 5.
110110 $ref: /schemas/types.yaml#/definitions/uint32
111− items:
112− minimum: 0
113− maximum: 5
111+ maximum: 5
114112
115113 "#io-channel-cells":
116114 const: 1
@@ -174,7 +172,7 @@ patternProperties: · 57 unmodified lines
174172 contains:
175173 const: st,stm32-dfsdm-adc
176174
177− - then:
175+ then:
178176 properties:
179177 st,adc-channels:
180178 minItems: 1
@@ -206,7 +204,7 @@ patternProperties: · 25 unmodified lines
206204 contains:
207205 const: st,stm32-dfsdm-dmic
208206
209− - then:
207+ then:
210208 properties:
211209 st,adc-channels:
212210 maxItems: 1
@@ -254,7 +252,7 @@ allOf: · 41 unmodified lines
254252 contains:
255253 const: st,stm32h7-dfsdm
256254
257− - then:
255+ then:
258256 patternProperties:
259257 "^filter@[0-9]+$":
260258 properties:
@@ -269,7 +267,7 @@ allOf: · 8 unmodified lines
269267 contains:
270268 const: st,stm32mp1-dfsdm
271269
272− - then:
270+ then:
273271 patternProperties:
274272 "^filter@[0-9]+$":
275273 properties:
Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml+3−3
@@ -59,9 +59,9 @@ allOf: · 58 unmodified lines
5959 contains:
6060 enum:
6161 - adi,ad5371
62− then:
63− required:
64− - vref2-supply
62+ then:
63+ required:
64+ - vref2-supply
6565
6666 examples:
6767 - |
Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml+42−42
@@ -93,48 +93,48 @@ allOf: · 92 unmodified lines
9393 - qcom,sdm660-gnoc
9494 - qcom,sdm660-snoc
9595
96− then:
97− properties:
98− clock-names:
99− items:
100− - const: bus
101− - const: bus_a
102−
103− clocks:
104− items:
105− - description: Bus Clock
106− - description: Bus A Clock
107−
108− # Child node's properties
109− patternProperties:
110− '^interconnect-[a-z0-9]+$':
111− type: object
112− description:
113− snoc-mm is a child of snoc, sharing snoc's register address space.
114−
115− properties:
116− compatible:
117− enum:
118− - qcom,msm8939-snoc-mm
119−
120− '#interconnect-cells':
121− const: 1
122−
123− clock-names:
124− items:
125− - const: bus
126− - const: bus_a
127−
128− clocks:
129− items:
130− - description: Bus Clock
131− - description: Bus A Clock
132−
133− required:
134− - compatible
135− - '#interconnect-cells'
136− - clock-names
137− - clocks
96+ then:
97+ properties:
98+ clock-names:
99+ items:
100+ - const: bus
101+ - const: bus_a
102+
103+ clocks:
104+ items:
105+ - description: Bus Clock
106+ - description: Bus A Clock
107+
108+ # Child node's properties
109+ patternProperties:
110+ '^interconnect-[a-z0-9]+$':
111+ type: object
112+ description:
113+ snoc-mm is a child of snoc, sharing snoc's register address space.
114+
115+ properties:
116+ compatible:
117+ enum:
118+ - qcom,msm8939-snoc-mm
119+
120+ '#interconnect-cells':
121+ const: 1
122+
123+ clock-names:
124+ items:
125+ - const: bus
126+ - const: bus_a
127+
128+ clocks:
129+ items:
130+ - description: Bus Clock
131+ - description: Bus A Clock
132+
133+ required:
134+ - compatible
135+ - '#interconnect-cells'
136+ - clock-names
137+ - clocks
138138
139139 - if:
140140 properties:
Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.yaml+2−4
@@ -7,10 +7,8 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Marvell MMP/Orion Interrupt controller bindings
88
99 maintainers:
10− - Thomas Gleixner <tglx@linutronix.de>
11− - Jason Cooper <jason@lakedaemon.net>
12− - Marc Zyngier <maz@kernel.org>
13− - Rob Herring <robh+dt@kernel.org>
10+ - Andrew Lunn <andrew@lunn.ch>
11+ - Gregory Clement <gregory.clement@bootlin.com>
1412
1513 allOf:
1614 - if:
Documentation/devicetree/bindings/interrupt-controller/samsung,exynos4210-combiner.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung Exynos SoC Interrupt Combiner Controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 Samsung's Exynos4 architecture includes a interrupt combiner controller which
Documentation/devicetree/bindings/leds/maxim,max77693.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Maxim MAX77693 MicroUSB and Companion Power Management IC LEDs
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for Maxim MAX77693 MicroUSB Integrated
Documentation/devicetree/bindings/media/coda.yaml+0−1
@@ -65,7 +65,6 @@ properties: · 64 unmodified lines
6565 iram:
6666 $ref: /schemas/types.yaml#/definitions/phandle
6767 description: phandle pointing to the SRAM device node
68− maxItems: 1
6968
7069 required:
7170 - compatible
Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml+0−2
@@ -63,13 +63,11 @@ properties: · 62 unmodified lines
6363
6464 mediatek,vpu:
6565 $ref: /schemas/types.yaml#/definitions/phandle
66− maxItems: 1
6766 description:
6867 Describes point to vpu.
6968
7069 mediatek,scp:
7170 $ref: /schemas/types.yaml#/definitions/phandle
72− maxItems: 1
7371 description:
7472 Describes point to scp.
7573
Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml+0−3
@@ -55,13 +55,11 @@ properties: · 54 unmodified lines
5555
5656 mediatek,vpu:
5757 $ref: /schemas/types.yaml#/definitions/phandle
58− maxItems: 1
5958 description:
6059 Describes point to vpu.
6160
6261 mediatek,scp:
6362 $ref: /schemas/types.yaml#/definitions/phandle
64− maxItems: 1
6563 description:
6664 Describes point to scp.
6765
@@ -106,7 +104,6 @@ allOf: · 38 unmodified lines
106104 enum:
107105 - mediatek,mt8173-vcodec-enc
108106 - mediatek,mt8192-vcodec-enc
109− - mediatek,mt8173-vcodec-enc
110107
111108 then:
112109 properties:
Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml+0−1
@@ -61,7 +61,6 @@ properties: · 60 unmodified lines
6161
6262 mediatek,scp:
6363 $ref: /schemas/types.yaml#/definitions/phandle
64− maxItems: 1
6564 description: |
6665 The node of system control processor (SCP), using
6766 the remoteproc & rpmsg framework.
Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: DDR PHY Front End (DPFE) for Broadcom STB
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Markus Mayer <mmayer@broadcom.com>
1212
1313 properties:
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2-timings.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: LPDDR2 SDRAM AC timing parameters for a given speed-bin
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: LPDDR2 SDRAM compliant to JEDEC JESD209-2
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3-timings.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: LPDDR3 SDRAM AC timing parameters for a given speed-bin
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: LPDDR3 SDRAM compliant to JEDEC JESD209-3
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/memory-controllers/marvell,mvebu-sdram-controller.yaml+1−1
@@ -8,7 +8,7 @@ title: Marvell MVEBU SDRAM controller · 7 unmodified lines
88
99 maintainers:
1010 - Jan Luebbe <jlu@pengutronix.de>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212
1313 properties:
1414 compatible:
Documentation/devicetree/bindings/memory-controllers/qca,ath79-ddr-controller.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Qualcomm Atheros AR7xxx/AR9xxx DDR controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 The DDR controller of the AR7xxx and AR9xxx families provides an interface to
Documentation/devicetree/bindings/memory-controllers/renesas,h8300-bsc.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: H8/300 bus controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Yoshinori Sato <ysato@users.sourceforge.jp>
1212
1313 properties:
Documentation/devicetree/bindings/memory-controllers/samsung,exynos5422-dmc.yaml+1−1
@@ -9,7 +9,7 @@ title: | · 8 unmodified lines
99 Controller device
1010
1111 maintainers:
12− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
12+ - Krzysztof Kozlowski <krzk@kernel.org>
1313 - Lukasz Luba <lukasz.luba@arm.com>
1414
1515 description: |
Documentation/devicetree/bindings/memory-controllers/synopsys,ddrc-ecc.yaml+5−3
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Synopsys IntelliDDR Multi Protocol memory controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Manish Narani <manish.narani@xilinx.com>
1212 - Michal Simek <michal.simek@xilinx.com>
1313
@@ -24,9 +24,9 @@ description: | · 10 unmodified lines
2424 properties:
2525 compatible:
2626 enum:
27+ - snps,ddrc-3.80a
2728 - xlnx,zynq-ddrc-a05
2829 - xlnx,zynqmp-ddrc-2.40a
29− - snps,ddrc-3.80a
3030
3131 interrupts:
3232 maxItems: 1
@@ -43,7 +43,9 @@ allOf: · 10 unmodified lines
4343 properties:
4444 compatible:
4545 contains:
46− const: xlnx,zynqmp-ddrc-2.40a
46+ enum:
47+ - snps,ddrc-3.80a
48+ - xlnx,zynqmp-ddrc-2.40a
4749 then:
4850 required:
4951 - interrupts
Documentation/devicetree/bindings/memory-controllers/ti,da8xx-ddrctl.yaml+1−1
@@ -8,7 +8,7 @@ title: Texas Instruments da8xx DDR2/mDDR memory controller · 7 unmodified lines
88
99 maintainers:
1010 - Bartosz Golaszewski <bgolaszewski@baylibre.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212
1313 description: |
1414 Documentation:
Documentation/devicetree/bindings/mfd/atmel-flexcom.txt+1−1
@@ -54,7 +54,7 @@ flexcom@f8034000 { · 53 unmodified lines
5454 clock-names = "spi_clk";
5555 atmel,fifo-size = <32>;
5656
57− mtd_dataflash@0 {
57+ flash@0 {
5858 compatible = "atmel,at25f512b";
5959 reg = <0>;
6060 spi-max-frequency = <20000000>;
Documentation/devicetree/bindings/mfd/maxim,max14577.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Maxim MAX14577/MAX77836 MicroUSB and Companion Power Management IC
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for Maxim MAX14577/MAX77836 MicroUSB
Documentation/devicetree/bindings/mfd/maxim,max77686.yaml+1−1
@@ -8,7 +8,7 @@ title: Maxim MAX77686 Power Management IC · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212
1313 description: |
1414 This is a part of device tree bindings for Maxim MAX77686 Power Management
Documentation/devicetree/bindings/mfd/maxim,max77693.yaml+1−1
@@ -8,7 +8,7 @@ title: Maxim MAX77693 MicroUSB and Companion Power Management IC · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212
1313 description: |
1414 This is a part of device tree bindings for Maxim MAX77693 MicroUSB
Documentation/devicetree/bindings/mfd/maxim,max77802.yaml+1−1
@@ -8,7 +8,7 @@ title: Maxim MAX77802 Power Management IC · 7 unmodified lines
88
99 maintainers:
1010 - Javier Martinez Canillas <javier@dowhile0.org>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212
1313 description: |
1414 This is a part of device tree bindings for Maxim MAX77802 Power Management
Documentation/devicetree/bindings/mfd/maxim,max77843.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Maxim MAX77843 MicroUSB and Companion Power Management IC
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for Maxim MAX77843 MicroUSB
Documentation/devicetree/bindings/mfd/samsung,exynos5433-lpass.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung Exynos SoC Low Power Audio Subsystem (LPASS)
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1212
1313 properties:
Documentation/devicetree/bindings/mfd/samsung,s2mpa01.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S2MPA01 Power Management IC
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for S2M and S5M family of Power
Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S2MPS11/13/14/15 and S2MPU02 Power Management IC
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for S2M and S5M family of Power
Documentation/devicetree/bindings/mfd/samsung,s5m8767.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S5M8767 Power Management IC
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for S2M and S5M family of Power
Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.yaml+2−0
@@ -197,6 +197,8 @@ allOf: · 196 unmodified lines
197197 - nvidia,tegra30-sdhci
198198 - nvidia,tegra114-sdhci
199199 - nvidia,tegra124-sdhci
200+ then:
201+ properties:
200202 clocks:
201203 items:
202204 - description: module clock
Documentation/devicetree/bindings/net/dsa/realtek.yaml+14−21
@@ -27,32 +27,25 @@ description: · 26 unmodified lines
2727 The realtek-mdio driver is an MDIO driver and it must be inserted inside
2828 an MDIO node.
2929
30+ The compatible string is only used to identify which (silicon) family the
31+ switch belongs to. Roughly speaking, a family is any set of Realtek switches
32+ whose chip identification register(s) have a common location and semantics.
33+ The different models in a given family can be automatically disambiguated by
34+ parsing the chip identification register(s) according to the given family,
35+ avoiding the need for a unique compatible string for each model.
36+
3037 properties:
3138 compatible:
3239 enum:
3340 - realtek,rtl8365mb
34− - realtek,rtl8366
3541 - realtek,rtl8366rb
36− - realtek,rtl8366s
37− - realtek,rtl8367
38− - realtek,rtl8367b
39− - realtek,rtl8367rb
40− - realtek,rtl8367s
41− - realtek,rtl8368s
42− - realtek,rtl8369
43− - realtek,rtl8370
4442 description: |
45− realtek,rtl8365mb: 4+1 ports
46− realtek,rtl8366: 5+1 ports
47− realtek,rtl8366rb: 5+1 ports
48− realtek,rtl8366s: 5+1 ports
49− realtek,rtl8367:
50− realtek,rtl8367b:
51− realtek,rtl8367rb: 5+2 ports
52− realtek,rtl8367s: 5+2 ports
53− realtek,rtl8368s: 8 ports
54− realtek,rtl8369: 8+1 ports
55− realtek,rtl8370: 8+2 ports
43+ realtek,rtl8365mb:
44+ Use with models RTL8363NB, RTL8363NB-VB, RTL8363SC, RTL8363SC-VB,
45+ RTL8364NB, RTL8364NB-VB, RTL8365MB, RTL8366SC, RTL8367RB-VB, RTL8367S,
46+ RTL8367SB, RTL8370MB, RTL8310SR
47+ realtek,rtl8366rb:
48+ Use with models RTL8366RB, RTL8366S
5649
5750 mdc-gpios:
5851 description: GPIO line for the MDC clock line.
@@ -335,7 +328,7 @@ examples: · 276 unmodified lines
335328 #size-cells = <0>;
336329
337330 switch@29 {
338− compatible = "realtek,rtl8367s";
331+ compatible = "realtek,rtl8365mb";
339332 reg = <29>;
340333
341334 reset-gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
Documentation/devicetree/bindings/net/nfc/marvell,nci.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Marvell International Ltd. NCI NFC controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml+1−1
@@ -8,7 +8,7 @@ title: NXP Semiconductors NCI NFC controller · 7 unmodified lines
88
99 maintainers:
1010 - Charles Gorand <charles.gorand@effinnov.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212
1313 properties:
1414 compatible:
Documentation/devicetree/bindings/net/nfc/nxp,pn532.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: NXP Semiconductors PN532 NFC controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/net/nfc/nxp,pn544.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: NXP Semiconductors PN544 NFC Controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: STMicroelectronics ST NCI NFC controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/net/nfc/st,st21nfca.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: STMicroelectronics SAS ST21NFCA NFC controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/net/nfc/st,st95hf.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: STMicroelectronics ST95HF NFC controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Texas Instruments TRF7970A RFID/NFC/15693 Transceiver
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Mark Greer <mgreer@animalcreek.com>
1212
1313 properties:
Documentation/devicetree/bindings/net/snps,dwmac.yaml+2−4
@@ -53,20 +53,18 @@ properties: · 52 unmodified lines
5353 - allwinner,sun8i-r40-gmac
5454 - allwinner,sun8i-v3s-emac
5555 - allwinner,sun50i-a64-emac
56− - loongson,ls2k-dwmac
57− - loongson,ls7a-dwmac
5856 - amlogic,meson6-dwmac
5957 - amlogic,meson8b-dwmac
6058 - amlogic,meson8m2-dwmac
6159 - amlogic,meson-gxbb-dwmac
6260 - amlogic,meson-axg-dwmac
63− - loongson,ls2k-dwmac
64− - loongson,ls7a-dwmac
6561 - ingenic,jz4775-mac
6662 - ingenic,x1000-mac
6763 - ingenic,x1600-mac
6864 - ingenic,x1830-mac
6965 - ingenic,x2000-mac
66+ - loongson,ls2k-dwmac
67+ - loongson,ls7a-dwmac
7068 - rockchip,px30-gmac
7169 - rockchip,rk3128-gmac
7270 - rockchip,rk3228-gmac
Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml+39−18
@@ -13,9 +13,6 @@ description: | · 12 unmodified lines
1313 This describes the devicetree bindings for AVE ethernet controller
1414 implemented on Socionext UniPhier SoCs.
1515
16−allOf:
17− - $ref: ethernet-controller.yaml#
18−
1916 properties:
2017 compatible:
2118 enum:
@@ -44,25 +41,13 @@ properties: · 22 unmodified lines
4441 minItems: 1
4542 maxItems: 4
4643
47− clock-names:
48− oneOf:
49− - items: # for Pro4
50− - const: gio
51− - const: ether
52− - const: ether-gb
53− - const: ether-phy
54− - const: ether # for others
44+ clock-names: true
5545
5646 resets:
5747 minItems: 1
5848 maxItems: 2
5949
60− reset-names:
61− oneOf:
62− - items: # for Pro4
63− - const: gio
64− - const: ether
65− - const: ether # for others
50+ reset-names: true
6651
6752 socionext,syscon-phy-mode:
6853 $ref: /schemas/types.yaml#/definitions/phandle-array
@@ -78,6 +63,42 @@ properties: · 9 unmodified lines
7863 $ref: mdio.yaml#
7964 unevaluatedProperties: false
8065
66+allOf:
67+ - $ref: ethernet-controller.yaml#
68+ - if:
69+ properties:
70+ compatible:
71+ contains:
72+ const: socionext,uniphier-pro4-ave4
73+ then:
74+ properties:
75+ clocks:
76+ minItems: 4
77+ maxItems: 4
78+ clock-names:
79+ items:
80+ - const: gio
81+ - const: ether
82+ - const: ether-gb
83+ - const: ether-phy
84+ resets:
85+ minItems: 2
86+ maxItems: 2
87+ reset-names:
88+ items:
89+ - const: gio
90+ - const: ether
91+ else:
92+ properties:
93+ clocks:
94+ maxItems: 1
95+ clock-names:
96+ const: ether
97+ resets:
98+ maxItems: 1
99+ reset-names:
100+ const: ether
101+
81102 required:
82103 - compatible
83104 - reg
@@ -90,7 +111,7 @@ required: · 6 unmodified lines
90111 - reset-names
91112 - mdio
92113
93−additionalProperties: false
114+unevaluatedProperties: false
94115
95116 examples:
96117 - |
Documentation/devicetree/bindings/net/ti,davinci-mdio.yaml+1−0
@@ -56,6 +56,7 @@ if: · 55 unmodified lines
5656 compatible:
5757 contains:
5858 const: ti,davinci_mdio
59+then:
5960 required:
6061 - bus_freq
6162
Documentation/devicetree/bindings/phy/nvidia,tegra20-usb-phy.yaml+10−10
@@ -275,17 +275,17 @@ allOf: · 274 unmodified lines
275275 - nvidia,hssquelch-level
276276 - nvidia,hsdiscon-level
277277
278− else:
279− properties:
280− clocks:
281− maxItems: 4
278+ else:
279+ properties:
280+ clocks:
281+ maxItems: 4
282282
283− clock-names:
284− items:
285− - const: reg
286− - const: pll_u
287− - const: timer
288− - const: utmi-pads
283+ clock-names:
284+ items:
285+ - const: reg
286+ - const: pll_u
287+ - const: timer
288+ - const: utmi-pads
289289
290290 - if:
291291 properties:
Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml+17−15
@@ -14,24 +14,24 @@ if: · 13 unmodified lines
1414 compatible:
1515 contains:
1616 const: qcom,usb-hs-phy-apq8064
17− then:
18− properties:
19− resets:
20− maxItems: 1
17+then:
18+ properties:
19+ resets:
20+ maxItems: 1
2121
22− reset-names:
23− const: por
22+ reset-names:
23+ const: por
2424
25− else:
26− properties:
27− resets:
28− minItems: 2
29− maxItems: 2
25+else:
26+ properties:
27+ resets:
28+ minItems: 2
29+ maxItems: 2
3030
31− reset-names:
32− items:
33− - const: phy
34− - const: por
31+ reset-names:
32+ items:
33+ - const: phy
34+ - const: por
3535
3636 properties:
3737 compatible:
@@ -92,6 +92,8 @@ additionalProperties: false · 54 unmodified lines
9292 examples:
9393 - |
9494 otg: usb-controller {
95+ #reset-cells = <1>;
96+
9597 ulpi {
9698 phy {
9799 compatible = "qcom,usb-hs-phy-msm8974", "qcom,usb-hs-phy";
Documentation/devicetree/bindings/phy/samsung,dp-video-phy.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung Exynos SoC DisplayPort PHY
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Marek Szyprowski <m.szyprowski@samsung.com>
1212 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1313
Documentation/devicetree/bindings/phy/samsung,exynos-hdmi-phy.yaml+1−1
@@ -11,7 +11,7 @@ maintainers: · 10 unmodified lines
1111 - Joonyoung Shim <jy0922.shim@samsung.com>
1212 - Seung-Woo Kim <sw0312.kim@samsung.com>
1313 - Kyungmin Park <kyungmin.park@samsung.com>
14− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
14+ - Krzysztof Kozlowski <krzk@kernel.org>
1515
1616 properties:
1717 compatible:
Documentation/devicetree/bindings/phy/samsung,exynos5250-sata-phy.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung Exynos5250 SoC SATA PHY
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Marek Szyprowski <m.szyprowski@samsung.com>
1212 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1313
Documentation/devicetree/bindings/phy/samsung,mipi-video-phy.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S5P/Exynos SoC MIPI CSIS/DSIM DPHY
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Marek Szyprowski <m.szyprowski@samsung.com>
1212 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1313
Documentation/devicetree/bindings/phy/samsung,usb2-phy.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S5P/Exynos SoC USB 2.0 PHY
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Marek Szyprowski <m.szyprowski@samsung.com>
1212 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1313
Documentation/devicetree/bindings/phy/samsung,usb3-drd-phy.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung Exynos SoC USB 3.0 DRD PHY USB 2.0 PHY
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Marek Szyprowski <m.szyprowski@samsung.com>
1212 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1313
Documentation/devicetree/bindings/pinctrl/cirrus,madera.yaml+5−6
@@ -48,13 +48,12 @@ properties: · 47 unmodified lines
4848 Name of one pin group to configure.
4949 enum: [ aif1, aif2, aif3, aif4, mif1, mif2, mif3, pdmspk1,
5050 pdmspk2, dmic4, dmic5, dmic6, gpio1, gpio2, gpio3,
51− gpio4, gpio5, gpio6, gpio7, gpio7, gpio8, gpio9,
51+ gpio4, gpio5, gpio6, gpio7, gpio8, gpio9,
5252 gpio10, gpio11, gpio12, gpio13, gpio14, gpio15,
53− gpio16, gpio17, gpio17, gpio18, gpio19, gpio20,
54− gpio21, gpio22, gpio23, gpio24, gpio25, gpio26,
55− gpio27, gpio27, gpio28, gpio29, gpio30, gpio31,
56− gpio32, gpio33, gpio34, gpio35, gpio36, gpio37,
57− gpio37, gpio38, gpio39 ]
53+ gpio16, gpio17, gpio18, gpio19, gpio20, gpio21,
54+ gpio22, gpio23, gpio24, gpio25, gpio26, gpio27,
55+ gpio28, gpio29, gpio30, gpio31, gpio32, gpio33,
56+ gpio34, gpio35, gpio36, gpio37, gpio38, gpio39 ]
5857
5958 function:
6059 description:
Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-gpio-bank.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S3C/S5P/Exynos SoC pin controller - gpio bank
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1212 - Tomasz Figa <tomasz.figa@gmail.com>
1313
Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-pins-cfg.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S3C/S5P/Exynos SoC pin controller - pins configuration
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1212 - Tomasz Figa <tomasz.figa@gmail.com>
1313
Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S3C/S5P/Exynos SoC pin controller - wake-up interrupt controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1212 - Tomasz Figa <tomasz.figa@gmail.com>
1313
Documentation/devicetree/bindings/pinctrl/samsung,pinctrl.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S3C/S5P/Exynos SoC pin controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1212 - Tomasz Figa <tomasz.figa@gmail.com>
1313
Documentation/devicetree/bindings/power/renesas,apmu.yaml+2−1
@@ -36,7 +36,8 @@ properties: · 35 unmodified lines
3636 cpus:
3737 $ref: /schemas/types.yaml#/definitions/phandle-array
3838 items:
39− maxItems: 1
39+ minItems: 1
40+ maxItems: 4
4041 description: |
4142 Array of phandles pointing to CPU cores, which should match the order of
4243 CPU cores used by the WUPCR and PSTR registers in the Advanced Power
Documentation/devicetree/bindings/power/supply/bq2415x.yaml+0−1
@@ -16,7 +16,6 @@ allOf: · 15 unmodified lines
1616 properties:
1717 compatible:
1818 enum:
19− - ti,bq24150
2019 - ti,bq24150
2120 - ti,bq24150a
2221 - ti,bq24151
Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Maxim MAX14577/MAX77836 MicroUSB and Companion Power Management IC Charger
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for Maxim MAX14577/MAX77836 MicroUSB
Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Maxim MAX77693 MicroUSB and Companion Power Management IC Charger
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for Maxim MAX77693 MicroUSB Integrated
Documentation/devicetree/bindings/regulator/fixed-regulator.yaml+17−17
@@ -18,23 +18,23 @@ description: · 17 unmodified lines
1818
1919 allOf:
2020 - $ref: "regulator.yaml#"
21−
22−if:
23− properties:
24− compatible:
25− contains:
26− const: regulator-fixed-clock
27− required:
28− - clocks
29−else:
30− if:
31− properties:
32− compatible:
33− contains:
34− const: regulator-fixed-domain
35− required:
36− - power-domains
37− - required-opps
21+ - if:
22+ properties:
23+ compatible:
24+ contains:
25+ const: regulator-fixed-clock
26+ then:
27+ required:
28+ - clocks
29+ - if:
30+ properties:
31+ compatible:
32+ contains:
33+ const: regulator-fixed-domain
34+ then:
35+ required:
36+ - power-domains
37+ - required-opps
3838
3939 properties:
4040 compatible:
Documentation/devicetree/bindings/regulator/maxim,max14577.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Maxim MAX14577/MAX77836 MicroUSB and Companion Power Management IC regulators
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for Maxim MAX14577/MAX77836 MicroUSB
Documentation/devicetree/bindings/regulator/maxim,max77686.yaml+1−1
@@ -8,7 +8,7 @@ title: Maxim MAX77686 Power Management IC regulators · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212
1313 description: |
1414 This is a part of device tree bindings for Maxim MAX77686 Power Management
Documentation/devicetree/bindings/regulator/maxim,max77693.yaml+1−1
@@ -8,7 +8,7 @@ title: Maxim MAX77693 MicroUSB and Companion Power Management IC regulators · 7 unmodified lines
88
99 maintainers:
1010 - Chanwoo Choi <cw00.choi@samsung.com>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212
1313 description: |
1414 This is a part of device tree bindings for Maxim MAX77693 MicroUSB Integrated
Documentation/devicetree/bindings/regulator/maxim,max77802.yaml+1−1
@@ -8,7 +8,7 @@ title: Maxim MAX77802 Power Management IC regulators · 7 unmodified lines
88
99 maintainers:
1010 - Javier Martinez Canillas <javier@dowhile0.org>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212
1313 description: |
1414 This is a part of device tree bindings for Maxim MAX77802 Power Management
Documentation/devicetree/bindings/regulator/maxim,max77843.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Maxim MAX77843 MicroUSB and Companion Power Management IC regulators
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for Maxim MAX77843 MicroUSB Integrated
Documentation/devicetree/bindings/regulator/maxim,max8952.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Maxim MAX8952 voltage regulator
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 allOf:
1313 - $ref: regulator.yaml#
Documentation/devicetree/bindings/regulator/maxim,max8973.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Maxim MAX8973/MAX77621 voltage regulator
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 allOf:
1313 - $ref: regulator.yaml#
Documentation/devicetree/bindings/regulator/maxim,max8997.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Maxim MAX8997 Power Management IC
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 The Maxim MAX8997 is a Power Management IC which includes voltage and current
Documentation/devicetree/bindings/regulator/richtek,rt5190a-regulator.yaml+1−1
@@ -58,7 +58,7 @@ properties: · 57 unmodified lines
5858 type: object
5959 $ref: regulator.yaml#
6060 description: |
61− regulator description for buck1 and buck4.
61+ regulator description for buck1 to buck4, and ldo.
6262
6363 properties:
6464 regulator-allowed-modes:
Documentation/devicetree/bindings/regulator/samsung,s2mpa01.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S2MPA01 Power Management IC regulators
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for S2M and S5M family of Power
Documentation/devicetree/bindings/regulator/samsung,s2mps11.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S2MPS11 Power Management IC regulators
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for S2M and S5M family of Power
Documentation/devicetree/bindings/regulator/samsung,s2mps13.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S2MPS13 Power Management IC regulators
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for S2M and S5M family of Power
Documentation/devicetree/bindings/regulator/samsung,s2mps14.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S2MPS14 Power Management IC regulators
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for S2M and S5M family of Power
Documentation/devicetree/bindings/regulator/samsung,s2mps15.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S2MPS15 Power Management IC regulators
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for S2M and S5M family of Power
Documentation/devicetree/bindings/regulator/samsung,s2mpu02.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S2MPU02 Power Management IC regulators
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for S2M and S5M family of Power
Documentation/devicetree/bindings/regulator/samsung,s5m8767.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S5M8767 Power Management IC regulators
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 This is a part of device tree bindings for S2M and S5M family of Power
Documentation/devicetree/bindings/remoteproc/qcom,sc7280-wpss-pil.yaml+1−3
@@ -104,8 +104,7 @@ properties: · 103 unmodified lines
104104 qcom,smem-state-names:
105105 $ref: /schemas/types.yaml#/definitions/string
106106 description: The names of the state bits used for SMP2P output
107− items:
108− - const: stop
107+ const: stop
109108
110109 glink-edge:
111110 type: object
@@ -130,7 +129,6 @@ properties: · 18 unmodified lines
130129 qcom,remote-pid:
131130 $ref: /schemas/types.yaml#/definitions/uint32
132131 description: ID of the shared memory used by GLINK for communication with WPSS
133− maxItems: 1
134132
135133 required:
136134 - interrupts
Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.yaml+5−0
@@ -24,6 +24,11 @@ properties: · 23 unmodified lines
2424 - const: hisilicon,hi3670-reset
2525 - const: hisilicon,hi3660-reset
2626
27+ hisi,rst-syscon:
28+ deprecated: true
29+ description: phandle of the reset's syscon, use hisilicon,rst-syscon instead
30+ $ref: /schemas/types.yaml#/definitions/phandle
31+
2732 hisilicon,rst-syscon:
2833 description: phandle of the reset's syscon.
2934 $ref: /schemas/types.yaml#/definitions/phandle
Documentation/devicetree/bindings/reset/socionext,uniphier-reset.yaml+3−0
@@ -55,6 +55,9 @@ properties: · 54 unmodified lines
5555 "#reset-cells":
5656 const: 1
5757
58+ resets:
59+ maxItems: 1
60+
5861 additionalProperties: false
5962
6063 required:
Documentation/devicetree/bindings/rng/samsung,exynos5250-trng.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung Exynos SoC True Random Number Generator
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Łukasz Stelmach <l.stelmach@samsung.com>
1212
1313 properties:
Documentation/devicetree/bindings/rng/timeriomem_rng.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: TimerIO Random Number Generator
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml+12−3
@@ -31,11 +31,19 @@ properties: · 30 unmodified lines
3131 to that of the RTC's count register.
3232
3333 clocks:
34− maxItems: 1
34+ items:
35+ - description: |
36+ AHB clock
37+ - description: |
38+ Reference clock: divided by the prescaler to create a time-based
39+ strobe (typically 1 Hz) for the calendar counter. By default, the rtc
40+ on the PolarFire SoC shares it's reference with MTIMER so this will
41+ be a 1 MHz clock.
3542
3643 clock-names:
3744 items:
3845 - const: rtc
46+ - const: rtcref
3947
4048 required:
4149 - compatible
@@ -48,11 +56,12 @@ additionalProperties: false · 6 unmodified lines
4856
4957 examples:
5058 - |
59+ #include "dt-bindings/clock/microchip,mpfs-clock.h"
5160 rtc@20124000 {
5261 compatible = "microchip,mpfs-rtc";
5362 reg = <0x20124000 0x1000>;
54− clocks = <&clkcfg 21>;
55− clock-names = "rtc";
63+ clocks = <&clkcfg CLK_RTC>, <&clkcfg CLK_RTCREF>;
64+ clock-names = "rtc", "rtcref";
5665 interrupts = <80>, <81>;
5766 };
5867 ...
Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml+1−1
@@ -8,7 +8,7 @@ title: Samsung's Exynos USI (Universal Serial Interface) binding · 7 unmodified lines
88
99 maintainers:
1010 - Sam Protsenko <semen.protsenko@linaro.org>
11− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
11+ - Krzysztof Kozlowski <krzk@kernel.org>
1212
1313 description: |
1414 USI IP-core provides selectable serial protocol (UART, SPI or High-Speed I2C).
Documentation/devicetree/bindings/sound/samsung,arndale.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Insignal Arndale boards audio complex
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1212
1313 properties:
Documentation/devicetree/bindings/sound/samsung,smdk5250.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung SMDK5250 audio complex with WM8994 codec
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1212
1313 properties:
Documentation/devicetree/bindings/sound/samsung,snow.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Google Snow audio complex with MAX9809x codec
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1212
1313 properties:
Documentation/devicetree/bindings/sound/samsung,tm2.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung Exynos5433 TM2(E) audio complex with WM5110 codec
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111 - Sylwester Nawrocki <s.nawrocki@samsung.com>
1212
1313 properties:
Documentation/devicetree/bindings/sound/st,stm32-sai.yaml+2−4
@@ -136,8 +136,7 @@ allOf: · 135 unmodified lines
136136 compatible:
137137 contains:
138138 const: st,stm32f4-sai
139−
140− - then:
139+ then:
141140 properties:
142141 clocks:
143142 items:
@@ -148,8 +147,7 @@ allOf: · 4 unmodified lines
148147 items:
149148 - const: x8k
150149 - const: x11k
151−
152− - else:
150+ else:
153151 properties:
154152 clocks:
155153 items:
Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml+0−2
@@ -124,7 +124,6 @@ properties: · 123 unmodified lines
124124 description: |
125125 Override the default TX fifo size. Unit is words. Ignored if 0.
126126 $ref: /schemas/types.yaml#/definitions/uint32
127− maxItems: 1
128127 default: 64
129128
130129 renesas,rx-fifo-size:
@@ -132,7 +131,6 @@ properties: · 1 unmodified line
132131 description: |
133132 Override the default RX fifo size. Unit is words. Ignored if 0.
134133 $ref: /schemas/types.yaml#/definitions/uint32
135− maxItems: 1
136134 default: 64
137135
138136 required:
Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Peripheral-specific properties for Samsung S3C/S5P/Exynos SoC SPI controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description:
1313 See spi-peripheral-props.yaml for more info.
Documentation/devicetree/bindings/spi/samsung,spi.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung S3C/S5P/Exynos SoC SPI controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description:
1313 All the SPI controller nodes should be represented in the aliases node using
Documentation/devicetree/bindings/sram/sram.yaml+8−8
@@ -136,14 +136,14 @@ required: · 135 unmodified lines
136136 - reg
137137
138138 if:
139− properties:
140− compatible:
141− contains:
142− enum:
143− - qcom,rpm-msg-ram
144− - rockchip,rk3288-pmu-sram
145−
146−else:
139+ not:
140+ properties:
141+ compatible:
142+ contains:
143+ enum:
144+ - qcom,rpm-msg-ram
145+ - rockchip,rk3288-pmu-sram
146+then:
147147 required:
148148 - "#address-cells"
149149 - "#size-cells"
Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung Exynos SoC Thermal Management Unit (TMU)
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description: |
1313 For multi-instance tmu each instance should have an alias correctly numbered
Documentation/devicetree/bindings/usb/samsung,exynos-dwc3.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung Exynos SoC USB 3.0 DWC3 Controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
Documentation/devicetree/bindings/usb/samsung,exynos-usb2.yaml+2−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Samsung Exynos SoC USB 2.0 EHCI/OHCI Controller
88
99 maintainers:
10− - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
10+ - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 properties:
1313 compatible:
@@ -62,6 +62,7 @@ required: · 48 unmodified lines
6262 - interrupts
6363 - phys
6464 - phy-names
65+ - reg
6566
6667 allOf:
6768 - if:
Documentation/filesystems/caching/backend-api.rst+4−4
@@ -73,7 +73,7 @@ busy. · 72 unmodified lines
7373 If successful, the cache backend can then start setting up the cache. In the
7474 event that the initialisation fails, the cache backend should call::
7575
76− void fscache_relinquish_cookie(struct fscache_cache *cache);
76+ void fscache_relinquish_cache(struct fscache_cache *cache);
7777
7878 to reset and discard the cookie.
7979
@@ -110,9 +110,9 @@ to withdraw them, calling:: · 30 unmodified lines
110110
111111 on the cookie that each object belongs to. This schedules the specified cookie
112112 for withdrawal. This gets offloaded to a workqueue. The cache backend can
113−test for completion by calling::
113+wait for completion by calling::
114114
115− bool fscache_are_objects_withdrawn(struct fscache_cookie *cache);
115+ void fscache_wait_for_objects(struct fscache_cache *cache);
116116
117117 Once all the cookies are withdrawn, a cache backend can withdraw all the
118118 volumes, calling::
@@ -125,7 +125,7 @@ outstanding accesses on the volume to complete before returning. · 6 unmodified lines
125125 When the the cache is completely withdrawn, fscache should be notified by
126126 calling::
127127
128− void fscache_cache_relinquish(struct fscache_cache *cache);
128+ void fscache_relinquish_cache(struct fscache_cache *cache);
129129
130130 to clear fields in the cookie and discard the caller's ref on it.
131131
Documentation/filesystems/caching/netfs-api.rst+12−13
@@ -404,22 +404,21 @@ schedule a write of that region:: · 403 unmodified lines
404404 And if an error occurs before that point is reached, the marks can be removed
405405 by calling::
406406
407− void fscache_clear_page_bits(struct fscache_cookie *cookie,
408− struct address_space *mapping,
407+ void fscache_clear_page_bits(struct address_space *mapping,
409408 loff_t start, size_t len,
410409 bool caching)
411410
412−In both of these functions, the cookie representing the cache object to be
413−written to and a pointer to the mapping to which the source pages are attached
414−are passed in; start and len indicate the size of the region that's going to be
415−written (it doesn't have to align to page boundaries necessarily, but it does
416−have to align to DIO boundaries on the backing filesystem). The caching
417−parameter indicates if caching should be skipped, and if false, the functions
418−do nothing.
419−
420−The write function takes some additional parameters: i_size indicates the size
421−of the netfs file and term_func indicates an optional completion function, to
422−which term_func_priv will be passed, along with the error or amount written.
411+In these functions, a pointer to the mapping to which the source pages are
412+attached is passed in and start and len indicate the size of the region that's
413+going to be written (it doesn't have to align to page boundaries necessarily,
414+but it does have to align to DIO boundaries on the backing filesystem). The
415+caching parameter indicates if caching should be skipped, and if false, the
416+functions do nothing.
417+
418+The write function takes some additional parameters: the cookie representing
419+the cache object to be written to, i_size indicates the size of the netfs file
420+and term_func indicates an optional completion function, to which
421+term_func_priv will be passed, along with the error or amount written.
423422
424423 Note that the write function will always run asynchronously and will unmark all
425424 the pages upon completion before calling term_func.
Documentation/filesystems/ext4/attributes.rst+1−1
@@ -76,7 +76,7 @@ The beginning of an extended attribute block is in · 75 unmodified lines
7676 - Checksum of the extended attribute block.
7777 * - 0x14
7878 - \_\_u32
79− - h\_reserved[2]
79+ - h\_reserved[3]
8080 - Zero.
8181
8282 The checksum is calculated against the FS UUID, the 64-bit block number
Documentation/filesystems/f2fs.rst+0−70
@@ -235,12 +235,6 @@ offgrpjquota Turn off group journalled quota. · 234 unmodified lines
235235 offprjjquota Turn off project journalled quota.
236236 quota Enable plain user disk quota accounting.
237237 noquota Disable all plain disk quota option.
238−whint_mode=%s Control which write hints are passed down to block
239− layer. This supports "off", "user-based", and
240− "fs-based". In "off" mode (default), f2fs does not pass
241− down hints. In "user-based" mode, f2fs tries to pass
242− down hints given by users. And in "fs-based" mode, f2fs
243− passes down hints with its policy.
244238 alloc_mode=%s Adjust block allocation policy, which supports "reuse"
245239 and "default".
246240 fsync_mode=%s Control the policy of fsync. Currently supports "posix",
@@ -751,70 +745,6 @@ In order to identify whether the data in the victim segment are valid or not, · 504 unmodified lines
751745 F2FS manages a bitmap. Each bit represents the validity of a block, and the
752746 bitmap is composed of a bit stream covering whole blocks in main area.
753747
754−Write-hint Policy
755−-----------------
756−
757−1) whint_mode=off. F2FS only passes down WRITE_LIFE_NOT_SET.
758−
759−2) whint_mode=user-based. F2FS tries to pass down hints given by
760−users.
761−
762−===================== ======================== ===================
763−User F2FS Block
764−===================== ======================== ===================
765−N/A META WRITE_LIFE_NOT_SET
766−N/A HOT_NODE "
767−N/A WARM_NODE "
768−N/A COLD_NODE "
769−ioctl(COLD) COLD_DATA WRITE_LIFE_EXTREME
770−extension list " "
771−
772−-- buffered io
773−WRITE_LIFE_EXTREME COLD_DATA WRITE_LIFE_EXTREME
774−WRITE_LIFE_SHORT HOT_DATA WRITE_LIFE_SHORT
775−WRITE_LIFE_NOT_SET WARM_DATA WRITE_LIFE_NOT_SET
776−WRITE_LIFE_NONE " "
777−WRITE_LIFE_MEDIUM " "
778−WRITE_LIFE_LONG " "
779−
780−-- direct io
781−WRITE_LIFE_EXTREME COLD_DATA WRITE_LIFE_EXTREME
782−WRITE_LIFE_SHORT HOT_DATA WRITE_LIFE_SHORT
783−WRITE_LIFE_NOT_SET WARM_DATA WRITE_LIFE_NOT_SET
784−WRITE_LIFE_NONE " WRITE_LIFE_NONE
785−WRITE_LIFE_MEDIUM " WRITE_LIFE_MEDIUM
786−WRITE_LIFE_LONG " WRITE_LIFE_LONG
787−===================== ======================== ===================
788−
789−3) whint_mode=fs-based. F2FS passes down hints with its policy.
790−
791−===================== ======================== ===================
792−User F2FS Block
793−===================== ======================== ===================
794−N/A META WRITE_LIFE_MEDIUM;
795−N/A HOT_NODE WRITE_LIFE_NOT_SET
796−N/A WARM_NODE "
797−N/A COLD_NODE WRITE_LIFE_NONE
798−ioctl(COLD) COLD_DATA WRITE_LIFE_EXTREME
799−extension list " "
800−
801−-- buffered io
802−WRITE_LIFE_EXTREME COLD_DATA WRITE_LIFE_EXTREME
803−WRITE_LIFE_SHORT HOT_DATA WRITE_LIFE_SHORT
804−WRITE_LIFE_NOT_SET WARM_DATA WRITE_LIFE_LONG
805−WRITE_LIFE_NONE " "
806−WRITE_LIFE_MEDIUM " "
807−WRITE_LIFE_LONG " "
808−
809−-- direct io
810−WRITE_LIFE_EXTREME COLD_DATA WRITE_LIFE_EXTREME
811−WRITE_LIFE_SHORT HOT_DATA WRITE_LIFE_SHORT
812−WRITE_LIFE_NOT_SET WARM_DATA WRITE_LIFE_NOT_SET
813−WRITE_LIFE_NONE " WRITE_LIFE_NONE
814−WRITE_LIFE_MEDIUM " WRITE_LIFE_MEDIUM
815−WRITE_LIFE_LONG " WRITE_LIFE_LONG
816−===================== ======================== ===================
817−
818748 Fallocate(2) Policy
819749 -------------------
820750
Documentation/networking/bonding.rst+2−2
@@ -894,7 +894,7 @@ xmit_hash_policy · 893 unmodified lines
894894 Uses XOR of hardware MAC addresses and packet type ID
895895 field to generate the hash. The formula is
896896
897− hash = source MAC XOR destination MAC XOR packet type ID
897+ hash = source MAC[5] XOR destination MAC[5] XOR packet type ID
898898 slave number = hash modulo slave count
899899
900900 This algorithm will place all traffic to a particular
@@ -910,7 +910,7 @@ xmit_hash_policy · 9 unmodified lines
910910 Uses XOR of hardware MAC addresses and IP addresses to
911911 generate the hash. The formula is
912912
913− hash = source MAC XOR destination MAC XOR packet type ID
913+ hash = source MAC[5] XOR destination MAC[5] XOR packet type ID
914914 hash = hash XOR source IP XOR destination IP
915915 hash = hash XOR (hash RSHIFT 16)
916916 hash = hash XOR (hash RSHIFT 8)
Documentation/networking/ip-sysctl.rst+7−0
@@ -267,6 +267,13 @@ ipfrag_max_dist - INTEGER · 266 unmodified lines
267267 from different IP datagrams, which could result in data corruption.
268268 Default: 64
269269
270+bc_forwarding - INTEGER
271+ bc_forwarding enables the feature described in rfc1812#section-5.3.5.2
272+ and rfc2644. It allows the router to forward directed broadcast.
273+ To enable this feature, the 'all' entry and the input interface entry
274+ should be set to 1.
275+ Default: 0
276+
270277 INET peer storage
271278 =================
272279
Documentation/security/siphash.rst+28−18
@@ -121,26 +121,36 @@ even scarier, uses an easily brute-forcable 64-bit key (with a 32-bit output) · 120 unmodified lines
121121 instead of SipHash's 128-bit key. However, this may appeal to some
122122 high-performance `jhash` users.
123123
124−Danger!
125−
126−Do not ever use HalfSipHash except for as a hashtable key function, and only
127−then when you can be absolutely certain that the outputs will never be
128−transmitted out of the kernel. This is only remotely useful over `jhash` as a
129−means of mitigating hashtable flooding denial of service attacks.
130−
131−Generating a HalfSipHash key
132−============================
124+HalfSipHash support is provided through the "hsiphash" family of functions.
125+
126+.. warning::
127+ Do not ever use the hsiphash functions except for as a hashtable key
128+ function, and only then when you can be absolutely certain that the outputs
129+ will never be transmitted out of the kernel. This is only remotely useful
130+ over `jhash` as a means of mitigating hashtable flooding denial of service
131+ attacks.
132+
133+On 64-bit kernels, the hsiphash functions actually implement SipHash-1-3, a
134+reduced-round variant of SipHash, instead of HalfSipHash-1-3. This is because in
135+64-bit code, SipHash-1-3 is no slower than HalfSipHash-1-3, and can be faster.
136+Note, this does *not* mean that in 64-bit kernels the hsiphash functions are the
137+same as the siphash ones, or that they are secure; the hsiphash functions still
138+use a less secure reduced-round algorithm and truncate their outputs to 32
139+bits.
140+
141+Generating a hsiphash key
142+=========================
133143
134144 Keys should always be generated from a cryptographically secure source of
135−random numbers, either using get_random_bytes or get_random_once:
145+random numbers, either using get_random_bytes or get_random_once::
136146
137−hsiphash_key_t key;
138−get_random_bytes(&key, sizeof(key));
147+ hsiphash_key_t key;
148+ get_random_bytes(&key, sizeof(key));
139149
140150 If you're not deriving your key from here, you're doing it wrong.
141151
142−Using the HalfSipHash functions
143−===============================
152+Using the hsiphash functions
153+============================
144154
145155 There are two variants of the function, one that takes a list of integers, and
146156 one that takes a buffer::
@@ -183,7 +193,7 @@ You may then iterate like usual over the returned hash bucket. · 36 unmodified lines
183193 Performance
184194 ===========
185195
186−HalfSipHash is roughly 3 times slower than JenkinsHash. For many replacements,
187−this will not be a problem, as the hashtable lookup isn't the bottleneck. And
188−in general, this is probably a good sacrifice to make for the security and DoS
189−resistance of HalfSipHash.
196+hsiphash() is roughly 3 times slower than jhash(). For many replacements, this
197+will not be a problem, as the hashtable lookup isn't the bottleneck. And in
198+general, this is probably a good sacrifice to make for the security and DoS
199+resistance of hsiphash().
Documentation/virt/kvm/api.rst+18−7
@@ -5986,16 +5986,16 @@ should put the acknowledged interrupt vector into the 'epr' field. · 5985 unmodified lines
59865986 #define KVM_SYSTEM_EVENT_RESET 2
59875987 #define KVM_SYSTEM_EVENT_CRASH 3
59885988 __u32 type;
5989− __u64 flags;
5989+ __u32 ndata;
5990+ __u64 data[16];
59905991 } system_event;
59915992
59925993 If exit_reason is KVM_EXIT_SYSTEM_EVENT then the vcpu has triggered
59935994 a system-level event using some architecture specific mechanism (hypercall
59945995 or some special instruction). In case of ARM64, this is triggered using
5995−HVC instruction based PSCI call from the vcpu. The 'type' field describes
5996−the system-level event type. The 'flags' field describes architecture
5997−specific flags for the system-level event.
5996+HVC instruction based PSCI call from the vcpu.
59985997
5998+The 'type' field describes the system-level event type.
59995999 Valid values for 'type' are:
60006000
60016001 - KVM_SYSTEM_EVENT_SHUTDOWN -- the guest has requested a shutdown of the
@@ -6010,10 +6010,20 @@ Valid values for 'type' are: · 8 unmodified lines
60106010 to ignore the request, or to gather VM memory core dump and/or
60116011 reset/shutdown of the VM.
60126012
6013−Valid flags are:
6013+If KVM_CAP_SYSTEM_EVENT_DATA is present, the 'data' field can contain
6014+architecture specific information for the system-level event. Only
6015+the first `ndata` items (possibly zero) of the data array are valid.
60146016
6015− - KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 (arm64 only) -- the guest issued
6016− a SYSTEM_RESET2 call according to v1.1 of the PSCI specification.
6017+ - for arm64, data[0] is set to KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 if
6018+ the guest issued a SYSTEM_RESET2 call according to v1.1 of the PSCI
6019+ specification.
6020+
6021+ - for RISC-V, data[0] is set to the value of the second argument of the
6022+ ``sbi_system_reset`` call.
6023+
6024+Previous versions of Linux defined a `flags` member in this struct. The
6025+field is now aliased to `data[0]`. Userspace can assume that it is only
6026+written if ndata is greater than 0.
60176027
60186028 ::
60196029
@@ -6190,6 +6200,7 @@ Valid values for 'type' are: · 170 unmodified lines
61906200 unsigned long args[6];
61916201 unsigned long ret[2];
61926202 } riscv_sbi;
6203+
61936204 If exit reason is KVM_EXIT_RISCV_SBI then it indicates that the VCPU has
61946205 done a SBI call which is not handled by KVM RISC-V kernel module. The details
61956206 of the SBI call are available in 'riscv_sbi' member of kvm_run structure. The
Documentation/virt/kvm/vcpu-requests.rst+2−0
@@ -1,3 +1,5 @@
1+.. SPDX-License-Identifier: GPL-2.0
2+
13 =================
24 KVM VCPU Requests
35 =================
Documentation/virt/kvm/x86/amd-memory-encryption.rst+2−0
@@ -1,3 +1,5 @@
1+.. SPDX-License-Identifier: GPL-2.0
2+
13 ======================================
24 Secure Encrypted Virtualization (SEV)
35 ======================================
Documentation/virt/kvm/x86/errata.rst+1−1
@@ -1,3 +1,4 @@
1+.. SPDX-License-Identifier: GPL-2.0
12
23 =======================================
34 Known limitations of CPU virtualization
@@ -36,4 +37,3 @@ Nested virtualization features · 32 unmodified lines
3637 ------------------------------
3738
3839 TBD
39−
Documentation/virt/kvm/x86/running-nested-guests.rst+2−0
@@ -1,3 +1,5 @@
1+.. SPDX-License-Identifier: GPL-2.0
2+
13 ==============================
24 Running nested guests with KVM
35 ==============================
Documentation/vm/page_owner.rst+3−2
@@ -110,7 +110,7 @@ Usage · 109 unmodified lines
110110 If you want to sort by the page nums of buf, use the ``-m`` parameter.
111111 The detailed parameters are:
112112
113− fundamental function:
113+ fundamental function::
114114
115115 Sort:
116116 -a Sort by memory allocation time.
@@ -122,7 +122,7 @@ Usage · 5 unmodified lines
122122 -s Sort by stack trace.
123123 -t Sort by times (default).
124124
125− additional function:
125+ additional function::
126126
127127 Cull:
128128 --cull <rules>
@@ -153,6 +153,7 @@ Usage · 24 unmodified lines
153153
154154 STANDARD FORMAT SPECIFIERS
155155 ==========================
156+::
156157
157158 KEY LONG DESCRIPTION
158159 p pid process ID
MAINTAINERS+76−59
@@ -201,6 +201,7 @@ F: include/net/ieee80211_radiotap.h · 200 unmodified lines
201201 F: include/net/iw_handler.h
202202 F: include/net/wext.h
203203 F: include/uapi/linux/nl80211.h
204+F: include/uapi/linux/wireless.h
204205 F: net/wireless/
205206
206207 8169 10/100/1000 GIGABIT ETHERNET DRIVER
@@ -2636,13 +2637,14 @@ F: sound/soc/rockchip/ · 2429 unmodified lines
26362637 N: rockchip
26372638
26382639 ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES
2639−M: Krzysztof Kozlowski <krzk@kernel.org>
2640+M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
26402641 R: Alim Akhtar <alim.akhtar@samsung.com>
26412642 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
26422643 L: linux-samsung-soc@vger.kernel.org
26432644 S: Maintained
26442645 C: irc://irc.libera.chat/linux-exynos
26452646 Q: https://patchwork.kernel.org/project/linux-samsung-soc/list/
2647+B: mailto:linux-samsung-soc@vger.kernel.org
26462648 T: git git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git
26472649 F: Documentation/arm/samsung/
26482650 F: Documentation/devicetree/bindings/arm/samsung/
@@ -3742,7 +3744,7 @@ F: include/linux/platform_data/b53.h · 1093 unmodified lines
37423744
37433745 BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE
37443746 M: Nicolas Saenz Julienne <nsaenz@kernel.org>
3745−L: bcm-kernel-feedback-list@broadcom.com
3747+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
37463748 L: linux-rpi-kernel@lists.infradead.org (moderated for non-subscribers)
37473749 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
37483750 S: Maintained
@@ -3757,7 +3759,7 @@ BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITECTURE · 8 unmodified lines
37573759 M: Florian Fainelli <f.fainelli@gmail.com>
37583760 M: Ray Jui <rjui@broadcom.com>
37593761 M: Scott Branden <sbranden@broadcom.com>
3760−M: bcm-kernel-feedback-list@broadcom.com
3762+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
37613763 S: Maintained
37623764 T: git git://github.com/broadcom/mach-bcm
37633765 F: arch/arm/mach-bcm/
@@ -3777,7 +3779,7 @@ F: arch/mips/include/asm/mach-bcm47xx/* · 13 unmodified lines
37773779
37783780 BROADCOM BCM4908 ETHERNET DRIVER
37793781 M: Rafał Miłecki <rafal@milecki.pl>
3780−M: bcm-kernel-feedback-list@broadcom.com
3782+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
37813783 L: netdev@vger.kernel.org
37823784 S: Maintained
37833785 F: Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml
@@ -3786,7 +3788,7 @@ F: drivers/net/ethernet/broadcom/unimac.h · 2 unmodified lines
37863788
37873789 BROADCOM BCM4908 PINMUX DRIVER
37883790 M: Rafał Miłecki <rafal@milecki.pl>
3789−M: bcm-kernel-feedback-list@broadcom.com
3791+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
37903792 L: linux-gpio@vger.kernel.org
37913793 S: Maintained
37923794 F: Documentation/devicetree/bindings/pinctrl/brcm,bcm4908-pinctrl.yaml
@@ -3796,7 +3798,7 @@ BROADCOM BCM5301X ARM ARCHITECTURE · 3 unmodified lines
37963798 M: Florian Fainelli <f.fainelli@gmail.com>
37973799 M: Hauke Mehrtens <hauke@hauke-m.de>
37983800 M: Rafał Miłecki <zajec5@gmail.com>
3799−M: bcm-kernel-feedback-list@broadcom.com
3801+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
38003802 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
38013803 S: Maintained
38023804 F: arch/arm/boot/dts/bcm470*
@@ -3807,7 +3809,7 @@ F: arch/arm/mach-bcm/bcm_5301x.c · 4 unmodified lines
38073809 BROADCOM BCM53573 ARM ARCHITECTURE
38083810 M: Florian Fainelli <f.fainelli@gmail.com>
38093811 M: Rafał Miłecki <rafal@milecki.pl>
3810−L: bcm-kernel-feedback-list@broadcom.com
3812+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
38113813 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
38123814 S: Maintained
38133815 F: arch/arm/boot/dts/bcm47189*
@@ -3815,7 +3817,7 @@ F: arch/arm/boot/dts/bcm53573* · 1 unmodified line
38153817
38163818 BROADCOM BCM63XX ARM ARCHITECTURE
38173819 M: Florian Fainelli <f.fainelli@gmail.com>
3818−M: bcm-kernel-feedback-list@broadcom.com
3820+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
38193821 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
38203822 S: Maintained
38213823 T: git git://github.com/broadcom/stblinux.git
@@ -3829,7 +3831,7 @@ F: drivers/usb/gadget/udc/bcm63xx_udc.* · 7 unmodified lines
38293831
38303832 BROADCOM BCM7XXX ARM ARCHITECTURE
38313833 M: Florian Fainelli <f.fainelli@gmail.com>
3832−M: bcm-kernel-feedback-list@broadcom.com
3834+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
38333835 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
38343836 S: Maintained
38353837 T: git git://github.com/broadcom/stblinux.git
@@ -3847,21 +3849,21 @@ N: bcm7120 · 11 unmodified lines
38473849 BROADCOM BDC DRIVER
38483850 M: Al Cooper <alcooperx@gmail.com>
38493851 L: linux-usb@vger.kernel.org
3850−L: bcm-kernel-feedback-list@broadcom.com
3852+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
38513853 S: Maintained
38523854 F: Documentation/devicetree/bindings/usb/brcm,bdc.yaml
38533855 F: drivers/usb/gadget/udc/bdc/
38543856
38553857 BROADCOM BMIPS CPUFREQ DRIVER
38563858 M: Markus Mayer <mmayer@broadcom.com>
3857−M: bcm-kernel-feedback-list@broadcom.com
3859+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
38583860 L: linux-pm@vger.kernel.org
38593861 S: Maintained
38603862 F: drivers/cpufreq/bmips-cpufreq.c
38613863
38623864 BROADCOM BMIPS MIPS ARCHITECTURE
38633865 M: Florian Fainelli <f.fainelli@gmail.com>
3864−L: bcm-kernel-feedback-list@broadcom.com
3866+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
38653867 L: linux-mips@vger.kernel.org
38663868 S: Maintained
38673869 T: git git://github.com/broadcom/stblinux.git
@@ -3912,7 +3914,9 @@ BROADCOM BNXT_EN 50 GIGABIT ETHERNET DRIVER · 44 unmodified lines
39123914 M: Michael Chan <michael.chan@broadcom.com>
39133915 L: netdev@vger.kernel.org
39143916 S: Supported
3917+F: drivers/firmware/broadcom/tee_bnxt_fw.c
39153918 F: drivers/net/ethernet/broadcom/bnxt/
3919+F: include/linux/firmware/broadcom/tee_bnxt_fw.h
39163920
39173921 BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER
39183922 M: Arend van Spriel <aspriel@gmail.com>
@@ -3927,53 +3931,53 @@ F: drivers/net/wireless/broadcom/brcm80211/ · 8 unmodified lines
39273931 BROADCOM BRCMSTB GPIO DRIVER
39283932 M: Doug Berger <opendmb@gmail.com>
39293933 M: Florian Fainelli <f.fainelli@gmail.com>
3930−L: bcm-kernel-feedback-list@broadcom.com
3934+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
39313935 S: Supported
39323936 F: Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.yaml
39333937 F: drivers/gpio/gpio-brcmstb.c
39343938
39353939 BROADCOM BRCMSTB I2C DRIVER
39363940 M: Kamal Dasu <kdasu.kdev@gmail.com>
3941+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
39373942 L: linux-i2c@vger.kernel.org
3938−L: bcm-kernel-feedback-list@broadcom.com
39393943 S: Supported
39403944 F: Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml
39413945 F: drivers/i2c/busses/i2c-brcmstb.c
39423946
39433947 BROADCOM BRCMSTB UART DRIVER
39443948 M: Al Cooper <alcooperx@gmail.com>
3949+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
39453950 L: linux-serial@vger.kernel.org
3946−L: bcm-kernel-feedback-list@broadcom.com
39473951 S: Maintained
39483952 F: Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml
39493953 F: drivers/tty/serial/8250/8250_bcm7271.c
39503954
39513955 BROADCOM BRCMSTB USB EHCI DRIVER
39523956 M: Al Cooper <alcooperx@gmail.com>
3957+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
39533958 L: linux-usb@vger.kernel.org
3954−L: bcm-kernel-feedback-list@broadcom.com
39553959 S: Maintained
39563960 F: Documentation/devicetree/bindings/usb/brcm,bcm7445-ehci.yaml
39573961 F: drivers/usb/host/ehci-brcm.*
39583962
39593963 BROADCOM BRCMSTB USB PIN MAP DRIVER
39603964 M: Al Cooper <alcooperx@gmail.com>
3965+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
39613966 L: linux-usb@vger.kernel.org
3962−L: bcm-kernel-feedback-list@broadcom.com
39633967 S: Maintained
39643968 F: Documentation/devicetree/bindings/usb/brcm,usb-pinmap.yaml
39653969 F: drivers/usb/misc/brcmstb-usb-pinmap.c
39663970
39673971 BROADCOM BRCMSTB USB2 and USB3 PHY DRIVER
39683972 M: Al Cooper <alcooperx@gmail.com>
3973+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
39693974 L: linux-kernel@vger.kernel.org
3970−L: bcm-kernel-feedback-list@broadcom.com
39713975 S: Maintained
39723976 F: drivers/phy/broadcom/phy-brcm-usb*
39733977
39743978 BROADCOM ETHERNET PHY DRIVERS
39753979 M: Florian Fainelli <f.fainelli@gmail.com>
3976−L: bcm-kernel-feedback-list@broadcom.com
3980+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
39773981 L: netdev@vger.kernel.org
39783982 S: Supported
39793983 F: Documentation/devicetree/bindings/net/broadcom-bcm87xx.txt
@@ -3984,7 +3988,7 @@ F: include/linux/brcmphy.h · 4 unmodified lines
39843988 BROADCOM GENET ETHERNET DRIVER
39853989 M: Doug Berger <opendmb@gmail.com>
39863990 M: Florian Fainelli <f.fainelli@gmail.com>
3987−L: bcm-kernel-feedback-list@broadcom.com
3991+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
39883992 L: netdev@vger.kernel.org
39893993 S: Supported
39903994 F: Documentation/devicetree/bindings/net/brcm,bcmgenet.yaml
@@ -3998,7 +4002,7 @@ F: include/linux/platform_data/mdio-bcm-unimac.h · 7 unmodified lines
39984002 BROADCOM IPROC ARM ARCHITECTURE
39994003 M: Ray Jui <rjui@broadcom.com>
40004004 M: Scott Branden <sbranden@broadcom.com>
4001−M: bcm-kernel-feedback-list@broadcom.com
4005+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
40024006 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
40034007 S: Maintained
40044008 T: git git://github.com/broadcom/stblinux.git
@@ -4026,7 +4030,7 @@ N: stingray · 21 unmodified lines
40264030
40274031 BROADCOM IPROC GBIT ETHERNET DRIVER
40284032 M: Rafał Miłecki <rafal@milecki.pl>
4029−M: bcm-kernel-feedback-list@broadcom.com
4033+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
40304034 L: netdev@vger.kernel.org
40314035 S: Maintained
40324036 F: Documentation/devicetree/bindings/net/brcm,amac.yaml
@@ -4035,7 +4039,7 @@ F: drivers/net/ethernet/broadcom/unimac.h · 2 unmodified lines
40354039
40364040 BROADCOM KONA GPIO DRIVER
40374041 M: Ray Jui <rjui@broadcom.com>
4038−L: bcm-kernel-feedback-list@broadcom.com
4042+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
40394043 S: Supported
40404044 F: Documentation/devicetree/bindings/gpio/brcm,kona-gpio.txt
40414045 F: drivers/gpio/gpio-bcm-kona.c
@@ -4068,7 +4072,7 @@ F: drivers/firmware/broadcom/* · 26 unmodified lines
40684072 BROADCOM PMB (POWER MANAGEMENT BUS) DRIVER
40694073 M: Rafał Miłecki <rafal@milecki.pl>
40704074 M: Florian Fainelli <f.fainelli@gmail.com>
4071−M: bcm-kernel-feedback-list@broadcom.com
4075+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
40724076 L: linux-pm@vger.kernel.org
40734077 S: Maintained
40744078 T: git git://github.com/broadcom/stblinux.git
@@ -4084,7 +4088,7 @@ F: include/linux/bcma/ · 9 unmodified lines
40844088
40854089 BROADCOM SPI DRIVER
40864090 M: Kamal Dasu <kdasu.kdev@gmail.com>
4087−M: bcm-kernel-feedback-list@broadcom.com
4091+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
40884092 S: Maintained
40894093 F: Documentation/devicetree/bindings/spi/brcm,spi-bcm-qspi.yaml
40904094 F: drivers/spi/spi-bcm-qspi.*
@@ -4093,7 +4097,7 @@ F: drivers/spi/spi-iproc-qspi.c · 2 unmodified lines
40934097
40944098 BROADCOM STB AVS CPUFREQ DRIVER
40954099 M: Markus Mayer <mmayer@broadcom.com>
4096−M: bcm-kernel-feedback-list@broadcom.com
4100+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
40974101 L: linux-pm@vger.kernel.org
40984102 S: Maintained
40994103 F: Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt
@@ -4101,7 +4105,7 @@ F: drivers/cpufreq/brcmstb* · 1 unmodified line
41014105
41024106 BROADCOM STB AVS TMON DRIVER
41034107 M: Markus Mayer <mmayer@broadcom.com>
4104−M: bcm-kernel-feedback-list@broadcom.com
4108+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
41054109 L: linux-pm@vger.kernel.org
41064110 S: Maintained
41074111 F: Documentation/devicetree/bindings/thermal/brcm,avs-tmon.yaml
@@ -4109,7 +4113,7 @@ F: drivers/thermal/broadcom/brcmstb* · 1 unmodified line
41094113
41104114 BROADCOM STB DPFE DRIVER
41114115 M: Markus Mayer <mmayer@broadcom.com>
4112−M: bcm-kernel-feedback-list@broadcom.com
4116+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
41134117 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
41144118 S: Maintained
41154119 F: Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.yaml
@@ -4118,8 +4122,8 @@ F: drivers/memory/brcmstb_dpfe.c · 2 unmodified lines
41184122 BROADCOM STB NAND FLASH DRIVER
41194123 M: Brian Norris <computersforpeace@gmail.com>
41204124 M: Kamal Dasu <kdasu.kdev@gmail.com>
4125+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
41214126 L: linux-mtd@lists.infradead.org
4122−L: bcm-kernel-feedback-list@broadcom.com
41234127 S: Maintained
41244128 F: drivers/mtd/nand/raw/brcmnand/
41254129 F: include/linux/platform_data/brcmnand.h
@@ -4128,7 +4132,7 @@ BROADCOM STB PCIE DRIVER · 2 unmodified lines
41284132 M: Jim Quinlan <jim2101024@gmail.com>
41294133 M: Nicolas Saenz Julienne <nsaenz@kernel.org>
41304134 M: Florian Fainelli <f.fainelli@gmail.com>
4131−M: bcm-kernel-feedback-list@broadcom.com
4135+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
41324136 L: linux-pci@vger.kernel.org
41334137 S: Maintained
41344138 F: Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
@@ -4136,7 +4140,7 @@ F: drivers/pci/controller/pcie-brcmstb.c · 1 unmodified line
41364140
41374141 BROADCOM SYSTEMPORT ETHERNET DRIVER
41384142 M: Florian Fainelli <f.fainelli@gmail.com>
4139−L: bcm-kernel-feedback-list@broadcom.com
4143+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
41404144 L: netdev@vger.kernel.org
41414145 S: Supported
41424146 F: drivers/net/ethernet/broadcom/bcmsysport.*
@@ -4153,7 +4157,7 @@ F: drivers/net/ethernet/broadcom/tg3.* · 10 unmodified lines
41534157
41544158 BROADCOM VK DRIVER
41554159 M: Scott Branden <scott.branden@broadcom.com>
4156−L: bcm-kernel-feedback-list@broadcom.com
4160+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
41574161 S: Supported
41584162 F: drivers/misc/bcm-vk/
41594163 F: include/uapi/linux/misc/bcm_vk.h
@@ -9336,14 +9340,12 @@ F: drivers/pci/hotplug/rpaphp* · 5176 unmodified lines
93369340
93379341 IBM Power SRIOV Virtual NIC Device Driver
93389342 M: Dany Madden <drt@linux.ibm.com>
9339−M: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
93409343 R: Thomas Falcon <tlfalcon@linux.ibm.com>
93419344 L: netdev@vger.kernel.org
93429345 S: Supported
93439346 F: drivers/net/ethernet/ibm/ibmvnic.*
93449347
93459348 IBM Power Virtual Accelerator Switchboard
9346−M: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
93479349 L: linuxppc-dev@lists.ozlabs.org
93489350 S: Supported
93499351 F: arch/powerpc/include/asm/vas.h
@@ -10238,8 +10240,6 @@ F: drivers/net/ethernet/sgi/ioc3-eth.c · 888 unmodified lines
1023810240 IOMAP FILESYSTEM LIBRARY
1023910241 M: Christoph Hellwig <hch@infradead.org>
1024010242 M: Darrick J. Wong <djwong@kernel.org>
10241−M: linux-xfs@vger.kernel.org
10242−M: linux-fsdevel@vger.kernel.org
1024310243 L: linux-xfs@vger.kernel.org
1024410244 L: linux-fsdevel@vger.kernel.org
1024510245 S: Supported
@@ -10370,6 +10370,7 @@ F: include/linux/isapnp.h · 124 unmodified lines
1037010370 ISCSI
1037110371 M: Lee Duncan <lduncan@suse.com>
1037210372 M: Chris Leech <cleech@redhat.com>
10373+M: Mike Christie <michael.christie@oracle.com>
1037310374 L: open-iscsi@googlegroups.com
1037410375 L: linux-scsi@vger.kernel.org
1037510376 S: Maintained
@@ -10547,6 +10548,7 @@ M: Andrey Ryabinin <ryabinin.a.a@gmail.com> · 171 unmodified lines
1054710548 R: Alexander Potapenko <glider@google.com>
1054810549 R: Andrey Konovalov <andreyknvl@gmail.com>
1054910550 R: Dmitry Vyukov <dvyukov@google.com>
10551+R: Vincenzo Frascino <vincenzo.frascino@arm.com>
1055010552 L: kasan-dev@googlegroups.com
1055110553 S: Maintained
1055210554 F: Documentation/dev-tools/kasan.rst
@@ -11906,7 +11908,7 @@ F: drivers/iio/proximity/mb1232.c · 1353 unmodified lines
1190611908
1190711909 MAXIM MAX17040 FAMILY FUEL GAUGE DRIVERS
1190811910 R: Iskren Chernev <iskren.chernev@gmail.com>
11909−R: Krzysztof Kozlowski <krzk@kernel.org>
11911+R: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1191011912 R: Marek Szyprowski <m.szyprowski@samsung.com>
1191111913 R: Matheus Castello <matheus@castello.eng.br>
1191211914 L: linux-pm@vger.kernel.org
@@ -11916,7 +11918,7 @@ F: drivers/power/supply/max17040_battery.c · 3 unmodified lines
1191611918
1191711919 MAXIM MAX17042 FAMILY FUEL GAUGE DRIVERS
1191811920 R: Hans de Goede <hdegoede@redhat.com>
11919−R: Krzysztof Kozlowski <krzk@kernel.org>
11921+R: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1192011922 R: Marek Szyprowski <m.szyprowski@samsung.com>
1192111923 R: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
1192211924 R: Purism Kernel Team <kernel@puri.sm>
@@ -11968,10 +11970,11 @@ F: Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml · 45 unmodified lines
1196811970 F: drivers/power/supply/max77976_charger.c
1196911971
1197011972 MAXIM MUIC CHARGER DRIVERS FOR EXYNOS BASED BOARDS
11971−M: Krzysztof Kozlowski <krzk@kernel.org>
11973+M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1197211974 M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
1197311975 L: linux-pm@vger.kernel.org
1197411976 S: Supported
11977+B: mailto:linux-samsung-soc@vger.kernel.org
1197511978 F: Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml
1197611979 F: Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml
1197711980 F: drivers/power/supply/max14577_charger.c
@@ -11979,10 +11982,11 @@ F: drivers/power/supply/max77693_charger.c · 1 unmodified line
1197911982
1198011983 MAXIM PMIC AND MUIC DRIVERS FOR EXYNOS BASED BOARDS
1198111984 M: Chanwoo Choi <cw00.choi@samsung.com>
11982−M: Krzysztof Kozlowski <krzk@kernel.org>
11985+M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1198311986 M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
1198411987 L: linux-kernel@vger.kernel.org
1198511988 S: Supported
11989+B: mailto:linux-samsung-soc@vger.kernel.org
1198611990 F: Documentation/devicetree/bindings/*/maxim,max14577.yaml
1198711991 F: Documentation/devicetree/bindings/*/maxim,max77686.yaml
1198811992 F: Documentation/devicetree/bindings/*/maxim,max77693.yaml
@@ -12402,7 +12406,7 @@ F: drivers/mmc/host/mtk-sd.c · 413 unmodified lines
1240212406
1240312407 MEDIATEK MT76 WIRELESS LAN DRIVER
1240412408 M: Felix Fietkau <nbd@nbd.name>
12405−M: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
12409+M: Lorenzo Bianconi <lorenzo@kernel.org>
1240612410 M: Ryder Lee <ryder.lee@mediatek.com>
1240712411 R: Shayne Chen <shayne.chen@mediatek.com>
1240812412 R: Sean Wang <sean.wang@mediatek.com>
@@ -12673,9 +12677,10 @@ F: mm/memblock.c · 264 unmodified lines
1267312677 F: tools/testing/memblock/
1267412678
1267512679 MEMORY CONTROLLER DRIVERS
12676−M: Krzysztof Kozlowski <krzk@kernel.org>
12680+M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1267712681 L: linux-kernel@vger.kernel.org
1267812682 S: Maintained
12683+B: mailto:krzysztof.kozlowski@linaro.org
1267912684 T: git git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl.git
1268012685 F: Documentation/devicetree/bindings/memory-controllers/
1268112686 F: drivers/memory/
@@ -13624,6 +13629,7 @@ F: net/core/drop_monitor.c · 942 unmodified lines
1362413629
1362513630 NETWORKING DRIVERS
1362613631 M: "David S. Miller" <davem@davemloft.net>
13632+M: Eric Dumazet <edumazet@google.com>
1362713633 M: Jakub Kicinski <kuba@kernel.org>
1362813634 M: Paolo Abeni <pabeni@redhat.com>
1362913635 L: netdev@vger.kernel.org
@@ -13671,6 +13677,7 @@ F: tools/testing/selftests/drivers/net/dsa/ · 41 unmodified lines
1367113677
1367213678 NETWORKING [GENERAL]
1367313679 M: "David S. Miller" <davem@davemloft.net>
13680+M: Eric Dumazet <edumazet@google.com>
1367413681 M: Jakub Kicinski <kuba@kernel.org>
1367513682 M: Paolo Abeni <pabeni@redhat.com>
1367613683 L: netdev@vger.kernel.org
@@ -13817,10 +13824,11 @@ F: include/uapi/linux/nexthop.h · 140 unmodified lines
1381713824 F: net/ipv4/nexthop.c
1381813825
1381913826 NFC SUBSYSTEM
13820−M: Krzysztof Kozlowski <krzk@kernel.org>
13827+M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1382113828 L: linux-nfc@lists.01.org (subscribers-only)
1382213829 L: netdev@vger.kernel.org
1382313830 S: Maintained
13831+B: mailto:linux-nfc@lists.01.org
1382413832 F: Documentation/devicetree/bindings/net/nfc/
1382513833 F: drivers/nfc/
1382613834 F: include/linux/platform_data/nfcmrvl.h
@@ -14134,7 +14142,7 @@ F: Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml · 307 unmodified lines
1413414142 F: drivers/regulator/pf8x00-regulator.c
1413514143
1413614144 NXP PTN5150A CC LOGIC AND EXTCON DRIVER
14137−M: Krzysztof Kozlowski <krzk@kernel.org>
14145+M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1413814146 L: linux-kernel@vger.kernel.org
1413914147 S: Maintained
1414014148 F: Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
@@ -14687,7 +14695,7 @@ F: scripts/dtc/ · 546 unmodified lines
1468714695
1468814696 OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
1468914697 M: Rob Herring <robh+dt@kernel.org>
14690−M: Krzysztof Kozlowski <krzk+dt@kernel.org>
14698+M: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
1469114699 L: devicetree@vger.kernel.org
1469214700 S: Maintained
1469314701 C: irc://irc.libera.chat/devicetree
@@ -15599,7 +15607,7 @@ F: drivers/pinctrl/renesas/ · 905 unmodified lines
1559915607
1560015608 PIN CONTROLLER - SAMSUNG
1560115609 M: Tomasz Figa <tomasz.figa@gmail.com>
15602−M: Krzysztof Kozlowski <krzk@kernel.org>
15610+M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1560315611 M: Sylwester Nawrocki <s.nawrocki@samsung.com>
1560415612 R: Alim Akhtar <alim.akhtar@samsung.com>
1560515613 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@ -15607,6 +15615,7 @@ L: linux-samsung-soc@vger.kernel.org · 1 unmodified line
1560715615 S: Maintained
1560815616 C: irc://irc.libera.chat/linux-exynos
1560915617 Q: https://patchwork.kernel.org/project/linux-samsung-soc/list/
15618+B: mailto:linux-samsung-soc@vger.kernel.org
1561015619 T: git git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung.git
1561115620 F: Documentation/devicetree/bindings/pinctrl/samsung,pinctrl*yaml
1561215621 F: drivers/pinctrl/samsung/
@@ -17274,7 +17283,7 @@ W: http://www.ibm.com/developerworks/linux/linux390/ · 1661 unmodified lines
1727417283 F: drivers/s390/scsi/zfcp_*
1727517284
1727617285 S3C ADC BATTERY DRIVER
17277−M: Krzysztof Kozlowski <krzk@kernel.org>
17286+M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1727817287 L: linux-samsung-soc@vger.kernel.org
1727917288 S: Odd Fixes
1728017289 F: drivers/power/supply/s3c_adc_battery.c
@@ -17319,15 +17328,16 @@ F: Documentation/admin-guide/LSM/SafeSetID.rst · 38 unmodified lines
1731917328 F: security/safesetid/
1732017329
1732117330 SAMSUNG AUDIO (ASoC) DRIVERS
17322−M: Krzysztof Kozlowski <krzk@kernel.org>
17331+M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1732317332 M: Sylwester Nawrocki <s.nawrocki@samsung.com>
1732417333 L: alsa-devel@alsa-project.org (moderated for non-subscribers)
1732517334 S: Supported
17335+B: mailto:linux-samsung-soc@vger.kernel.org
1732617336 F: Documentation/devicetree/bindings/sound/samsung*
1732717337 F: sound/soc/samsung/
1732817338
1732917339 SAMSUNG EXYNOS PSEUDO RANDOM NUMBER GENERATOR (RNG) DRIVER
17330−M: Krzysztof Kozlowski <krzk@kernel.org>
17340+M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1733117341 L: linux-crypto@vger.kernel.org
1733217342 L: linux-samsung-soc@vger.kernel.org
1733317343 S: Maintained
@@ -17362,11 +17372,12 @@ S: Maintained · 28 unmodified lines
1736217372 F: drivers/platform/x86/samsung-laptop.c
1736317373
1736417374 SAMSUNG MULTIFUNCTION PMIC DEVICE DRIVERS
17365−M: Krzysztof Kozlowski <krzk@kernel.org>
17375+M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1736617376 M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
1736717377 L: linux-kernel@vger.kernel.org
1736817378 L: linux-samsung-soc@vger.kernel.org
1736917379 S: Supported
17380+B: mailto:linux-samsung-soc@vger.kernel.org
1737017381 F: Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml
1737117382 F: Documentation/devicetree/bindings/mfd/samsung,s2m*.yaml
1737217383 F: Documentation/devicetree/bindings/mfd/samsung,s5m*.yaml
@@ -17388,7 +17399,7 @@ F: drivers/media/platform/samsung/s3c-camif/ · 15 unmodified lines
1738817399 F: include/media/drv-intf/s3c_camif.h
1738917400
1739017401 SAMSUNG S3FWRN5 NFC DRIVER
17391−M: Krzysztof Kozlowski <krzk@kernel.org>
17402+M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1739217403 M: Krzysztof Opasiak <k.opasiak@samsung.com>
1739317404 L: linux-nfc@lists.01.org (subscribers-only)
1739417405 S: Maintained
@@ -17410,7 +17421,7 @@ S: Supported · 15 unmodified lines
1741017421 F: drivers/media/i2c/s5k5baf.c
1741117422
1741217423 SAMSUNG S5P Security SubSystem (SSS) DRIVER
17413−M: Krzysztof Kozlowski <krzk@kernel.org>
17424+M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1741417425 M: Vladimir Zapolskiy <vz@mleia.com>
1741517426 L: linux-crypto@vger.kernel.org
1741617427 L: linux-samsung-soc@vger.kernel.org
@@ -17445,7 +17456,7 @@ F: include/linux/clk/samsung.h · 28 unmodified lines
1744517456 F: include/linux/platform_data/clk-s3c2410.h
1744617457
1744717458 SAMSUNG SPI DRIVERS
17448−M: Krzysztof Kozlowski <krzk@kernel.org>
17459+M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1744917460 M: Andi Shyti <andi@etezian.org>
1745017461 L: linux-spi@vger.kernel.org
1745117462 L: linux-samsung-soc@vger.kernel.org
@@ -17463,7 +17474,7 @@ F: drivers/net/ethernet/samsung/sxgbe/ · 11 unmodified lines
1746317474
1746417475 SAMSUNG THERMAL DRIVER
1746517476 M: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17466−M: Krzysztof Kozlowski <krzk@kernel.org>
17477+M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1746717478 L: linux-pm@vger.kernel.org
1746817479 L: linux-samsung-soc@vger.kernel.org
1746917480 S: Maintained
@@ -17647,8 +17658,8 @@ K: \bTIF_SECCOMP\b · 177 unmodified lines
1764717658
1764817659 SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) Broadcom BRCMSTB DRIVER
1764917660 M: Al Cooper <alcooperx@gmail.com>
17661+R: Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>
1765017662 L: linux-mmc@vger.kernel.org
17651−L: bcm-kernel-feedback-list@broadcom.com
1765217663 S: Maintained
1765317664 F: drivers/mmc/host/sdhci-brcmstb*
1765417665
@@ -21227,10 +21238,8 @@ S: Maintained · 3572 unmodified lines
2122721238 F: drivers/hid/hid-wiimote*
2122821239
2122921240 WILOCITY WIL6210 WIRELESS DRIVER
21230−M: Maya Erez <merez@codeaurora.org>
2123121241 L: linux-wireless@vger.kernel.org
21232−L: wil6210@qti.qualcomm.com
21233−S: Supported
21242+S: Orphan
2123421243 W: https://wireless.wiki.kernel.org/en/users/Drivers/wil6210
2123521244 F: drivers/net/wireless/ath/wil6210/
2123621245
@@ -21434,6 +21443,15 @@ F: arch/x86/include/asm/uv/ · 197 unmodified lines
2143421443 F: arch/x86/kernel/apic/x2apic_uv_x.c
2143521444 F: arch/x86/platform/uv/
2143621445
21446+X86 STACK UNWINDING
21447+M: Josh Poimboeuf <jpoimboe@redhat.com>
21448+M: Peter Zijlstra <peterz@infradead.org>
21449+S: Supported
21450+F: arch/x86/include/asm/unwind*.h
21451+F: arch/x86/kernel/dumpstack.c
21452+F: arch/x86/kernel/stacktrace.c
21453+F: arch/x86/kernel/unwind_*.c
21454+
2143721455 X86 VDSO
2143821456 M: Andy Lutomirski <luto@kernel.org>
2143921457 L: linux-kernel@vger.kernel.org
@@ -21596,7 +21614,6 @@ F: drivers/xen/*swiotlb* · 156 unmodified lines
2159621614 XFS FILESYSTEM
2159721615 C: irc://irc.oftc.net/xfs
2159821616 M: Darrick J. Wong <djwong@kernel.org>
21599−M: linux-xfs@vger.kernel.org
2160021617 L: linux-xfs@vger.kernel.org
2160121618 S: Supported
2160221619 W: http://xfs.org/
Makefile+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 VERSION = 5
33 PATCHLEVEL = 18
44 SUBLEVEL = 0
5−EXTRAVERSION = -rc2
5+EXTRAVERSION = -rc5
66 NAME = Superb Owl
77
88 # *DOCUMENTATION*
arch/Kconfig+2−4
@@ -854,10 +854,8 @@ config HAVE_ARCH_HUGE_VMAP · 853 unmodified lines
854854
855855 #
856856 # Archs that select this would be capable of PMD-sized vmaps (i.e.,
857−# arch_vmap_pmd_supported() returns true), and they must make no assumptions
858−# that vmalloc memory is mapped with PAGE_SIZE ptes. The VM_NO_HUGE_VMAP flag
859−# can be used to prohibit arch-specific allocations from using hugepages to
860−# help with this (e.g., modules may require it).
857+# arch_vmap_pmd_supported() returns true). The VM_ALLOW_HUGE_VMAP flag
858+# must be used to enable allocations to use hugepages.
861859 #
862860 config HAVE_ARCH_HUGE_VMALLOC
863861 depends on HAVE_ARCH_HUGE_VMAP
arch/arc/boot/dts/hsdk.dts+1−1
@@ -275,7 +275,7 @@ · 274 unmodified lines
275275 cs-gpios = <&creg_gpio 0 GPIO_ACTIVE_LOW>,
276276 <&creg_gpio 1 GPIO_ACTIVE_LOW>;
277277
278− spi-flash@0 {
278+ flash@0 {
279279 compatible = "sst26wf016b", "jedec,spi-nor";
280280 reg = <0>;
281281 #address-cells = <1>;
arch/arc/include/asm/atomic-llsc.h+16−16
@@ -5,7 +5,7 @@ · 4 unmodified lines
55
66 #define arch_atomic_set(v, i) WRITE_ONCE(((v)->counter), (i))
77
8−#define ATOMIC_OP(op, c_op, asm_op) \
8+#define ATOMIC_OP(op, asm_op) \
99 static inline void arch_atomic_##op(int i, atomic_t *v) \
1010 { \
1111 unsigned int val; \
@@ -21,7 +21,7 @@ static inline void arch_atomic_##op(int i, atomic_t *v) \ · 9 unmodified lines
2121 : "cc"); \
2222 } \
2323
24−#define ATOMIC_OP_RETURN(op, c_op, asm_op) \
24+#define ATOMIC_OP_RETURN(op, asm_op) \
2525 static inline int arch_atomic_##op##_return_relaxed(int i, atomic_t *v) \
2626 { \
2727 unsigned int val; \
@@ -42,7 +42,7 @@ static inline int arch_atomic_##op##_return_relaxed(int i, atomic_t *v) \ · 14 unmodified lines
4242 #define arch_atomic_add_return_relaxed arch_atomic_add_return_relaxed
4343 #define arch_atomic_sub_return_relaxed arch_atomic_sub_return_relaxed
4444
45−#define ATOMIC_FETCH_OP(op, c_op, asm_op) \
45+#define ATOMIC_FETCH_OP(op, asm_op) \
4646 static inline int arch_atomic_fetch_##op##_relaxed(int i, atomic_t *v) \
4747 { \
4848 unsigned int val, orig; \
@@ -69,23 +69,23 @@ static inline int arch_atomic_fetch_##op##_relaxed(int i, atomic_t *v) \ · 20 unmodified lines
6969 #define arch_atomic_fetch_or_relaxed arch_atomic_fetch_or_relaxed
7070 #define arch_atomic_fetch_xor_relaxed arch_atomic_fetch_xor_relaxed
7171
72−#define ATOMIC_OPS(op, c_op, asm_op) \
73− ATOMIC_OP(op, c_op, asm_op) \
74− ATOMIC_OP_RETURN(op, c_op, asm_op) \
75− ATOMIC_FETCH_OP(op, c_op, asm_op)
72+#define ATOMIC_OPS(op, asm_op) \
73+ ATOMIC_OP(op, asm_op) \
74+ ATOMIC_OP_RETURN(op, asm_op) \
75+ ATOMIC_FETCH_OP(op, asm_op)
7676
77−ATOMIC_OPS(add, +=, add)
78−ATOMIC_OPS(sub, -=, sub)
77+ATOMIC_OPS(add, add)
78+ATOMIC_OPS(sub, sub)
7979
8080 #undef ATOMIC_OPS
81−#define ATOMIC_OPS(op, c_op, asm_op) \
82− ATOMIC_OP(op, c_op, asm_op) \
83− ATOMIC_FETCH_OP(op, c_op, asm_op)
81+#define ATOMIC_OPS(op, asm_op) \
82+ ATOMIC_OP(op, asm_op) \
83+ ATOMIC_FETCH_OP(op, asm_op)
8484
85−ATOMIC_OPS(and, &=, and)
86−ATOMIC_OPS(andnot, &= ~, bic)
87−ATOMIC_OPS(or, |=, or)
88−ATOMIC_OPS(xor, ^=, xor)
85+ATOMIC_OPS(and, and)
86+ATOMIC_OPS(andnot, bic)
87+ATOMIC_OPS(or, or)
88+ATOMIC_OPS(xor, xor)
8989
9090 #define arch_atomic_andnot arch_atomic_andnot
9191
arch/arc/include/asm/pgtable-levels.h+0−3
@@ -98,9 +98,6 @@ · 97 unmodified lines
9898 /*
9999 * 1st level paging: pgd
100100 */
101−#define pgd_index(addr) ((addr) >> PGDIR_SHIFT)
102−#define pgd_offset(mm, addr) (((mm)->pgd) + pgd_index(addr))
103−#define pgd_offset_k(addr) pgd_offset(&init_mm, addr)
104101 #define pgd_ERROR(e) \
105102 pr_crit("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
106103
arch/arc/kernel/disasm.c+1−2
@@ -366,7 +366,7 @@ void __kprobes disasm_instr(unsigned long addr, struct disasm_state *state, · 365 unmodified lines
366366 case op_SP: /* LD_S|LDB_S b,[sp,u7], ST_S|STB_S b,[sp,u7] */
367367 /* note: we are ignoring possibility of:
368368 * ADD_S, SUB_S, PUSH_S, POP_S as these should not
369− * cause unaliged exception anyway */
369+ * cause unaligned exception anyway */
370370 state->write = BITS(state->words[0], 6, 6);
371371 state->zz = BITS(state->words[0], 5, 5);
372372 if (state->zz)
@@ -503,7 +503,6 @@ int __kprobes disasm_next_pc(unsigned long pc, struct pt_regs *regs, · 130 unmodified lines
503503 {
504504 struct disasm_state instr;
505505
506− memset(&instr, 0, sizeof(struct disasm_state));
507506 disasm_instr(pc, &instr, 0, regs, cregs);
508507
509508 *next_pc = pc + instr.instr_len;
arch/arc/kernel/entry.S+1−0
@@ -196,6 +196,7 @@ tracesys_exit: · 195 unmodified lines
196196 st r0, [sp, PT_r0] ; sys call return value in pt_regs
197197
198198 ;POST Sys Call Ptrace Hook
199+ mov r0, sp ; pt_regs needed
199200 bl @syscall_trace_exit
200201 b ret_from_exception ; NOT ret_from_system_call at is saves r0 which
201202 ; we'd done before calling post hook above
arch/arc/kernel/signal.c+1−1
@@ -319,7 +319,7 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) · 318 unmodified lines
319319 regs->ret = (unsigned long)ksig->ka.sa.sa_handler;
320320
321321 /*
322− * handler returns using sigreturn stub provided already by userpsace
322+ * handler returns using sigreturn stub provided already by userspace
323323 * If not, nuke the process right away
324324 */
325325 if(!(ksig->ka.sa.sa_flags & SA_RESTORER))
arch/arc/kernel/smp.c+2−2
@@ -35,7 +35,7 @@ EXPORT_SYMBOL_GPL(smp_atomic_ops_lock); · 34 unmodified lines
3535
3636 struct plat_smp_ops __weak plat_smp_ops;
3737
38−/* XXX: per cpu ? Only needed once in early seconday boot */
38+/* XXX: per cpu ? Only needed once in early secondary boot */
3939 struct task_struct *secondary_idle_tsk;
4040
4141 /* Called from start_kernel */
@@ -274,7 +274,7 @@ static void ipi_send_msg_one(int cpu, enum ipi_msg_type msg) · 232 unmodified lines
274274 * and read back old value
275275 */
276276 do {
277− new = old = READ_ONCE(*ipi_data_ptr);
277+ new = old = *ipi_data_ptr;
278278 new |= 1U << msg;
279279 } while (cmpxchg(ipi_data_ptr, old, new) != old);
280280
arch/arc/kernel/unaligned.c+1−1
@@ -237,7 +237,7 @@ int misaligned_fixup(unsigned long address, struct pt_regs *regs, · 236 unmodified lines
237237 if (state.fault)
238238 goto fault;
239239
240− /* clear any remanants of delay slot */
240+ /* clear any remnants of delay slot */
241241 if (delay_mode(regs)) {
242242 regs->ret = regs->bta & ~1U;
243243 regs->status32 &= ~STATUS_DE_MASK;
arch/arc/mm/cache.c+1−1
@@ -401,7 +401,7 @@ static inline void __before_dc_op(const int op) · 400 unmodified lines
401401 {
402402 if (op == OP_FLUSH_N_INV) {
403403 /* Dcache provides 2 cmd: FLUSH or INV
404− * INV inturn has sub-modes: DISCARD or FLUSH-BEFORE
404+ * INV in turn has sub-modes: DISCARD or FLUSH-BEFORE
405405 * flush-n-inv is achieved by INV cmd but with IM=1
406406 * So toggle INV sub-mode depending on op request and default
407407 */
arch/arm/boot/dts/am33xx-l4.dtsi+2−0
@@ -263,6 +263,8 @@ · 262 unmodified lines
263263 compatible = "ti,am3359-tscadc";
264264 reg = <0x0 0x1000>;
265265 interrupts = <16>;
266+ clocks = <&adc_tsc_fck>;
267+ clock-names = "fck";
266268 status = "disabled";
267269 dmas = <&edma 53 0>, <&edma 57 0>;
268270 dma-names = "fifo0", "fifo1";
arch/arm/boot/dts/am3517-evm.dts+40−5
@@ -161,6 +161,8 @@ · 160 unmodified lines
161161
162162 /* HS USB Host PHY on PORT 1 */
163163 hsusb1_phy: hsusb1_phy {
164+ pinctrl-names = "default";
165+ pinctrl-0 = <&hsusb1_rst_pins>;
164166 compatible = "usb-nop-xceiv";
165167 reset-gpios = <&gpio2 25 GPIO_ACTIVE_LOW>; /* gpio_57 */
166168 #phy-cells = <0>;
@@ -168,7 +170,9 @@ · 1 unmodified line
168170 };
169171
170172 &davinci_emac {
171− status = "okay";
173+ pinctrl-names = "default";
174+ pinctrl-0 = <&ethernet_pins>;
175+ status = "okay";
172176 };
173177
174178 &davinci_mdio {
@@ -193,6 +197,8 @@ · 18 unmodified lines
193197 };
194198
195199 &i2c2 {
200+ pinctrl-names = "default";
201+ pinctrl-0 = <&i2c2_pins>;
196202 clock-frequency = <400000>;
197203 /* User DIP swithes [1:8] / User LEDS [1:2] */
198204 tca6416: gpio@21 {
@@ -205,6 +211,8 @@ · 6 unmodified lines
205211 };
206212
207213 &i2c3 {
214+ pinctrl-names = "default";
215+ pinctrl-0 = <&i2c3_pins>;
208216 clock-frequency = <400000>;
209217 };
210218
@@ -223,6 +231,8 @@ · 12 unmodified lines
223231 };
224232
225233 &usbhshost {
234+ pinctrl-names = "default";
235+ pinctrl-0 = <&hsusb1_pins>;
226236 port1-mode = "ehci-phy";
227237 };
228238
@@ -231,8 +241,35 @@ · 2 unmodified lines
231241 };
232242
233243 &omap3_pmx_core {
234− pinctrl-names = "default";
235− pinctrl-0 = <&hsusb1_rst_pins>;
244+
245+ ethernet_pins: pinmux_ethernet_pins {
246+ pinctrl-single,pins = <
247+ OMAP3_CORE1_IOPAD(0x21fe, PIN_INPUT | MUX_MODE0) /* rmii_mdio_data */
248+ OMAP3_CORE1_IOPAD(0x2200, MUX_MODE0) /* rmii_mdio_clk */
249+ OMAP3_CORE1_IOPAD(0x2202, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii_rxd0 */
250+ OMAP3_CORE1_IOPAD(0x2204, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii_rxd1 */
251+ OMAP3_CORE1_IOPAD(0x2206, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii_crs_dv */
252+ OMAP3_CORE1_IOPAD(0x2208, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* rmii_rxer */
253+ OMAP3_CORE1_IOPAD(0x220a, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* rmii_txd0 */
254+ OMAP3_CORE1_IOPAD(0x220c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* rmii_txd1 */
255+ OMAP3_CORE1_IOPAD(0x220e, PIN_OUTPUT_PULLDOWN |MUX_MODE0) /* rmii_txen */
256+ OMAP3_CORE1_IOPAD(0x2210, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii_50mhz_clk */
257+ >;
258+ };
259+
260+ i2c2_pins: pinmux_i2c2_pins {
261+ pinctrl-single,pins = <
262+ OMAP3_CORE1_IOPAD(0x21be, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_scl */
263+ OMAP3_CORE1_IOPAD(0x21c0, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_sda */
264+ >;
265+ };
266+
267+ i2c3_pins: pinmux_i2c3_pins {
268+ pinctrl-single,pins = <
269+ OMAP3_CORE1_IOPAD(0x21c2, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_scl */
270+ OMAP3_CORE1_IOPAD(0x21c4, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_sda */
271+ >;
272+ };
236273
237274 leds_pins: pinmux_leds_pins {
238275 pinctrl-single,pins = <
@@ -300,8 +337,6 @@ · 61 unmodified lines
300337 };
301338
302339 &omap3_pmx_core2 {
303− pinctrl-names = "default";
304− pinctrl-0 = <&hsusb1_pins>;
305340
306341 hsusb1_pins: pinmux_hsusb1_pins {
307342 pinctrl-single,pins = <
arch/arm/boot/dts/am3517-som.dtsi+9−0
@@ -69,6 +69,8 @@ · 68 unmodified lines
6969 };
7070
7171 &i2c1 {
72+ pinctrl-names = "default";
73+ pinctrl-0 = <&i2c1_pins>;
7274 clock-frequency = <400000>;
7375
7476 s35390a: s35390a@30 {
@@ -179,6 +181,13 @@ · 104 unmodified lines
179181
180182 &omap3_pmx_core {
181183
184+ i2c1_pins: pinmux_i2c1_pins {
185+ pinctrl-single,pins = <
186+ OMAP3_CORE1_IOPAD(0x21ba, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl */
187+ OMAP3_CORE1_IOPAD(0x21bc, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_sda */
188+ >;
189+ };
190+
182191 wl12xx_buffer_pins: pinmux_wl12xx_buffer_pins {
183192 pinctrl-single,pins = <
184193 OMAP3_CORE1_IOPAD(0x2156, PIN_OUTPUT | MUX_MODE4) /* mmc1_dat7.gpio_129 */
arch/arm/boot/dts/at91-dvk_su60_somc.dtsi+1−1
@@ -44,7 +44,7 @@ · 43 unmodified lines
4444 status = "okay";
4545
4646 /* spi0.0: 4M Flash Macronix MX25R4035FM1IL0 */
47− spi-flash@0 {
47+ flash@0 {
4848 compatible = "mxicy,mx25u4035", "jedec,spi-nor";
4949 spi-max-frequency = <33000000>;
5050 reg = <0>;
arch/arm/boot/dts/at91-q5xr5.dts+1−1
@@ -125,7 +125,7 @@ · 124 unmodified lines
125125 cs-gpios = <&pioA 3 GPIO_ACTIVE_HIGH>, <&pioC 11 GPIO_ACTIVE_LOW>, <0>, <0>;
126126 status = "okay";
127127
128− m25p80@0 {
128+ flash@0 {
129129 compatible = "jedec,spi-nor";
130130 spi-max-frequency = <20000000>;
131131 reg = <0>;
arch/arm/boot/dts/at91-sam9_l9260.dts+1−1
@@ -101,7 +101,7 @@ · 100 unmodified lines
101101 nand0: nand@40000000 {
102102 nand-bus-width = <8>;
103103 nand-ecc-mode = "soft";
104− nand-on-flash-bbt = <1>;
104+ nand-on-flash-bbt;
105105 status = "okay";
106106 };
107107
arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi+1−1
@@ -214,7 +214,7 @@ · 213 unmodified lines
214214 pinctrl-0 = <&pinctrl_qspi1_default>;
215215 status = "disabled";
216216
217− qspi1_flash: spi_flash@0 {
217+ qspi1_flash: flash@0 {
218218 #address-cells = <1>;
219219 #size-cells = <1>;
220220 compatible = "jedec,spi-nor";
arch/arm/boot/dts/at91-sama5d27_wlsom1_ek.dts+1−1
@@ -191,7 +191,7 @@ · 190 unmodified lines
191191 &qspi1 {
192192 status = "okay";
193193
194− qspi1_flash: spi_flash@0 {
194+ qspi1_flash: flash@0 {
195195 status = "okay";
196196 };
197197 };
arch/arm/boot/dts/at91-sama5d2_xplained.dts+1−1
@@ -137,7 +137,7 @@ · 136 unmodified lines
137137 pinctrl-0 = <&pinctrl_spi0_default>;
138138 status = "okay";
139139
140− m25p80@0 {
140+ flash@0 {
141141 compatible = "atmel,at25df321a";
142142 reg = <0>;
143143 spi-max-frequency = <50000000>;
arch/arm/boot/dts/at91-sama5d3_xplained.dts+4−4
@@ -57,8 +57,8 @@ · 56 unmodified lines
5757 };
5858
5959 spi0: spi@f0004000 {
60− pinctrl-names = "default";
61− pinctrl-0 = <&pinctrl_spi0_cs>;
60+ pinctrl-names = "default", "cs";
61+ pinctrl-1 = <&pinctrl_spi0_cs>;
6262 cs-gpios = <&pioD 13 0>, <0>, <0>, <&pioD 16 0>;
6363 status = "okay";
6464 };
@@ -171,8 +171,8 @@ · 106 unmodified lines
171171 };
172172
173173 spi1: spi@f8008000 {
174− pinctrl-names = "default";
175− pinctrl-0 = <&pinctrl_spi1_cs>;
174+ pinctrl-names = "default", "cs";
175+ pinctrl-1 = <&pinctrl_spi1_cs>;
176176 cs-gpios = <&pioC 25 0>;
177177 status = "okay";
178178 };
arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi+1−1
@@ -49,7 +49,7 @@ · 48 unmodified lines
4949 cs-gpios = <&pioC 3 0>, <0>, <0>, <0>;
5050 status = "okay";
5151
52− m25p80@0 {
52+ flash@0 {
5353 compatible = "atmel,at25df321a";
5454 spi-max-frequency = <50000000>;
5555 reg = <0>;
arch/arm/boot/dts/at91-sama5d4_xplained.dts+3−3
@@ -81,8 +81,8 @@ · 80 unmodified lines
8181 };
8282
8383 spi1: spi@fc018000 {
84− pinctrl-names = "default";
85− pinctrl-0 = <&pinctrl_spi0_cs>;
84+ pinctrl-names = "default", "cs";
85+ pinctrl-1 = <&pinctrl_spi1_cs>;
8686 cs-gpios = <&pioB 21 0>;
8787 status = "okay";
8888 };
@@ -140,7 +140,7 @@ · 51 unmodified lines
140140 atmel,pins =
141141 <AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
142142 };
143− pinctrl_spi0_cs: spi0_cs_default {
143+ pinctrl_spi1_cs: spi1_cs_default {
144144 atmel,pins =
145145 <AT91_PIOB 21 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
146146 };
arch/arm/boot/dts/at91-sama5d4ek.dts+1−1
@@ -65,7 +65,7 @@ · 64 unmodified lines
6565 spi0: spi@f8010000 {
6666 cs-gpios = <&pioC 3 0>, <0>, <0>, <0>;
6767 status = "okay";
68− m25p80@0 {
68+ flash@0 {
6969 compatible = "atmel,at25df321a";
7070 spi-max-frequency = <50000000>;
7171 reg = <0>;
arch/arm/boot/dts/at91-sama7g5ek.dts+2−2
@@ -495,7 +495,7 @@ · 494 unmodified lines
495495 pinctrl_flx3_default: flx3_default {
496496 pinmux = <PIN_PD16__FLEXCOM3_IO0>,
497497 <PIN_PD17__FLEXCOM3_IO1>;
498− bias-disable;
498+ bias-pull-up;
499499 };
500500
501501 pinctrl_flx4_default: flx4_default {
@@ -655,7 +655,7 @@ · 153 unmodified lines
655655 <PIN_PB21__QSPI0_INT>;
656656 bias-disable;
657657 slew-rate = <0>;
658− atmel,drive-strength = <ATMEL_PIO_DRVSTR_HI>;
658+ atmel,drive-strength = <ATMEL_PIO_DRVSTR_ME>;
659659 };
660660
661661 pinctrl_sdmmc0_default: sdmmc0_default {
arch/arm/boot/dts/at91-vinco.dts+1−1
@@ -59,7 +59,7 @@ · 58 unmodified lines
5959 spi0: spi@f8010000 {
6060 cs-gpios = <&pioC 3 0>, <0>, <0>, <0>;
6161 status = "okay";
62− m25p80@0 {
62+ flash@0 {
6363 compatible = "n25q32b", "jedec,spi-nor";
6464 spi-max-frequency = <50000000>;
6565 reg = <0>;
arch/arm/boot/dts/at91rm9200ek.dts+2−2
@@ -73,7 +73,7 @@ · 72 unmodified lines
7373 spi0: spi@fffe0000 {
7474 status = "okay";
7575 cs-gpios = <&pioA 3 0>, <0>, <0>, <0>;
76− mtd_dataflash@0 {
76+ flash@0 {
7777 compatible = "atmel,at45", "atmel,dataflash";
7878 spi-max-frequency = <15000000>;
7979 reg = <0>;
@@ -94,7 +94,7 @@ · 14 unmodified lines
9494 status = "okay";
9595 };
9696
97− nor_flash@10000000 {
97+ flash@10000000 {
9898 compatible = "cfi-flash";
9999 reg = <0x10000000 0x800000>;
100100 linux,mtd-name = "physmap-flash.0";
arch/arm/boot/dts/at91sam9260ek.dts+1−1
@@ -92,7 +92,7 @@ · 91 unmodified lines
9292
9393 spi0: spi@fffc8000 {
9494 cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
95− mtd_dataflash@1 {
95+ flash@1 {
9696 compatible = "atmel,at45", "atmel,dataflash";
9797 spi-max-frequency = <50000000>;
9898 reg = <1>;
arch/arm/boot/dts/at91sam9261ek.dts+1−1
@@ -145,7 +145,7 @@ · 144 unmodified lines
145145 cs-gpios = <&pioA 3 0>, <0>, <&pioA 28 0>, <0>;
146146 status = "okay";
147147
148− mtd_dataflash@0 {
148+ flash@0 {
149149 compatible = "atmel,at45", "atmel,dataflash";
150150 reg = <0>;
151151 spi-max-frequency = <15000000>;
arch/arm/boot/dts/at91sam9263ek.dts+1−1
@@ -95,7 +95,7 @@ · 94 unmodified lines
9595 spi0: spi@fffa4000 {
9696 status = "okay";
9797 cs-gpios = <&pioA 5 0>, <0>, <0>, <0>;
98− mtd_dataflash@0 {
98+ flash@0 {
9999 compatible = "atmel,at45", "atmel,dataflash";
100100 spi-max-frequency = <50000000>;
101101 reg = <0>;
arch/arm/boot/dts/at91sam9g20ek_common.dtsi+44−1
@@ -110,7 +110,7 @@ · 109 unmodified lines
110110
111111 spi0: spi@fffc8000 {
112112 cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
113− mtd_dataflash@1 {
113+ flash@1 {
114114 compatible = "atmel,at45", "atmel,dataflash";
115115 spi-max-frequency = <50000000>;
116116 reg = <1>;
@@ -214,11 +214,23 @@ · 97 unmodified lines
214214 24c512@50 {
215215 compatible = "atmel,24c512";
216216 reg = <0x50>;
217+ vcc-supply = <&reg_3v3>;
217218 };
218219
219220 wm8731: wm8731@1b {
220221 compatible = "wm8731";
221222 reg = <0x1b>;
223+
224+ /* PCK0 at 12MHz */
225+ clocks = <&pmc PMC_TYPE_SYSTEM 8>;
226+ clock-names = "mclk";
227+ assigned-clocks = <&pmc PMC_TYPE_SYSTEM 8>;
228+ assigned-clock-rates = <12000000>;
229+
230+ HPVDD-supply = <&vcc_dac>;
231+ AVDD-supply = <&vcc_dac>;
232+ DCVDD-supply = <&reg_3v3>;
233+ DBVDD-supply = <&reg_3v3>;
222234 };
223235 };
224236
@@ -254,4 +266,35 @@ · 29 unmodified lines
254266 atmel,ssc-controller = <&ssc0>;
255267 atmel,audio-codec = <&wm8731>;
256268 };
269+
270+ reg_5v: fixedregulator0 {
271+ compatible = "regulator-fixed";
272+ regulator-name = "5V";
273+ regulator-min-microvolt = <5000000>;
274+ regulator-max-microvolt = <5000000>;
275+ };
276+
277+ reg_3v3: fixedregulator1 {
278+ compatible = "regulator-fixed";
279+ regulator-name = "3V3";
280+ vin-supply = <&reg_5v>;
281+ regulator-min-microvolt = <3300000>;
282+ regulator-max-microvolt = <3300000>;
283+ };
284+
285+ reg_1v: fixedregulator2 {
286+ compatible = "regulator-fixed";
287+ regulator-name = "1V";
288+ vin-supply = <&reg_5v>;
289+ regulator-min-microvolt = <1000000>;
290+ regulator-max-microvolt = <1000000>;
291+ };
292+
293+ vcc_dac: fixedregulator3 {
294+ compatible = "regulator-fixed";
295+ regulator-name = "VCC_DAC";
296+ vin-supply = <&reg_3v3>;
297+ regulator-min-microvolt = <3300000>;
298+ regulator-max-microvolt = <3300000>;
299+ };
257300 };
arch/arm/boot/dts/at91sam9m10g45ek.dts+1−1
@@ -167,7 +167,7 @@ · 166 unmodified lines
167167 spi0: spi@fffa4000{
168168 status = "okay";
169169 cs-gpios = <&pioB 3 0>, <0>, <0>, <0>;
170− mtd_dataflash@0 {
170+ flash@0 {
171171 compatible = "atmel,at45", "atmel,dataflash";
172172 spi-max-frequency = <13000000>;
173173 reg = <0>;
arch/arm/boot/dts/at91sam9n12ek.dts+1−1
@@ -119,7 +119,7 @@ · 118 unmodified lines
119119 spi0: spi@f0000000 {
120120 status = "okay";
121121 cs-gpios = <&pioA 14 0>, <0>, <0>, <0>;
122− m25p80@0 {
122+ flash@0 {
123123 compatible = "atmel,at25df321a";
124124 spi-max-frequency = <50000000>;
125125 reg = <0>;
arch/arm/boot/dts/at91sam9rlek.dts+1−1
@@ -180,7 +180,7 @@ · 179 unmodified lines
180180 spi0: spi@fffcc000 {
181181 status = "okay";
182182 cs-gpios = <&pioA 28 0>, <0>, <0>, <0>;
183− mtd_dataflash@0 {
183+ flash@0 {
184184 compatible = "atmel,at45", "atmel,dataflash";
185185 spi-max-frequency = <15000000>;
186186 reg = <0>;
arch/arm/boot/dts/at91sam9x5ek.dtsi+1−1
@@ -125,7 +125,7 @@ · 124 unmodified lines
125125 cs-gpios = <&pioA 14 0>, <0>, <0>, <0>;
126126 status = "disabled"; /* conflicts with mmc1 */
127127
128− m25p80@0 {
128+ flash@0 {
129129 compatible = "atmel,at25df321a";
130130 spi-max-frequency = <50000000>;
131131 reg = <0>;
arch/arm/boot/dts/da850-evm.dts+1−1
@@ -278,7 +278,7 @@ · 277 unmodified lines
278278 status = "okay";
279279 pinctrl-names = "default";
280280 pinctrl-0 = <&spi1_pins &spi1_cs0_pin>;
281− flash: m25p80@0 {
281+ flash: flash@0 {
282282 #address-cells = <1>;
283283 #size-cells = <1>;
284284 compatible = "jedec,spi-nor";
arch/arm/boot/dts/dm8168-evm.dts+1−1
@@ -177,7 +177,7 @@ · 176 unmodified lines
177177 pinctrl-names = "default";
178178 pinctrl-0 = <&mcspi1_pins>;
179179
180− m25p80@0 {
180+ flash@0 {
181181 compatible = "w25x32";
182182 spi-max-frequency = <48000000>;
183183 reg = <0>;
arch/arm/boot/dts/dra7-l4.dtsi+2−2
@@ -4188,11 +4188,11 @@ · 4187 unmodified lines
41884188 reg = <0x1d0010 0x4>;
41894189 reg-names = "sysc";
41904190 ti,sysc-midle = <SYSC_IDLE_FORCE>,
4191− <SYSC_IDLE_NO>,
4192− <SYSC_IDLE_SMART>;
4191+ <SYSC_IDLE_NO>;
41934192 ti,sysc-sidle = <SYSC_IDLE_FORCE>,
41944193 <SYSC_IDLE_NO>,
41954194 <SYSC_IDLE_SMART>;
4195+ power-domains = <&prm_vpe>;
41964196 clocks = <&vpe_clkctrl DRA7_VPE_VPE_CLKCTRL 0>;
41974197 clock-names = "fck";
41984198 #address-cells = <1>;
arch/arm/boot/dts/imx28-ts4600.dts+1−1
@@ -26,7 +26,7 @@ · 25 unmodified lines
2626 pinctrl-0 = <&mmc0_4bit_pins_a
2727 &mmc0_sck_cfg
2828 &en_sd_pwr>;
29− broken-cd = <1>;
29+ broken-cd;
3030 bus-width = <4>;
3131 vmmc-supply = <&reg_vddio_sd0>;
3232 status = "okay";
arch/arm/boot/dts/imx6qdl-apalis.dtsi+8−2
@@ -286,6 +286,8 @@ · 285 unmodified lines
286286 codec: sgtl5000@a {
287287 compatible = "fsl,sgtl5000";
288288 reg = <0x0a>;
289+ pinctrl-names = "default";
290+ pinctrl-0 = <&pinctrl_sgtl5000>;
289291 clocks = <&clks IMX6QDL_CLK_CKO>;
290292 VDDA-supply = <&reg_module_3v3_audio>;
291293 VDDIO-supply = <&reg_module_3v3>;
@@ -517,8 +519,6 @@ · 225 unmodified lines
517519 MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x130b0
518520 MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0
519521 MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0
520− /* SGTL5000 sys_mclk */
521− MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
522522 >;
523523 };
524524
@@ -811,6 +811,12 @@ · 286 unmodified lines
811811 >;
812812 };
813813
814+ pinctrl_sgtl5000: sgtl5000grp {
815+ fsl,pins = <
816+ MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
817+ >;
818+ };
819+
814820 pinctrl_spdif: spdifgrp {
815821 fsl,pins = <
816822 MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0
arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi+16−16
@@ -154,112 +154,112 @@ · 153 unmodified lines
154154 regulators {
155155 bcore1 {
156156 regulator-name = "bcore1";
157− regulator-always-on = <1>;
157+ regulator-always-on;
158158 regulator-min-microvolt = <300000>;
159159 regulator-max-microvolt = <3300000>;
160160 };
161161
162162 bcore2 {
163163 regulator-name = "bcore2";
164− regulator-always-on = <1>;
164+ regulator-always-on;
165165 regulator-min-microvolt = <300000>;
166166 regulator-max-microvolt = <3300000>;
167167 };
168168
169169 bpro {
170170 regulator-name = "bpro";
171− regulator-always-on = <1>;
171+ regulator-always-on;
172172 regulator-min-microvolt = <300000>;
173173 regulator-max-microvolt = <3300000>;
174174 };
175175
176176 bperi {
177177 regulator-name = "bperi";
178− regulator-always-on = <1>;
178+ regulator-always-on;
179179 regulator-min-microvolt = <300000>;
180180 regulator-max-microvolt = <3300000>;
181181 };
182182
183183 bmem {
184184 regulator-name = "bmem";
185− regulator-always-on = <1>;
185+ regulator-always-on;
186186 regulator-min-microvolt = <300000>;
187187 regulator-max-microvolt = <3300000>;
188188 };
189189
190190 ldo2 {
191191 regulator-name = "ldo2";
192− regulator-always-on = <1>;
192+ regulator-always-on;
193193 regulator-min-microvolt = <300000>;
194194 regulator-max-microvolt = <1800000>;
195195 };
196196
197197 ldo3 {
198198 regulator-name = "ldo3";
199− regulator-always-on = <1>;
199+ regulator-always-on;
200200 regulator-min-microvolt = <300000>;
201201 regulator-max-microvolt = <3300000>;
202202 };
203203
204204 ldo4 {
205205 regulator-name = "ldo4";
206− regulator-always-on = <1>;
206+ regulator-always-on;
207207 regulator-min-microvolt = <300000>;
208208 regulator-max-microvolt = <3300000>;
209209 };
210210
211211 ldo5 {
212212 regulator-name = "ldo5";
213− regulator-always-on = <1>;
213+ regulator-always-on;
214214 regulator-min-microvolt = <300000>;
215215 regulator-max-microvolt = <3300000>;
216216 };
217217
218218 ldo6 {
219219 regulator-name = "ldo6";
220− regulator-always-on = <1>;
220+ regulator-always-on;
221221 regulator-min-microvolt = <300000>;
222222 regulator-max-microvolt = <3300000>;
223223 };
224224
225225 ldo7 {
226226 regulator-name = "ldo7";
227− regulator-always-on = <1>;
227+ regulator-always-on;
228228 regulator-min-microvolt = <300000>;
229229 regulator-max-microvolt = <3300000>;
230230 };
231231
232232 ldo8 {
233233 regulator-name = "ldo8";
234− regulator-always-on = <1>;
234+ regulator-always-on;
235235 regulator-min-microvolt = <300000>;
236236 regulator-max-microvolt = <3300000>;
237237 };
238238
239239 ldo9 {
240240 regulator-name = "ldo9";
241− regulator-always-on = <1>;
241+ regulator-always-on;
242242 regulator-min-microvolt = <300000>;
243243 regulator-max-microvolt = <3300000>;
244244 };
245245
246246 ldo10 {
247247 regulator-name = "ldo10";
248− regulator-always-on = <1>;
248+ regulator-always-on;
249249 regulator-min-microvolt = <300000>;
250250 regulator-max-microvolt = <3300000>;
251251 };
252252
253253 ldo11 {
254254 regulator-name = "ldo11";
255− regulator-always-on = <1>;
255+ regulator-always-on;
256256 regulator-min-microvolt = <300000>;
257257 regulator-max-microvolt = <3300000>;
258258 };
259259
260260 bio {
261261 regulator-name = "bio";
262− regulator-always-on = <1>;
262+ regulator-always-on;
263263 regulator-min-microvolt = <1800000>;
264264 regulator-max-microvolt = <1800000>;
265265 };
arch/arm/boot/dts/imx6ul-phytec-segin-peb-av-02.dtsi+2−2
@@ -72,8 +72,8 @@ · 71 unmodified lines
7272 st,settling = <2>;
7373 st,fraction-z = <7>;
7474 st,i-drive = <1>;
75− touchscreen-inverted-x = <1>;
76− touchscreen-inverted-y = <1>;
75+ touchscreen-inverted-x;
76+ touchscreen-inverted-y;
7777 };
7878 };
7979 };
arch/arm/boot/dts/imx6ull-colibri.dtsi+1−1
@@ -37,7 +37,7 @@ · 36 unmodified lines
3737
3838 reg_sd1_vmmc: regulator-sd1-vmmc {
3939 compatible = "regulator-gpio";
40− gpio = <&gpio5 9 GPIO_ACTIVE_HIGH>;
40+ gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>;
4141 pinctrl-names = "default";
4242 pinctrl-0 = <&pinctrl_snvs_reg_sd>;
4343 regulator-always-on;
arch/arm/boot/dts/logicpd-som-lv-35xx-devkit.dts+15−0
@@ -11,3 +11,18 @@ · 10 unmodified lines
1111 model = "LogicPD Zoom OMAP35xx SOM-LV Development Kit";
1212 compatible = "logicpd,dm3730-som-lv-devkit", "ti,omap3430", "ti,omap3";
1313 };
14+
15+&omap3_pmx_core2 {
16+ pinctrl-names = "default";
17+ pinctrl-0 = <&hsusb2_2_pins>;
18+ hsusb2_2_pins: pinmux_hsusb2_2_pins {
19+ pinctrl-single,pins = <
20+ OMAP3430_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
21+ OMAP3430_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
22+ OMAP3430_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
23+ OMAP3430_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
24+ OMAP3430_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
25+ OMAP3430_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
26+ >;
27+ };
28+};
arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts+15−0
@@ -11,3 +11,18 @@ · 10 unmodified lines
1111 model = "LogicPD Zoom DM3730 SOM-LV Development Kit";
1212 compatible = "logicpd,dm3730-som-lv-devkit", "ti,omap3630", "ti,omap3";
1313 };
14+
15+&omap3_pmx_core2 {
16+ pinctrl-names = "default";
17+ pinctrl-0 = <&hsusb2_2_pins>;
18+ hsusb2_2_pins: pinmux_hsusb2_2_pins {
19+ pinctrl-single,pins = <
20+ OMAP3630_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
21+ OMAP3630_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
22+ OMAP3630_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
23+ OMAP3630_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
24+ OMAP3630_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
25+ OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
26+ >;
27+ };
28+};
arch/arm/boot/dts/logicpd-som-lv.dtsi+0−15
@@ -265,21 +265,6 @@ · 264 unmodified lines
265265 };
266266 };
267267
268−&omap3_pmx_core2 {
269− pinctrl-names = "default";
270− pinctrl-0 = <&hsusb2_2_pins>;
271− hsusb2_2_pins: pinmux_hsusb2_2_pins {
272− pinctrl-single,pins = <
273− OMAP3630_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
274− OMAP3630_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
275− OMAP3630_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
276− OMAP3630_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
277− OMAP3630_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
278− OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
279− >;
280− };
281−};
282−
283268 &uart2 {
284269 interrupts-extended = <&intc 73 &omap3_pmx_core OMAP3_UART2_RX>;
285270 pinctrl-names = "default";
arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi+2−2
@@ -118,8 +118,8 @@ · 117 unmodified lines
118118 gpmc,device-width = <2>;
119119 gpmc,wait-pin = <0>;
120120 gpmc,burst-length = <4>;
121− gpmc,cycle2cycle-samecsen = <1>;
122− gpmc,cycle2cycle-diffcsen = <1>;
121+ gpmc,cycle2cycle-samecsen;
122+ gpmc,cycle2cycle-diffcsen;
123123 gpmc,cs-on-ns = <0>;
124124 gpmc,cs-rd-off-ns = <45>;
125125 gpmc,cs-wr-off-ns = <45>;
arch/arm/boot/dts/omap3-gta04.dtsi+2−0
@@ -31,6 +31,8 @@ · 30 unmodified lines
3131 aliases {
3232 display0 = &lcd;
3333 display1 = &tv0;
34+ /delete-property/ mmc2;
35+ /delete-property/ mmc3;
3436 };
3537
3638 ldo_3v3: fixedregulator {
arch/arm/boot/dts/qcom-apq8064-pins.dtsi+6−6
@@ -76,7 +76,7 @@ · 75 unmodified lines
7676 pinconf {
7777 pins = "gpio20", "gpio21";
7878 drive-strength = <2>;
79− bias-disable = <0>;
79+ bias-disable;
8080 };
8181 };
8282
@@ -116,7 +116,7 @@ · 33 unmodified lines
116116 pinconf {
117117 pins = "gpio24", "gpio25";
118118 drive-strength = <2>;
119− bias-disable = <0>;
119+ bias-disable;
120120 };
121121 };
122122
@@ -141,7 +141,7 @@ · 18 unmodified lines
141141 pinconf {
142142 pins = "gpio8", "gpio9";
143143 drive-strength = <2>;
144− bias-disable = <0>;
144+ bias-disable;
145145 };
146146 };
147147
@@ -166,7 +166,7 @@ · 18 unmodified lines
166166 pinconf {
167167 pins = "gpio12", "gpio13";
168168 drive-strength = <2>;
169− bias-disable = <0>;
169+ bias-disable;
170170 };
171171 };
172172
@@ -229,7 +229,7 @@ · 56 unmodified lines
229229 pinconf {
230230 pins = "gpio16", "gpio17";
231231 drive-strength = <2>;
232− bias-disable = <0>;
232+ bias-disable;
233233 };
234234 };
235235
@@ -282,7 +282,7 @@ · 46 unmodified lines
282282 pinconf {
283283 pins = "gpio84", "gpio85";
284284 drive-strength = <2>;
285− bias-disable = <0>;
285+ bias-disable;
286286 };
287287 };
288288
arch/arm/boot/dts/qcom-ipq8064.dtsi+4−4
@@ -972,7 +972,7 @@ · 971 unmodified lines
972972
973973 snps,axi-config = <&stmmac_axi_setup>;
974974 snps,pbl = <32>;
975− snps,aal = <1>;
975+ snps,aal;
976976
977977 qcom,nss-common = <&nss_common>;
978978 qcom,qsgmii-csr = <&qsgmii_csr>;
@@ -996,7 +996,7 @@ · 17 unmodified lines
996996
997997 snps,axi-config = <&stmmac_axi_setup>;
998998 snps,pbl = <32>;
999− snps,aal = <1>;
999+ snps,aal;
10001000
10011001 qcom,nss-common = <&nss_common>;
10021002 qcom,qsgmii-csr = <&qsgmii_csr>;
@@ -1020,7 +1020,7 @@ · 17 unmodified lines
10201020
10211021 snps,axi-config = <&stmmac_axi_setup>;
10221022 snps,pbl = <32>;
1023− snps,aal = <1>;
1023+ snps,aal;
10241024
10251025 qcom,nss-common = <&nss_common>;
10261026 qcom,qsgmii-csr = <&qsgmii_csr>;
@@ -1044,7 +1044,7 @@ · 17 unmodified lines
10441044
10451045 snps,axi-config = <&stmmac_axi_setup>;
10461046 snps,pbl = <32>;
1047− snps,aal = <1>;
1047+ snps,aal;
10481048
10491049 qcom,nss-common = <&nss_common>;
10501050 qcom,qsgmii-csr = <&qsgmii_csr>;
arch/arm/boot/dts/sama5d3xmb.dtsi+1−1
@@ -26,7 +26,7 @@ · 25 unmodified lines
2626 spi0: spi@f0004000 {
2727 dmas = <0>, <0>; /* Do not use DMA for spi0 */
2828
29− m25p80@0 {
29+ flash@0 {
3030 compatible = "atmel,at25df321a";
3131 spi-max-frequency = <50000000>;
3232 reg = <0>;
arch/arm/boot/dts/sama5d3xmb_cmp.dtsi+1−1
@@ -25,7 +25,7 @@ · 24 unmodified lines
2525 spi0: spi@f0004000 {
2626 dmas = <0>, <0>; /* Do not use DMA for spi0 */
2727
28− m25p80@0 {
28+ flash@0 {
2929 compatible = "atmel,at25df321a";
3030 spi-max-frequency = <50000000>;
3131 reg = <0>;
arch/arm/boot/dts/sama7g5.dtsi+9−9
@@ -601,9 +601,9 @@ · 600 unmodified lines
601601 #size-cells = <0>;
602602 clocks = <&pmc PMC_TYPE_PERIPHERAL 39>;
603603 atmel,fifo-size = <32>;
604− dmas = <&dma0 AT91_XDMAC_DT_PERID(7)>,
605− <&dma0 AT91_XDMAC_DT_PERID(8)>;
606− dma-names = "rx", "tx";
604+ dmas = <&dma0 AT91_XDMAC_DT_PERID(8)>,
605+ <&dma0 AT91_XDMAC_DT_PERID(7)>;
606+ dma-names = "tx", "rx";
607607 status = "disabled";
608608 };
609609 };
@@ -786,9 +786,9 @@ · 176 unmodified lines
786786 #size-cells = <0>;
787787 clocks = <&pmc PMC_TYPE_PERIPHERAL 46>;
788788 atmel,fifo-size = <32>;
789− dmas = <&dma0 AT91_XDMAC_DT_PERID(21)>,
790− <&dma0 AT91_XDMAC_DT_PERID(22)>;
791− dma-names = "rx", "tx";
789+ dmas = <&dma0 AT91_XDMAC_DT_PERID(22)>,
790+ <&dma0 AT91_XDMAC_DT_PERID(21)>;
791+ dma-names = "tx", "rx";
792792 status = "disabled";
793793 };
794794 };
@@ -810,9 +810,9 @@ · 15 unmodified lines
810810 #size-cells = <0>;
811811 clocks = <&pmc PMC_TYPE_PERIPHERAL 47>;
812812 atmel,fifo-size = <32>;
813− dmas = <&dma0 AT91_XDMAC_DT_PERID(23)>,
814− <&dma0 AT91_XDMAC_DT_PERID(24)>;
815− dma-names = "rx", "tx";
813+ dmas = <&dma0 AT91_XDMAC_DT_PERID(24)>,
814+ <&dma0 AT91_XDMAC_DT_PERID(23)>;
815+ dma-names = "tx", "rx";
816816 status = "disabled";
817817 };
818818 };
arch/arm/boot/dts/spear1310-evb.dts+1−1
@@ -379,7 +379,7 @@ · 378 unmodified lines
379379 };
380380 };
381381
382− m25p80@1 {
382+ flash@1 {
383383 compatible = "st,m25p80";
384384 reg = <1>;
385385 spi-max-frequency = <12000000>;
arch/arm/boot/dts/spear1340-evb.dts+1−1
@@ -439,7 +439,7 @@ · 438 unmodified lines
439439 cs-gpios = <&gpiopinctrl 80 0>, <&gpiopinctrl 24 0>,
440440 <&gpiopinctrl 85 0>;
441441
442− m25p80@0 {
442+ flash@0 {
443443 compatible = "m25p80";
444444 reg = <0>;
445445 spi-max-frequency = <12000000>;
arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi+1−1
@@ -398,7 +398,7 @@ · 397 unmodified lines
398398 #size-cells = <0>;
399399 status = "okay";
400400
401− flash0: is25lp016d@0 {
401+ flash0: flash@0 {
402402 compatible = "jedec,spi-nor";
403403 reg = <0>;
404404 spi-max-frequency = <133000000>;
arch/arm/boot/dts/stm32mp157c-ev1.dts+2−2
@@ -262,7 +262,7 @@ · 261 unmodified lines
262262 #size-cells = <0>;
263263 status = "okay";
264264
265− flash0: mx66l51235l@0 {
265+ flash0: flash@0 {
266266 compatible = "jedec,spi-nor";
267267 reg = <0>;
268268 spi-rx-bus-width = <4>;
@@ -271,7 +271,7 @@ · 2 unmodified lines
271271 #size-cells = <1>;
272272 };
273273
274− flash1: mx66l51235l@1 {
274+ flash1: flash@1 {
275275 compatible = "jedec,spi-nor";
276276 reg = <1>;
277277 spi-rx-bus-width = <4>;
arch/arm/boot/dts/usb_a9263.dts+1−1
@@ -60,7 +60,7 @@ · 59 unmodified lines
6060 spi0: spi@fffa4000 {
6161 cs-gpios = <&pioB 15 GPIO_ACTIVE_HIGH>;
6262 status = "okay";
63− mtd_dataflash@0 {
63+ flash@0 {
6464 compatible = "atmel,at45", "atmel,dataflash";
6565 reg = <0>;
6666 spi-max-frequency = <15000000>;
arch/arm/configs/gemini_defconfig+4−1
@@ -49,11 +49,13 @@ CONFIG_ATA=y · 48 unmodified lines
4949 CONFIG_PATA_FTIDE010=y
5050 CONFIG_NETDEVICES=y
5151 CONFIG_TUN=y
52+CONFIG_NET_DSA_REALTEK=y
5253 CONFIG_NET_DSA_REALTEK_SMI=y
54+CONFIG_NET_DSA_REALTEK_RTL8366RB=y
5355 CONFIG_GEMINI_ETHERNET=y
56+CONFIG_MARVELL_PHY=y
5457 CONFIG_MDIO_BITBANG=y
5558 CONFIG_MDIO_GPIO=y
56−CONFIG_MARVELL_PHY=y
5759 CONFIG_INPUT_EVDEV=y
5860 CONFIG_KEYBOARD_GPIO=y
5961 # CONFIG_INPUT_MOUSE is not set
@@ -66,6 +68,7 @@ CONFIG_SERIAL_OF_PLATFORM=y · 6 unmodified lines
6668 CONFIG_I2C_GPIO=y
6769 CONFIG_SPI=y
6870 CONFIG_SPI_GPIO=y
71+CONFIG_SENSORS_DRIVETEMP=y
6972 CONFIG_SENSORS_GPIO_FAN=y
7073 CONFIG_SENSORS_LM75=y
7174 CONFIG_THERMAL=y
arch/arm/configs/imote2_defconfig+0−365
@@ -1,365 +0,0 @@
1−# CONFIG_LOCALVERSION_AUTO is not set
2−CONFIG_SYSVIPC=y
3−CONFIG_LOG_BUF_SHIFT=14
4−CONFIG_SYSFS_DEPRECATED_V2=y
5−CONFIG_BLK_DEV_INITRD=y
6−CONFIG_RD_BZIP2=y
7−CONFIG_RD_LZMA=y
8−CONFIG_EXPERT=y
9−# CONFIG_COMPAT_BRK is not set
10−CONFIG_SLAB=y
11−CONFIG_MODULES=y
12−CONFIG_MODULE_UNLOAD=y
13−CONFIG_MODULE_FORCE_UNLOAD=y
14−CONFIG_MODVERSIONS=y
15−# CONFIG_BLK_DEV_BSG is not set
16−CONFIG_ARCH_PXA=y
17−CONFIG_MACH_INTELMOTE2=y
18−CONFIG_NO_HZ=y
19−CONFIG_HIGH_RES_TIMERS=y
20−CONFIG_PREEMPT=y
21−CONFIG_AEABI=y
22−CONFIG_ZBOOT_ROM_TEXT=0x0
23−CONFIG_ZBOOT_ROM_BSS=0x0
24−CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS2,115200 mem=32M"
25−CONFIG_KEXEC=y
26−CONFIG_FPE_NWFPE=y
27−CONFIG_BINFMT_AOUT=m
28−CONFIG_BINFMT_MISC=m
29−CONFIG_PM=y
30−CONFIG_APM_EMULATION=y
31−CONFIG_NET=y
32−CONFIG_PACKET=y
33−CONFIG_UNIX=y
34−CONFIG_INET=y
35−CONFIG_IP_PNP=y
36−CONFIG_IP_PNP_DHCP=y
37−CONFIG_IP_PNP_BOOTP=y
38−CONFIG_IP_PNP_RARP=y
39−CONFIG_SYN_COOKIES=y
40−# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
41−# CONFIG_INET_XFRM_MODE_TUNNEL is not set
42−# CONFIG_INET_XFRM_MODE_BEET is not set
43−# CONFIG_INET_DIAG is not set
44−CONFIG_INET6_AH=m
45−CONFIG_INET6_ESP=m
46−CONFIG_INET6_IPCOMP=m
47−CONFIG_IPV6_MIP6=m
48−CONFIG_IPV6_TUNNEL=m
49−CONFIG_IPV6_MULTIPLE_TABLES=y
50−CONFIG_IPV6_SUBTREES=y
51−CONFIG_NETFILTER=y
52−CONFIG_NETFILTER_NETLINK_QUEUE=m
53−CONFIG_NF_CONNTRACK=m
54−CONFIG_NF_CONNTRACK_EVENTS=y
55−CONFIG_NF_CT_PROTO_SCTP=y
56−CONFIG_NF_CT_PROTO_UDPLITE=y
57−CONFIG_NF_CONNTRACK_AMANDA=m
58−CONFIG_NF_CONNTRACK_FTP=m
59−CONFIG_NF_CONNTRACK_H323=m
60−CONFIG_NF_CONNTRACK_IRC=m
61−CONFIG_NF_CONNTRACK_NETBIOS_NS=m
62−CONFIG_NF_CONNTRACK_PPTP=m
63−CONFIG_NF_CONNTRACK_SANE=m
64−CONFIG_NF_CONNTRACK_SIP=m
65−CONFIG_NF_CONNTRACK_TFTP=m
66−CONFIG_NF_CT_NETLINK=m
67−CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
68−CONFIG_NETFILTER_XT_TARGET_LED=m
69−CONFIG_NETFILTER_XT_TARGET_MARK=m
70−CONFIG_NETFILTER_XT_TARGET_NFLOG=m
71−CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
72−CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
73−CONFIG_NETFILTER_XT_MATCH_COMMENT=m
74−CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
75−CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
76−CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
77−CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
78−CONFIG_NETFILTER_XT_MATCH_DCCP=m
79−CONFIG_NETFILTER_XT_MATCH_DSCP=m
80−CONFIG_NETFILTER_XT_MATCH_ESP=m
81−CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
82−CONFIG_NETFILTER_XT_MATCH_HELPER=m
83−CONFIG_NETFILTER_XT_MATCH_LENGTH=m
84−CONFIG_NETFILTER_XT_MATCH_LIMIT=m
85−CONFIG_NETFILTER_XT_MATCH_MAC=m
86−CONFIG_NETFILTER_XT_MATCH_MARK=m
87−CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
88−CONFIG_NETFILTER_XT_MATCH_POLICY=m
89−CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
90−CONFIG_NETFILTER_XT_MATCH_QUOTA=m
91−CONFIG_NETFILTER_XT_MATCH_REALM=m
92−CONFIG_NETFILTER_XT_MATCH_SCTP=m
93−CONFIG_NETFILTER_XT_MATCH_STATE=m
94−CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
95−CONFIG_NETFILTER_XT_MATCH_STRING=m
96−CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
97−CONFIG_NETFILTER_XT_MATCH_TIME=m
98−CONFIG_NETFILTER_XT_MATCH_U32=m
99−CONFIG_NF_CONNTRACK_IPV4=m
100−CONFIG_IP_NF_IPTABLES=m
101−CONFIG_IP_NF_MATCH_ADDRTYPE=m
102−CONFIG_IP_NF_MATCH_AH=m
103−CONFIG_IP_NF_MATCH_ECN=m
104−CONFIG_IP_NF_MATCH_TTL=m
105−CONFIG_IP_NF_FILTER=m
106−CONFIG_IP_NF_TARGET_REJECT=m
107−CONFIG_IP_NF_TARGET_LOG=m
108−CONFIG_NF_NAT=m
109−CONFIG_IP_NF_TARGET_MASQUERADE=m
110−CONFIG_IP_NF_TARGET_NETMAP=m
111−CONFIG_IP_NF_TARGET_REDIRECT=m
112−CONFIG_NF_NAT_SNMP_BASIC=m
113−CONFIG_IP_NF_MANGLE=m
114−CONFIG_IP_NF_TARGET_CLUSTERIP=m
115−CONFIG_IP_NF_TARGET_ECN=m
116−CONFIG_IP_NF_TARGET_TTL=m
117−CONFIG_IP_NF_RAW=m
118−CONFIG_IP_NF_ARPTABLES=m
119−CONFIG_IP_NF_ARPFILTER=m
120−CONFIG_IP_NF_ARP_MANGLE=m
121−CONFIG_NF_CONNTRACK_IPV6=m
122−CONFIG_IP6_NF_IPTABLES=m
123−CONFIG_IP6_NF_MATCH_AH=m
124−CONFIG_IP6_NF_MATCH_EUI64=m
125−CONFIG_IP6_NF_MATCH_FRAG=m
126−CONFIG_IP6_NF_MATCH_OPTS=m
127−CONFIG_IP6_NF_MATCH_HL=m
128−CONFIG_IP6_NF_MATCH_IPV6HEADER=m
129−CONFIG_IP6_NF_MATCH_MH=m
130−CONFIG_IP6_NF_MATCH_RT=m
131−CONFIG_IP6_NF_TARGET_HL=m
132−CONFIG_IP6_NF_FILTER=m
133−CONFIG_IP6_NF_TARGET_REJECT=m
134−CONFIG_IP6_NF_MANGLE=m
135−CONFIG_IP6_NF_RAW=m
136−CONFIG_BRIDGE=m
137−# CONFIG_BRIDGE_IGMP_SNOOPING is not set
138−CONFIG_IEEE802154=y
139−# CONFIG_WIRELESS is not set
140−CONFIG_DEVTMPFS=y
141−CONFIG_DEVTMPFS_MOUNT=y
142−CONFIG_FW_LOADER=m
143−CONFIG_CONNECTOR=m
144−CONFIG_MTD=y
145−CONFIG_MTD_CMDLINE_PARTS=y
146−CONFIG_MTD_AFS_PARTS=y
147−CONFIG_MTD_AR7_PARTS=y
148−CONFIG_MTD_BLOCK=y
149−CONFIG_MTD_CFI=y
150−CONFIG_MTD_CFI_ADV_OPTIONS=y
151−CONFIG_MTD_CFI_GEOMETRY=y
152−# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
153−# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
154−# CONFIG_MTD_CFI_I2 is not set
155−CONFIG_MTD_OTP=y
156−CONFIG_MTD_CFI_INTELEXT=y
157−CONFIG_MTD_PXA2XX=y
158−CONFIG_BLK_DEV_LOOP=m
159−CONFIG_BLK_DEV_CRYPTOLOOP=m
160−CONFIG_BLK_DEV_NBD=m
161−CONFIG_BLK_DEV_RAM=y
162−CONFIG_NETDEVICES=y
163−CONFIG_DUMMY=y
164−# CONFIG_WLAN is not set
165−CONFIG_PPP=m
166−CONFIG_PPP_MULTILINK=y
167−CONFIG_PPP_FILTER=y
168−CONFIG_PPP_ASYNC=m
169−CONFIG_PPP_SYNC_TTY=m
170−CONFIG_PPP_DEFLATE=m
171−CONFIG_PPP_BSDCOMP=m
172−# CONFIG_INPUT_MOUSEDEV is not set
173−CONFIG_INPUT_EVDEV=y
174−# CONFIG_KEYBOARD_ATKBD is not set
175−CONFIG_KEYBOARD_GPIO=y
176−CONFIG_KEYBOARD_PXA27x=y
177−# CONFIG_INPUT_MOUSE is not set
178−CONFIG_INPUT_TOUCHSCREEN=y
179−CONFIG_INPUT_MISC=y
180−CONFIG_INPUT_UINPUT=y
181−# CONFIG_SERIO is not set
182−CONFIG_SERIAL_PXA=y
183−CONFIG_SERIAL_PXA_CONSOLE=y
184−CONFIG_LEGACY_PTY_COUNT=8
185−# CONFIG_HW_RANDOM is not set
186−CONFIG_I2C=y
187−CONFIG_I2C_CHARDEV=y
188−CONFIG_I2C_PXA=y
189−CONFIG_SPI=y
190−CONFIG_SPI_PXA2XX=y
191−CONFIG_GPIO_SYSFS=y
192−CONFIG_POWER_SUPPLY=y
193−# CONFIG_HWMON is not set
194−CONFIG_PMIC_DA903X=y
195−CONFIG_REGULATOR=y
196−CONFIG_REGULATOR_DEBUG=y
197−CONFIG_REGULATOR_DA903X=y
198−CONFIG_MEDIA_SUPPORT=y
199−CONFIG_VIDEO_DEV=y
200−CONFIG_MEDIA_TUNER_CUSTOMISE=y
201−# CONFIG_MEDIA_TUNER_SIMPLE is not set
202−# CONFIG_MEDIA_TUNER_TDA8290 is not set
203−# CONFIG_MEDIA_TUNER_TDA827X is not set
204−# CONFIG_MEDIA_TUNER_TDA18271 is not set
205−# CONFIG_MEDIA_TUNER_TDA9887 is not set
206−# CONFIG_MEDIA_TUNER_TEA5761 is not set
207−# CONFIG_MEDIA_TUNER_TEA5767 is not set
208−# CONFIG_MEDIA_TUNER_MT20XX is not set
209−# CONFIG_MEDIA_TUNER_MT2060 is not set
210−# CONFIG_MEDIA_TUNER_MT2266 is not set
211−# CONFIG_MEDIA_TUNER_MT2131 is not set
212−# CONFIG_MEDIA_TUNER_QT1010 is not set
213−# CONFIG_MEDIA_TUNER_XC2028 is not set
214−# CONFIG_MEDIA_TUNER_XC5000 is not set
215−# CONFIG_MEDIA_TUNER_MXL5005S is not set
216−# CONFIG_MEDIA_TUNER_MXL5007T is not set
217−# CONFIG_MEDIA_TUNER_MC44S803 is not set
218−# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
219−CONFIG_VIDEO_PXA27x=y
220−# CONFIG_V4L_USB_DRIVERS is not set
221−# CONFIG_RADIO_ADAPTERS is not set
222−CONFIG_FB=y
223−CONFIG_FB_PXA=y
224−CONFIG_FB_PXA_OVERLAY=y
225−CONFIG_FB_PXA_PARAMETERS=y
226−# CONFIG_LCD_CLASS_DEVICE is not set
227−CONFIG_BACKLIGHT_CLASS_DEVICE=y
228−# CONFIG_VGA_CONSOLE is not set
229−CONFIG_FRAMEBUFFER_CONSOLE=y
230−CONFIG_FONTS=y
231−CONFIG_FONT_MINI_4x6=y
232−CONFIG_SOUND=y
233−CONFIG_SND=y
234−CONFIG_SND_MIXER_OSS=y
235−CONFIG_SND_PCM_OSS=y
236−# CONFIG_SND_DRIVERS is not set
237−# CONFIG_SND_ARM is not set
238−# CONFIG_SND_SPI is not set
239−# CONFIG_SND_USB is not set
240−CONFIG_SND_SOC=y
241−CONFIG_SND_PXA2XX_SOC=y
242−# CONFIG_USB_HID is not set
243−CONFIG_USB=y
244−CONFIG_USB_OHCI_HCD=y
245−CONFIG_USB_GADGET=y
246−CONFIG_USB_PXA27X=y
247−CONFIG_USB_ETH=m
248−# CONFIG_USB_ETH_RNDIS is not set
249−CONFIG_MMC=y
250−CONFIG_SDIO_UART=m
251−CONFIG_MMC_PXA=y
252−CONFIG_MMC_SPI=y
253−CONFIG_NEW_LEDS=y
254−CONFIG_LEDS_CLASS=y
255−CONFIG_LEDS_LP3944=y
256−CONFIG_LEDS_TRIGGERS=y
257−CONFIG_LEDS_TRIGGER_TIMER=y
258−CONFIG_LEDS_TRIGGER_HEARTBEAT=y
259−CONFIG_LEDS_TRIGGER_BACKLIGHT=y
260−CONFIG_LEDS_TRIGGER_GPIO=y
261−CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
262−CONFIG_RTC_CLASS=y
263−CONFIG_RTC_DRV_PXA=y
264−CONFIG_EXT2_FS=y
265−CONFIG_EXT3_FS=m
266−CONFIG_AUTOFS4_FS=y
267−CONFIG_FUSE_FS=m
268−CONFIG_CUSE=m
269−CONFIG_MSDOS_FS=m
270−CONFIG_VFAT_FS=m
271−CONFIG_TMPFS=y
272−CONFIG_JFFS2_FS=y
273−CONFIG_JFFS2_FS_WBUF_VERIFY=y
274−CONFIG_JFFS2_SUMMARY=y
275−CONFIG_JFFS2_FS_XATTR=y
276−CONFIG_JFFS2_COMPRESSION_OPTIONS=y
277−CONFIG_JFFS2_LZO=y
278−CONFIG_JFFS2_RUBIN=y
279−CONFIG_CRAMFS=m
280−CONFIG_SQUASHFS=m
281−CONFIG_ROMFS_FS=m
282−CONFIG_NFS_FS=y
283−CONFIG_NFS_V3=y
284−CONFIG_NFS_V3_ACL=y
285−CONFIG_NFSD=m
286−CONFIG_NFSD_V3_ACL=y
287−CONFIG_SMB_FS=m
288−CONFIG_CIFS=m
289−CONFIG_CIFS_STATS=y
290−CONFIG_CIFS_XATTR=y
291−CONFIG_CIFS_POSIX=y
292−CONFIG_NLS_CODEPAGE_437=m
293−CONFIG_NLS_CODEPAGE_737=m
294−CONFIG_NLS_CODEPAGE_775=m
295−CONFIG_NLS_CODEPAGE_850=m
296−CONFIG_NLS_CODEPAGE_852=m
297−CONFIG_NLS_CODEPAGE_855=m
298−CONFIG_NLS_CODEPAGE_857=m
299−CONFIG_NLS_CODEPAGE_860=m
300−CONFIG_NLS_CODEPAGE_861=m
301−CONFIG_NLS_CODEPAGE_862=m
302−CONFIG_NLS_CODEPAGE_863=m
303−CONFIG_NLS_CODEPAGE_864=m
304−CONFIG_NLS_CODEPAGE_865=m
305−CONFIG_NLS_CODEPAGE_866=m
306−CONFIG_NLS_CODEPAGE_869=m
307−CONFIG_NLS_CODEPAGE_936=m
308−CONFIG_NLS_CODEPAGE_950=m
309−CONFIG_NLS_CODEPAGE_932=m
310−CONFIG_NLS_CODEPAGE_949=m
311−CONFIG_NLS_CODEPAGE_874=m
312−CONFIG_NLS_ISO8859_8=m
313−CONFIG_NLS_CODEPAGE_1250=m
314−CONFIG_NLS_CODEPAGE_1251=m
315−CONFIG_NLS_ASCII=m
316−CONFIG_NLS_ISO8859_1=m
317−CONFIG_NLS_ISO8859_2=m
318−CONFIG_NLS_ISO8859_3=m
319−CONFIG_NLS_ISO8859_4=m
320−CONFIG_NLS_ISO8859_5=m
321−CONFIG_NLS_ISO8859_6=m
322−CONFIG_NLS_ISO8859_7=m
323−CONFIG_NLS_ISO8859_9=m
324−CONFIG_NLS_ISO8859_13=m
325−CONFIG_NLS_ISO8859_14=m
326−CONFIG_NLS_ISO8859_15=m
327−CONFIG_NLS_KOI8_R=m
328−CONFIG_NLS_KOI8_U=m
329−CONFIG_NLS_UTF8=m
330−CONFIG_PRINTK_TIME=y
331−CONFIG_DEBUG_FS=y
332−CONFIG_DEBUG_KERNEL=y
333−# CONFIG_SCHED_DEBUG is not set
334−CONFIG_DEBUG_RT_MUTEXES=y
335−CONFIG_PROVE_LOCKING=y
336−# CONFIG_FTRACE is not set
337−CONFIG_DEBUG_USER=y
338−CONFIG_CRYPTO_NULL=m
339−CONFIG_CRYPTO_CRYPTD=m
340−CONFIG_CRYPTO_TEST=m
341−CONFIG_CRYPTO_ECB=m
342−CONFIG_CRYPTO_LRW=m
343−CONFIG_CRYPTO_PCBC=m
344−CONFIG_CRYPTO_XTS=m
345−CONFIG_CRYPTO_XCBC=m
346−CONFIG_CRYPTO_VMAC=m
347−CONFIG_CRYPTO_GHASH=m
348−CONFIG_CRYPTO_MD4=m
349−CONFIG_CRYPTO_MICHAEL_MIC=m
350−CONFIG_CRYPTO_SHA256=m
351−CONFIG_CRYPTO_SHA512=m
352−CONFIG_CRYPTO_TGR192=m
353−CONFIG_CRYPTO_AES=m
354−CONFIG_CRYPTO_ARC4=m
355−CONFIG_CRYPTO_BLOWFISH=m
356−CONFIG_CRYPTO_CAST5=m
357−CONFIG_CRYPTO_CAST6=m
358−CONFIG_CRYPTO_FCRYPT=m
359−CONFIG_CRYPTO_KHAZAD=m
360−CONFIG_CRYPTO_SEED=m
361−CONFIG_CRYPTO_SERPENT=m
362−CONFIG_CRYPTO_TEA=m
363−CONFIG_CRYPTO_TWOFISH=m
364−# CONFIG_CRYPTO_ANSI_CPRNG is not set
365−CONFIG_CRC16=y
arch/arm/configs/multi_v7_defconfig+1−0
@@ -673,6 +673,7 @@ CONFIG_VIDEO_STI_DELTA=m · 672 unmodified lines
673673 CONFIG_VIDEO_RENESAS_FDP1=m
674674 CONFIG_VIDEO_RENESAS_JPU=m
675675 CONFIG_VIDEO_RENESAS_VSP1=m
676+CONFIG_VIDEO_TEGRA_VDE=m
676677 CONFIG_V4L_TEST_DRIVERS=y
677678 CONFIG_VIDEO_VIVID=m
678679 CONFIG_VIDEO_ADV7180=m
arch/arm/configs/tegra_defconfig+2−1
@@ -286,7 +286,8 @@ CONFIG_SERIO_NVEC_PS2=y · 285 unmodified lines
286286 CONFIG_NVEC_POWER=y
287287 CONFIG_NVEC_PAZ00=y
288288 CONFIG_STAGING_MEDIA=y
289−CONFIG_TEGRA_VDE=y
289+CONFIG_V4L_MEM2MEM_DRIVERS=y
290+CONFIG_VIDEO_TEGRA_VDE=y
290291 CONFIG_CHROME_PLATFORMS=y
291292 CONFIG_CROS_EC=y
292293 CONFIG_CROS_EC_I2C=m
arch/arm/configs/u8500_defconfig+15−4
@@ -20,7 +20,6 @@ CONFIG_VFP=y · 19 unmodified lines
2020 CONFIG_NEON=y
2121 CONFIG_MODULES=y
2222 CONFIG_MODULE_UNLOAD=y
23−# CONFIG_BLK_DEV_BSG is not set
2423 CONFIG_PARTITION_ADVANCED=y
2524 CONFIG_CMA=y
2625 CONFIG_NET=y
@@ -41,6 +40,8 @@ CONFIG_MAC80211_LEDS=y · 14 unmodified lines
4140 CONFIG_CAIF=y
4241 CONFIG_DEVTMPFS=y
4342 CONFIG_DEVTMPFS_MOUNT=y
43+CONFIG_GNSS=y
44+CONFIG_GNSS_SIRF_SERIAL=y
4445 CONFIG_BLK_DEV_RAM=y
4546 CONFIG_BLK_DEV_RAM_SIZE=65536
4647 CONFIG_NETDEVICES=y
@@ -83,6 +84,8 @@ CONFIG_SPI_GPIO=y · 36 unmodified lines
8384 CONFIG_SPI_PL022=y
8485 CONFIG_GPIO_STMPE=y
8586 CONFIG_GPIO_TC3589X=y
87+CONFIG_BATTERY_SAMSUNG_SDI=y
88+CONFIG_AB8500_BM=y
8689 CONFIG_SENSORS_IIO_HWMON=y
8790 CONFIG_SENSORS_NTC_THERMISTOR=y
8891 CONFIG_THERMAL=y
@@ -98,10 +101,13 @@ CONFIG_VIDEO_V4L2_SUBDEV_API=y · 9 unmodified lines
98101 CONFIG_V4L2_FLASH_LED_CLASS=y
99102 CONFIG_DRM=y
100103 CONFIG_DRM_PANEL_NOVATEK_NT35510=y
104+CONFIG_DRM_PANEL_NOVATEK_NT35560=y
105+CONFIG_DRM_PANEL_SAMSUNG_DB7430=y
101106 CONFIG_DRM_PANEL_SAMSUNG_S6D16D0=y
107+CONFIG_DRM_PANEL_SAMSUNG_S6D27A1=y
102108 CONFIG_DRM_PANEL_SAMSUNG_S6E63M0=y
103109 CONFIG_DRM_PANEL_SAMSUNG_S6E63M0_DSI=y
104−CONFIG_DRM_PANEL_SONY_ACX424AKP=y
110+CONFIG_DRM_PANEL_WIDECHIPS_WS2401=y
105111 CONFIG_DRM_LIMA=y
106112 CONFIG_DRM_MCDE=y
107113 CONFIG_FB=y
@@ -129,6 +135,7 @@ CONFIG_LEDS_LM3530=y · 21 unmodified lines
129135 CONFIG_LEDS_GPIO=y
130136 CONFIG_LEDS_LP55XX_COMMON=y
131137 CONFIG_LEDS_LP5521=y
138+CONFIG_LEDS_REGULATOR=y
132139 CONFIG_LEDS_RT8515=y
133140 CONFIG_LEDS_TRIGGER_HEARTBEAT=y
134141 CONFIG_RTC_CLASS=y
@@ -144,17 +151,22 @@ CONFIG_IIO_SW_TRIGGER=y · 9 unmodified lines
144151 CONFIG_BMA180=y
145152 CONFIG_BMC150_ACCEL=y
146153 CONFIG_IIO_ST_ACCEL_3AXIS=y
154+# CONFIG_IIO_ST_ACCEL_SPI_3AXIS is not set
147155 CONFIG_IIO_RESCALE=y
148156 CONFIG_MPU3050_I2C=y
149157 CONFIG_IIO_ST_GYRO_3AXIS=y
158+# CONFIG_IIO_ST_GYRO_SPI_3AXIS is not set
150159 CONFIG_INV_MPU6050_I2C=y
151160 CONFIG_BH1780=y
152161 CONFIG_GP2AP002=y
162+CONFIG_TSL2772=y
153163 CONFIG_AK8974=y
154164 CONFIG_IIO_ST_MAGN_3AXIS=y
165+# CONFIG_IIO_ST_MAGN_SPI_3AXIS is not set
155166 CONFIG_YAMAHA_YAS530=y
156167 CONFIG_IIO_HRTIMER_TRIGGER=y
157168 CONFIG_IIO_ST_PRESS=y
169+# CONFIG_IIO_ST_PRESS_SPI is not set
158170 CONFIG_EXT2_FS=y
159171 CONFIG_EXT2_FS_XATTR=y
160172 CONFIG_EXT2_FS_POSIX_ACL=y
@@ -173,10 +185,9 @@ CONFIG_CRYPTO_DEV_UX500_CRYP=y · 12 unmodified lines
173185 CONFIG_CRYPTO_DEV_UX500_HASH=y
174186 CONFIG_CRYPTO_DEV_UX500_DEBUG=y
175187 CONFIG_PRINTK_TIME=y
176−CONFIG_DEBUG_INFO=y
188+CONFIG_DEBUG_KERNEL=y
177189 CONFIG_MAGIC_SYSRQ=y
178190 CONFIG_DEBUG_FS=y
179−CONFIG_DEBUG_KERNEL=y
180191 # CONFIG_SCHED_DEBUG is not set
181192 # CONFIG_FTRACE is not set
182193 CONFIG_DEBUG_USER=y
arch/arm/mach-davinci/board-da850-evm.c+3−1
@@ -1101,11 +1101,13 @@ static int __init da850_evm_config_emac(void) · 1100 unmodified lines
11011101 int ret;
11021102 u32 val;
11031103 struct davinci_soc_info *soc_info = &davinci_soc_info;
1104− u8 rmii_en = soc_info->emac_pdata->rmii_en;
1104+ u8 rmii_en;
11051105
11061106 if (!machine_is_davinci_da850_evm())
11071107 return 0;
11081108
1109+ rmii_en = soc_info->emac_pdata->rmii_en;
1110+
11091111 cfg_chip3_base = DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG);
11101112
11111113 val = __raw_readl(cfg_chip3_base);
arch/arm/mach-ep93xx/clock.c+4−2
@@ -148,8 +148,10 @@ static struct clk_hw *ep93xx_clk_register_gate(const char *name, · 147 unmodified lines
148148 psc->lock = &clk_lock;
149149
150150 clk = clk_register(NULL, &psc->hw);
151− if (IS_ERR(clk))
151+ if (IS_ERR(clk)) {
152152 kfree(psc);
153+ return ERR_CAST(clk);
154+ }
153155
154156 return &psc->hw;
155157 }
@@ -207,7 +209,7 @@ static int ep93xx_mux_determine_rate(struct clk_hw *hw, · 51 unmodified lines
207209 struct clk_rate_request *req)
208210 {
209211 unsigned long rate = req->rate;
210− struct clk *best_parent = 0;
212+ struct clk *best_parent = NULL;
211213 unsigned long __parent_rate;
212214 unsigned long best_rate = 0, actual_rate, mclk_rate;
213215 unsigned long best_parent_rate;
arch/arm/mach-exynos/Kconfig+0−1
@@ -17,7 +17,6 @@ menuconfig ARCH_EXYNOS · 16 unmodified lines
1717 select EXYNOS_PMU
1818 select EXYNOS_SROM
1919 select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS
20− select GPIOLIB
2120 select HAVE_ARM_ARCH_TIMER if ARCH_EXYNOS5
2221 select HAVE_ARM_SCU if SMP
2322 select PINCTRL
arch/arm/mach-iop32x/cp6.c+2−0
@@ -7,6 +7,8 @@ · 6 unmodified lines
77 #include <asm/traps.h>
88 #include <asm/ptrace.h>
99
10+#include "iop3xx.h"
11+
1012 void iop_enable_cp6(void)
1113 {
1214 u32 temp;
arch/arm/mach-omap2/omap4-common.c+2−0
@@ -314,10 +314,12 @@ void __init omap_gic_of_init(void) · 313 unmodified lines
314314
315315 np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-gic");
316316 gic_dist_base_addr = of_iomap(np, 0);
317+ of_node_put(np);
317318 WARN_ON(!gic_dist_base_addr);
318319
319320 np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-twd-timer");
320321 twd_base = of_iomap(np, 0);
322+ of_node_put(np);
321323 WARN_ON(!twd_base);
322324
323325 skip_errata_init:
arch/arm/mach-vexpress/spc.c+14−14
@@ -122,13 +122,13 @@ static inline bool cluster_is_a15(u32 cluster) · 121 unmodified lines
122122 }
123123
124124 /**
125− * ve_spc_global_wakeup_irq()
125+ * ve_spc_global_wakeup_irq() - sets/clears global wakeup IRQs
126+ *
127+ * @set: if true, global wake-up IRQs are set, if false they are cleared
126128 *
127129 * Function to set/clear global wakeup IRQs. Not protected by locking since
128130 * it might be used in code paths where normal cacheable locks are not
129131 * working. Locking must be provided by the caller to ensure atomicity.
130− *
131− * @set: if true, global wake-up IRQs are set, if false they are cleared
132132 */
133133 void ve_spc_global_wakeup_irq(bool set)
134134 {
@@ -145,15 +145,15 @@ void ve_spc_global_wakeup_irq(bool set) · 10 unmodified lines
145145 }
146146
147147 /**
148− * ve_spc_cpu_wakeup_irq()
149− *
150− * Function to set/clear per-CPU wake-up IRQs. Not protected by locking since
151− * it might be used in code paths where normal cacheable locks are not
152− * working. Locking must be provided by the caller to ensure atomicity.
148+ * ve_spc_cpu_wakeup_irq() - sets/clears per-CPU wake-up IRQs
153149 *
154150 * @cluster: mpidr[15:8] bitfield describing cluster affinity level
155151 * @cpu: mpidr[7:0] bitfield describing cpu affinity level
156152 * @set: if true, wake-up IRQs are set, if false they are cleared
153+ *
154+ * Function to set/clear per-CPU wake-up IRQs. Not protected by locking since
155+ * it might be used in code paths where normal cacheable locks are not
156+ * working. Locking must be provided by the caller to ensure atomicity.
157157 */
158158 void ve_spc_cpu_wakeup_irq(u32 cluster, u32 cpu, bool set)
159159 {
@@ -200,14 +200,14 @@ void ve_spc_set_resume_addr(u32 cluster, u32 cpu, u32 addr) · 40 unmodified lines
200200 }
201201
202202 /**
203− * ve_spc_powerdown()
203+ * ve_spc_powerdown() - enables/disables cluster powerdown
204+ *
205+ * @cluster: mpidr[15:8] bitfield describing cluster affinity level
206+ * @enable: if true enables powerdown, if false disables it
204207 *
205208 * Function to enable/disable cluster powerdown. Not protected by locking
206209 * since it might be used in code paths where normal cacheable locks are not
207210 * working. Locking must be provided by the caller to ensure atomicity.
208− *
209− * @cluster: mpidr[15:8] bitfield describing cluster affinity level
210− * @enable: if true enables powerdown, if false disables it
211211 */
212212 void ve_spc_powerdown(u32 cluster, bool enable)
213213 {
@@ -228,7 +228,7 @@ static u32 standbywfi_cpu_mask(u32 cpu, u32 cluster) · 14 unmodified lines
228228 }
229229
230230 /**
231− * ve_spc_cpu_in_wfi(u32 cpu, u32 cluster)
231+ * ve_spc_cpu_in_wfi() - Checks if the specified CPU is in WFI or not
232232 *
233233 * @cpu: mpidr[7:0] bitfield describing CPU affinity level within cluster
234234 * @cluster: mpidr[15:8] bitfield describing cluster affinity level
@@ -580,7 +580,7 @@ static int __init ve_spc_clk_init(void) · 345 unmodified lines
580580 }
581581
582582 cluster = topology_physical_package_id(cpu_dev->id);
583− if (init_opp_table[cluster])
583+ if (cluster < 0 || init_opp_table[cluster])
584584 continue;
585585
586586 if (ve_init_opp_table(cpu_dev))
arch/arm/xen/enlighten.c+7−2
@@ -337,12 +337,15 @@ int __init arch_xen_unpopulated_init(struct resource **res) · 336 unmodified lines
337337
338338 if (!nr_reg) {
339339 pr_err("No extended regions are found\n");
340+ of_node_put(np);
340341 return -EINVAL;
341342 }
342343
343344 regs = kcalloc(nr_reg, sizeof(*regs), GFP_KERNEL);
344− if (!regs)
345+ if (!regs) {
346+ of_node_put(np);
345347 return -ENOMEM;
348+ }
346349
347350 /*
348351 * Create resource from extended regions provided by the hypervisor to be
@@ -403,8 +406,8 @@ int __init arch_xen_unpopulated_init(struct resource **res) · 54 unmodified lines
403406 *res = &xen_resource;
404407
405408 err:
409+ of_node_put(np);
406410 kfree(regs);
407−
408411 return rc;
409412 }
410413 #endif
@@ -424,8 +427,10 @@ static void __init xen_dt_guest_init(void) · 13 unmodified lines
424427
425428 if (of_address_to_resource(xen_node, GRANT_TABLE_INDEX, &res)) {
426429 pr_err("Xen grant table region is not found\n");
430+ of_node_put(xen_node);
427431 return;
428432 }
433+ of_node_put(xen_node);
429434 xen_grant_frames = res.start;
430435 }
431436
arch/arm64/Kconfig+12−3
@@ -175,8 +175,6 @@ config ARM64 · 174 unmodified lines
175175 select HAVE_DEBUG_KMEMLEAK
176176 select HAVE_DMA_CONTIGUOUS
177177 select HAVE_DYNAMIC_FTRACE
178− select HAVE_DYNAMIC_FTRACE_WITH_REGS \
179− if $(cc-option,-fpatchable-function-entry=2)
180178 select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY \
181179 if DYNAMIC_FTRACE_WITH_REGS
182180 select HAVE_EFFICIENT_UNALIGNED_ACCESS
@@ -228,6 +226,17 @@ config ARM64 · 45 unmodified lines
228226 help
229227 ARM 64-bit (AArch64) Linux support.
230228
229+config CLANG_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS
230+ def_bool CC_IS_CLANG
231+ # https://github.com/ClangBuiltLinux/linux/issues/1507
232+ depends on AS_IS_GNU || (AS_IS_LLVM && (LD_IS_LLD || LD_VERSION >= 23600))
233+ select HAVE_DYNAMIC_FTRACE_WITH_REGS
234+
235+config GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS
236+ def_bool CC_IS_GCC
237+ depends on $(cc-option,-fpatchable-function-entry=2)
238+ select HAVE_DYNAMIC_FTRACE_WITH_REGS
239+
231240 config 64BIT
232241 def_bool y
233242
@@ -678,7 +687,7 @@ config ARM64_ERRATUM_2051678 · 444 unmodified lines
678687 default y
679688 help
680689 This options adds the workaround for ARM Cortex-A510 erratum ARM64_ERRATUM_2051678.
681− Affected Coretex-A510 might not respect the ordering rules for
690+ Affected Cortex-A510 might not respect the ordering rules for
682691 hardware update of the page table's dirty bit. The workaround
683692 is to not enable the feature on affected CPUs.
684693
arch/arm64/boot/dts/amlogic/meson-g12b-a311d.dtsi+0−40
@@ -11,26 +11,6 @@ · 10 unmodified lines
1111 compatible = "operating-points-v2";
1212 opp-shared;
1313
14− opp-100000000 {
15− opp-hz = /bits/ 64 <100000000>;
16− opp-microvolt = <731000>;
17− };
18−
19− opp-250000000 {
20− opp-hz = /bits/ 64 <250000000>;
21− opp-microvolt = <731000>;
22− };
23−
24− opp-500000000 {
25− opp-hz = /bits/ 64 <500000000>;
26− opp-microvolt = <731000>;
27− };
28−
29− opp-667000000 {
30− opp-hz = /bits/ 64 <667000000>;
31− opp-microvolt = <731000>;
32− };
33−
3414 opp-1000000000 {
3515 opp-hz = /bits/ 64 <1000000000>;
3616 opp-microvolt = <761000>;
@@ -71,26 +51,6 @@ · 34 unmodified lines
7151 compatible = "operating-points-v2";
7252 opp-shared;
7353
74− opp-100000000 {
75− opp-hz = /bits/ 64 <100000000>;
76− opp-microvolt = <731000>;
77− };
78−
79− opp-250000000 {
80− opp-hz = /bits/ 64 <250000000>;
81− opp-microvolt = <731000>;
82− };
83−
84− opp-500000000 {
85− opp-hz = /bits/ 64 <500000000>;
86− opp-microvolt = <731000>;
87− };
88−
89− opp-667000000 {
90− opp-hz = /bits/ 64 <667000000>;
91− opp-microvolt = <731000>;
92− };
93−
9454 opp-1000000000 {
9555 opp-hz = /bits/ 64 <1000000000>;
9656 opp-microvolt = <731000>;
arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi+0−40
@@ -11,26 +11,6 @@ · 10 unmodified lines
1111 compatible = "operating-points-v2";
1212 opp-shared;
1313
14− opp-100000000 {
15− opp-hz = /bits/ 64 <100000000>;
16− opp-microvolt = <731000>;
17− };
18−
19− opp-250000000 {
20− opp-hz = /bits/ 64 <250000000>;
21− opp-microvolt = <731000>;
22− };
23−
24− opp-500000000 {
25− opp-hz = /bits/ 64 <500000000>;
26− opp-microvolt = <731000>;
27− };
28−
29− opp-667000000 {
30− opp-hz = /bits/ 64 <667000000>;
31− opp-microvolt = <731000>;
32− };
33−
3414 opp-1000000000 {
3515 opp-hz = /bits/ 64 <1000000000>;
3616 opp-microvolt = <731000>;
@@ -76,26 +56,6 @@ · 39 unmodified lines
7656 compatible = "operating-points-v2";
7757 opp-shared;
7858
79− opp-100000000 {
80− opp-hz = /bits/ 64 <100000000>;
81− opp-microvolt = <751000>;
82− };
83−
84− opp-250000000 {
85− opp-hz = /bits/ 64 <250000000>;
86− opp-microvolt = <751000>;
87− };
88−
89− opp-500000000 {
90− opp-hz = /bits/ 64 <500000000>;
91− opp-microvolt = <751000>;
92− };
93−
94− opp-667000000 {
95− opp-hz = /bits/ 64 <667000000>;
96− opp-microvolt = <751000>;
97− };
98−
9959 opp-1000000000 {
10060 opp-hz = /bits/ 64 <1000000000>;
10161 opp-microvolt = <771000>;
arch/arm64/boot/dts/amlogic/meson-s4.dtsi+4−4
@@ -13,28 +13,28 @@ · 12 unmodified lines
1313
1414 cpu0: cpu@0 {
1515 device_type = "cpu";
16− compatible = "arm,cortex-a35","arm,armv8";
16+ compatible = "arm,cortex-a35";
1717 reg = <0x0 0x0>;
1818 enable-method = "psci";
1919 };
2020
2121 cpu1: cpu@1 {
2222 device_type = "cpu";
23− compatible = "arm,cortex-a35","arm,armv8";
23+ compatible = "arm,cortex-a35";
2424 reg = <0x0 0x1>;
2525 enable-method = "psci";
2626 };
2727
2828 cpu2: cpu@2 {
2929 device_type = "cpu";
30− compatible = "arm,cortex-a35","arm,armv8";
30+ compatible = "arm,cortex-a35";
3131 reg = <0x0 0x2>;
3232 enable-method = "psci";
3333 };
3434
3535 cpu3: cpu@3 {
3636 device_type = "cpu";
37− compatible = "arm,cortex-a35","arm,armv8";
37+ compatible = "arm,cortex-a35";
3838 reg = <0x0 0x3>;
3939 enable-method = "psci";
4040 };
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts+1−0
@@ -437,6 +437,7 @@ · 436 unmodified lines
437437 "",
438438 "eMMC_RST#", /* BOOT_12 */
439439 "eMMC_DS", /* BOOT_13 */
440+ "", "",
440441 /* GPIOC */
441442 "SD_D0_B", /* GPIOC_0 */
442443 "SD_D1_B", /* GPIOC_1 */
arch/arm64/boot/dts/amlogic/meson-sm1.dtsi+0−20
@@ -95,26 +95,6 @@ · 94 unmodified lines
9595 compatible = "operating-points-v2";
9696 opp-shared;
9797
98− opp-100000000 {
99− opp-hz = /bits/ 64 <100000000>;
100− opp-microvolt = <730000>;
101− };
102−
103− opp-250000000 {
104− opp-hz = /bits/ 64 <250000000>;
105− opp-microvolt = <730000>;
106− };
107−
108− opp-500000000 {
109− opp-hz = /bits/ 64 <500000000>;
110− opp-microvolt = <730000>;
111− };
112−
113− opp-667000000 {
114− opp-hz = /bits/ 64 <666666666>;
115− opp-microvolt = <750000>;
116− };
117−
11898 opp-1000000000 {
11999 opp-hz = /bits/ 64 <1000000000>;
120100 opp-microvolt = <770000>;
arch/arm64/boot/dts/freescale/imx8mm-var-som.dtsi+4−4
@@ -89,12 +89,12 @@ · 88 unmodified lines
8989 pendown-gpio = <&gpio1 3 GPIO_ACTIVE_LOW>;
9090
9191 ti,x-min = /bits/ 16 <125>;
92− touchscreen-size-x = /bits/ 16 <4008>;
92+ touchscreen-size-x = <4008>;
9393 ti,y-min = /bits/ 16 <282>;
94− touchscreen-size-y = /bits/ 16 <3864>;
94+ touchscreen-size-y = <3864>;
9595 ti,x-plate-ohms = /bits/ 16 <180>;
96− touchscreen-max-pressure = /bits/ 16 <255>;
97− touchscreen-average-samples = /bits/ 16 <10>;
96+ touchscreen-max-pressure = <255>;
97+ touchscreen-average-samples = <10>;
9898 ti,debounce-tol = /bits/ 16 <3>;
9999 ti,debounce-rep = /bits/ 16 <1>;
100100 ti,settle-delay-usec = /bits/ 16 <150>;
arch/arm64/boot/dts/freescale/imx8mm-venice-gw71xx.dtsi+3−1
@@ -146,12 +146,14 @@ · 145 unmodified lines
146146
147147 &usbotg1 {
148148 dr_mode = "otg";
149+ over-current-active-low;
149150 vbus-supply = <&reg_usb_otg1_vbus>;
150151 status = "okay";
151152 };
152153
153154 &usbotg2 {
154155 dr_mode = "host";
156+ disable-over-current;
155157 status = "okay";
156158 };
157159
@@ -215,7 +217,7 @@ · 57 unmodified lines
215217 fsl,pins = <
216218 MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6
217219 MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0xd6
218− MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6
220+ MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0xd6
219221 MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0xd6
220222 >;
221223 };
arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx.dtsi+3−1
@@ -211,12 +211,14 @@ · 210 unmodified lines
211211
212212 &usbotg1 {
213213 dr_mode = "otg";
214+ over-current-active-low;
214215 vbus-supply = <&reg_usb_otg1_vbus>;
215216 status = "okay";
216217 };
217218
218219 &usbotg2 {
219220 dr_mode = "host";
221+ disable-over-current;
220222 vbus-supply = <&reg_usb_otg2_vbus>;
221223 status = "okay";
222224 };
@@ -309,7 +311,7 @@ · 86 unmodified lines
309311 fsl,pins = <
310312 MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6
311313 MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0xd6
312− MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6
314+ MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0xd6
313315 MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0xd6
314316 >;
315317 };
arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx.dtsi+3−1
@@ -238,12 +238,14 @@ · 237 unmodified lines
238238
239239 &usbotg1 {
240240 dr_mode = "otg";
241+ over-current-active-low;
241242 vbus-supply = <&reg_usb_otg1_vbus>;
242243 status = "okay";
243244 };
244245
245246 &usbotg2 {
246247 dr_mode = "host";
248+ disable-over-current;
247249 vbus-supply = <&reg_usb_otg2_vbus>;
248250 status = "okay";
249251 };
@@ -358,7 +360,7 @@ · 108 unmodified lines
358360 fsl,pins = <
359361 MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6
360362 MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0xd6
361− MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6
363+ MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0xd6
362364 MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0xd6
363365 >;
364366 };
arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts+4−0
@@ -59,6 +59,10 @@ · 58 unmodified lines
5959 interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
6060 rohm,reset-snvs-powered;
6161
62+ #clock-cells = <0>;
63+ clocks = <&osc_32k 0>;
64+ clock-output-names = "clk-32k-out";
65+
6266 regulators {
6367 buck1_reg: BUCK1 {
6468 regulator-name = "buck1";
arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi+4−4
@@ -70,12 +70,12 @@ · 69 unmodified lines
7070 pendown-gpio = <&gpio1 3 GPIO_ACTIVE_LOW>;
7171
7272 ti,x-min = /bits/ 16 <125>;
73− touchscreen-size-x = /bits/ 16 <4008>;
73+ touchscreen-size-x = <4008>;
7474 ti,y-min = /bits/ 16 <282>;
75− touchscreen-size-y = /bits/ 16 <3864>;
75+ touchscreen-size-y = <3864>;
7676 ti,x-plate-ohms = /bits/ 16 <180>;
77− touchscreen-max-pressure = /bits/ 16 <255>;
78− touchscreen-average-samples = /bits/ 16 <10>;
77+ touchscreen-max-pressure = <255>;
78+ touchscreen-average-samples = <10>;
7979 ti,debounce-tol = /bits/ 16 <3>;
8080 ti,debounce-rep = /bits/ 16 <1>;
8181 ti,settle-delay-usec = /bits/ 16 <150>;
arch/arm64/boot/dts/freescale/imx8mn.dtsi+5−5
@@ -293,7 +293,7 @@ · 292 unmodified lines
293293 ranges;
294294
295295 sai2: sai@30020000 {
296− compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
296+ compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
297297 reg = <0x30020000 0x10000>;
298298 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
299299 clocks = <&clk IMX8MN_CLK_SAI2_IPG>,
@@ -307,7 +307,7 @@ · 7 unmodified lines
307307 };
308308
309309 sai3: sai@30030000 {
310− compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
310+ compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
311311 reg = <0x30030000 0x10000>;
312312 interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
313313 clocks = <&clk IMX8MN_CLK_SAI3_IPG>,
@@ -321,7 +321,7 @@ · 7 unmodified lines
321321 };
322322
323323 sai5: sai@30050000 {
324− compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
324+ compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
325325 reg = <0x30050000 0x10000>;
326326 interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
327327 clocks = <&clk IMX8MN_CLK_SAI5_IPG>,
@@ -337,7 +337,7 @@ · 9 unmodified lines
337337 };
338338
339339 sai6: sai@30060000 {
340− compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
340+ compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
341341 reg = <0x30060000 0x10000>;
342342 interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
343343 clocks = <&clk IMX8MN_CLK_SAI6_IPG>,
@@ -394,7 +394,7 @@ · 50 unmodified lines
394394 };
395395
396396 sai7: sai@300b0000 {
397− compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
397+ compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
398398 reg = <0x300b0000 0x10000>;
399399 interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
400400 clocks = <&clk IMX8MN_CLK_SAI7_IPG>,
arch/arm64/boot/dts/freescale/imx8mq-tqma8mq.dtsi+1−1
@@ -253,7 +253,7 @@ · 252 unmodified lines
253253 #address-cells = <1>;
254254 #size-cells = <1>;
255255 spi-max-frequency = <84000000>;
256− spi-tx-bus-width = <4>;
256+ spi-tx-bus-width = <1>;
257257 spi-rx-bus-width = <4>;
258258 };
259259 };
arch/arm64/boot/dts/freescale/imx8qm.dtsi+1−1
@@ -196,7 +196,7 @@ · 195 unmodified lines
196196 };
197197
198198 clk: clock-controller {
199− compatible = "fsl,imx8qxp-clk", "fsl,scu-clk";
199+ compatible = "fsl,imx8qm-clk", "fsl,scu-clk";
200200 #clock-cells = <2>;
201201 };
202202
arch/arm64/boot/dts/qcom/msm8996.dtsi+2−2
@@ -1249,14 +1249,14 @@ · 1248 unmodified lines
12491249 pins = "gpio47", "gpio48";
12501250 function = "blsp_i2c3";
12511251 drive-strength = <16>;
1252− bias-disable = <0>;
1252+ bias-disable;
12531253 };
12541254
12551255 blsp1_i2c3_sleep: blsp1-i2c2-sleep {
12561256 pins = "gpio47", "gpio48";
12571257 function = "gpio";
12581258 drive-strength = <2>;
1259− bias-disable = <0>;
1259+ bias-disable;
12601260 };
12611261
12621262 blsp2_uart3_4pins_default: blsp2-uart2-4pins {
arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi+1−1
@@ -33,7 +33,7 @@ ap_h1_spi: &spi0 {}; · 32 unmodified lines
3333 };
3434
3535 &alc5682 {
36− realtek,dmic-clk-driving-high = "true";
36+ realtek,dmic-clk-driving-high;
3737 };
3838
3939 &cpu6_alert0 {
arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi+1−1
@@ -630,7 +630,7 @@ · 629 unmodified lines
630630 pins = "gpio6", "gpio25", "gpio26";
631631 function = "gpio";
632632 drive-strength = <8>;
633− bias-disable = <0>;
633+ bias-disable;
634634 };
635635 };
636636
arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts+1−1
@@ -563,7 +563,7 @@ · 562 unmodified lines
563563 config {
564564 pins = "gpio6", "gpio11";
565565 drive-strength = <8>;
566− bias-disable = <0>;
566+ bias-disable;
567567 };
568568 };
569569
arch/arm64/include/asm/kvm_emulate.h+20−8
@@ -40,13 +40,26 @@ void kvm_inject_undefined(struct kvm_vcpu *vcpu); · 39 unmodified lines
4040 void kvm_inject_vabt(struct kvm_vcpu *vcpu);
4141 void kvm_inject_dabt(struct kvm_vcpu *vcpu, unsigned long addr);
4242 void kvm_inject_pabt(struct kvm_vcpu *vcpu, unsigned long addr);
43+void kvm_inject_size_fault(struct kvm_vcpu *vcpu);
4344
4445 void kvm_vcpu_wfi(struct kvm_vcpu *vcpu);
4546
47+#if defined(__KVM_VHE_HYPERVISOR__) || defined(__KVM_NVHE_HYPERVISOR__)
4648 static __always_inline bool vcpu_el1_is_32bit(struct kvm_vcpu *vcpu)
4749 {
4850 return !(vcpu->arch.hcr_el2 & HCR_RW);
4951 }
52+#else
53+static __always_inline bool vcpu_el1_is_32bit(struct kvm_vcpu *vcpu)
54+{
55+ struct kvm *kvm = vcpu->kvm;
56+
57+ WARN_ON_ONCE(!test_bit(KVM_ARCH_FLAG_REG_WIDTH_CONFIGURED,
58+ &kvm->arch.flags));
59+
60+ return test_bit(KVM_ARCH_FLAG_EL1_32BIT, &kvm->arch.flags);
61+}
62+#endif
5063
5164 static inline void vcpu_reset_hcr(struct kvm_vcpu *vcpu)
5265 {
@@ -72,15 +85,14 @@ static inline void vcpu_reset_hcr(struct kvm_vcpu *vcpu) · 19 unmodified lines
7285 vcpu->arch.hcr_el2 |= HCR_TVM;
7386 }
7487
75− if (test_bit(KVM_ARM_VCPU_EL1_32BIT, vcpu->arch.features))
88+ if (vcpu_el1_is_32bit(vcpu))
7689 vcpu->arch.hcr_el2 &= ~HCR_RW;
77−
78− /*
79− * TID3: trap feature register accesses that we virtualise.
80− * For now this is conditional, since no AArch32 feature regs
81− * are currently virtualised.
82− */
83− if (!vcpu_el1_is_32bit(vcpu))
90+ else
91+ /*
92+ * TID3: trap feature register accesses that we virtualise.
93+ * For now this is conditional, since no AArch32 feature regs
94+ * are currently virtualised.
95+ */
8496 vcpu->arch.hcr_el2 |= HCR_TID3;
8597
8698 if (cpus_have_const_cap(ARM64_MISMATCHED_CACHE_TYPE) ||
arch/arm64/include/asm/kvm_host.h+10−0
@@ -127,6 +127,16 @@ struct kvm_arch { · 126 unmodified lines
127127 #define KVM_ARCH_FLAG_MTE_ENABLED 1
128128 /* At least one vCPU has ran in the VM */
129129 #define KVM_ARCH_FLAG_HAS_RAN_ONCE 2
130+ /*
131+ * The following two bits are used to indicate the guest's EL1
132+ * register width configuration. A value of KVM_ARCH_FLAG_EL1_32BIT
133+ * bit is valid only when KVM_ARCH_FLAG_REG_WIDTH_CONFIGURED is set.
134+ * Otherwise, the guest's EL1 register width has not yet been
135+ * determined yet.
136+ */
137+#define KVM_ARCH_FLAG_REG_WIDTH_CONFIGURED 3
138+#define KVM_ARCH_FLAG_EL1_32BIT 4
139+
130140 unsigned long flags;
131141
132142 /*
arch/arm64/include/asm/pgtable.h+2−2
@@ -535,7 +535,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, · 534 unmodified lines
535535 PMD_TYPE_TABLE)
536536 #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \
537537 PMD_TYPE_SECT)
538−#define pmd_leaf(pmd) pmd_sect(pmd)
538+#define pmd_leaf(pmd) (pmd_present(pmd) && !pmd_table(pmd))
539539 #define pmd_bad(pmd) (!pmd_table(pmd))
540540
541541 #define pmd_leaf_size(pmd) (pmd_cont(pmd) ? CONT_PMD_SIZE : PMD_SIZE)
@@ -625,7 +625,7 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd) · 83 unmodified lines
625625 #define pud_none(pud) (!pud_val(pud))
626626 #define pud_bad(pud) (!pud_table(pud))
627627 #define pud_present(pud) pte_present(pud_pte(pud))
628−#define pud_leaf(pud) pud_sect(pud)
628+#define pud_leaf(pud) (pud_present(pud) && !pud_table(pud))
629629 #define pud_valid(pud) pte_valid(pud_pte(pud))
630630
631631 static inline void set_pud(pud_t *pudp, pud_t pud)
arch/arm64/kernel/elfcore.c+1−1
@@ -95,7 +95,7 @@ int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset) · 94 unmodified lines
9595 for_each_mte_vma(current, vma) {
9696 struct elf_phdr phdr;
9797
98− phdr.p_type = PT_ARM_MEMTAG_MTE;
98+ phdr.p_type = PT_AARCH64_MEMTAG_MTE;
9999 phdr.p_offset = offset;
100100 phdr.p_vaddr = vma->vm_start;
101101 phdr.p_paddr = 0;
arch/arm64/kvm/hyp/nvhe/host.S+9−9
@@ -198,15 +198,15 @@ SYM_CODE_START(__kvm_hyp_host_vector) · 197 unmodified lines
198198 invalid_host_el2_vect // FIQ EL2h
199199 invalid_host_el2_vect // Error EL2h
200200
201− host_el1_sync_vect // Synchronous 64-bit EL1
202− invalid_host_el1_vect // IRQ 64-bit EL1
203− invalid_host_el1_vect // FIQ 64-bit EL1
204− invalid_host_el1_vect // Error 64-bit EL1
205−
206− invalid_host_el1_vect // Synchronous 32-bit EL1
207− invalid_host_el1_vect // IRQ 32-bit EL1
208− invalid_host_el1_vect // FIQ 32-bit EL1
209− invalid_host_el1_vect // Error 32-bit EL1
201+ host_el1_sync_vect // Synchronous 64-bit EL1/EL0
202+ invalid_host_el1_vect // IRQ 64-bit EL1/EL0
203+ invalid_host_el1_vect // FIQ 64-bit EL1/EL0
204+ invalid_host_el1_vect // Error 64-bit EL1/EL0
205+
206+ host_el1_sync_vect // Synchronous 32-bit EL1/EL0
207+ invalid_host_el1_vect // IRQ 32-bit EL1/EL0
208+ invalid_host_el1_vect // FIQ 32-bit EL1/EL0
209+ invalid_host_el1_vect // Error 32-bit EL1/EL0
210210 SYM_CODE_END(__kvm_hyp_host_vector)
211211
212212 /*
arch/arm64/kvm/inject_fault.c+28−0
@@ -145,6 +145,34 @@ void kvm_inject_pabt(struct kvm_vcpu *vcpu, unsigned long addr) · 144 unmodified lines
145145 inject_abt64(vcpu, true, addr);
146146 }
147147
148+void kvm_inject_size_fault(struct kvm_vcpu *vcpu)
149+{
150+ unsigned long addr, esr;
151+
152+ addr = kvm_vcpu_get_fault_ipa(vcpu);
153+ addr |= kvm_vcpu_get_hfar(vcpu) & GENMASK(11, 0);
154+
155+ if (kvm_vcpu_trap_is_iabt(vcpu))
156+ kvm_inject_pabt(vcpu, addr);
157+ else
158+ kvm_inject_dabt(vcpu, addr);
159+
160+ /*
161+ * If AArch64 or LPAE, set FSC to 0 to indicate an Address
162+ * Size Fault at level 0, as if exceeding PARange.
163+ *
164+ * Non-LPAE guests will only get the external abort, as there
165+ * is no way to to describe the ASF.
166+ */
167+ if (vcpu_el1_is_32bit(vcpu) &&
168+ !(vcpu_read_sys_reg(vcpu, TCR_EL1) & TTBCR_EAE))
169+ return;
170+
171+ esr = vcpu_read_sys_reg(vcpu, ESR_EL1);
172+ esr &= ~GENMASK_ULL(5, 0);
173+ vcpu_write_sys_reg(vcpu, esr, ESR_EL1);
174+}
175+
148176 /**
149177 * kvm_inject_undefined - inject an undefined instruction into the guest
150178 * @vcpu: The vCPU in which to inject the exception
arch/arm64/kvm/mmu.c+26−4
@@ -1079,7 +1079,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, · 1078 unmodified lines
10791079 gfn_t gfn;
10801080 kvm_pfn_t pfn;
10811081 bool logging_active = memslot_is_logging(memslot);
1082− bool logging_perm_fault = false;
1082+ bool use_read_lock = false;
10831083 unsigned long fault_level = kvm_vcpu_trap_get_fault_level(vcpu);
10841084 unsigned long vma_pagesize, fault_granule;
10851085 enum kvm_pgtable_prot prot = KVM_PGTABLE_PROT_R;
@@ -1114,7 +1114,8 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, · 28 unmodified lines
11141114 if (logging_active) {
11151115 force_pte = true;
11161116 vma_shift = PAGE_SHIFT;
1117− logging_perm_fault = (fault_status == FSC_PERM && write_fault);
1117+ use_read_lock = (fault_status == FSC_PERM && write_fault &&
1118+ fault_granule == PAGE_SIZE);
11181119 } else {
11191120 vma_shift = get_vma_page_shift(vma, hva);
11201121 }
@@ -1218,7 +1219,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, · 97 unmodified lines
12181219 * logging dirty logging, only acquire read lock for permission
12191220 * relaxation.
12201221 */
1221− if (logging_perm_fault)
1222+ if (use_read_lock)
12221223 read_lock(&kvm->mmu_lock);
12231224 else
12241225 write_lock(&kvm->mmu_lock);
@@ -1268,6 +1269,8 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, · 43 unmodified lines
12681269 if (fault_status == FSC_PERM && vma_pagesize == fault_granule) {
12691270 ret = kvm_pgtable_stage2_relax_perms(pgt, fault_ipa, prot);
12701271 } else {
1272+ WARN_ONCE(use_read_lock, "Attempted stage-2 map outside of write lock\n");
1273+
12711274 ret = kvm_pgtable_stage2_map(pgt, fault_ipa, vma_pagesize,
12721275 __pfn_to_phys(pfn), prot,
12731276 memcache);
@@ -1280,7 +1283,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, · 6 unmodified lines
12801283 }
12811284
12821285 out_unlock:
1283− if (logging_perm_fault)
1286+ if (use_read_lock)
12841287 read_unlock(&kvm->mmu_lock);
12851288 else
12861289 write_unlock(&kvm->mmu_lock);
@@ -1334,6 +1337,25 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu) · 47 unmodified lines
13341337 fault_ipa = kvm_vcpu_get_fault_ipa(vcpu);
13351338 is_iabt = kvm_vcpu_trap_is_iabt(vcpu);
13361339
1340+ if (fault_status == FSC_FAULT) {
1341+ /* Beyond sanitised PARange (which is the IPA limit) */
1342+ if (fault_ipa >= BIT_ULL(get_kvm_ipa_limit())) {
1343+ kvm_inject_size_fault(vcpu);
1344+ return 1;
1345+ }
1346+
1347+ /* Falls between the IPA range and the PARange? */
1348+ if (fault_ipa >= BIT_ULL(vcpu->arch.hw_mmu->pgt->ia_bits)) {
1349+ fault_ipa |= kvm_vcpu_get_hfar(vcpu) & GENMASK(11, 0);
1350+
1351+ if (is_iabt)
1352+ kvm_inject_pabt(vcpu, fault_ipa);
1353+ else
1354+ kvm_inject_dabt(vcpu, fault_ipa);
1355+ return 1;
1356+ }
1357+ }
1358+
13371359 /* Synchronous External Abort? */
13381360 if (kvm_vcpu_abt_issea(vcpu)) {
13391361 /*
arch/arm64/kvm/pmu-emul.c+22−1
@@ -177,6 +177,9 @@ u64 kvm_pmu_get_counter_value(struct kvm_vcpu *vcpu, u64 select_idx) · 176 unmodified lines
177177 struct kvm_pmu *pmu = &vcpu->arch.pmu;
178178 struct kvm_pmc *pmc = &pmu->pmc[select_idx];
179179
180+ if (!kvm_vcpu_has_pmu(vcpu))
181+ return 0;
182+
180183 counter = kvm_pmu_get_pair_counter_value(vcpu, pmc);
181184
182185 if (kvm_pmu_pmc_is_chained(pmc) &&
@@ -198,6 +201,9 @@ void kvm_pmu_set_counter_value(struct kvm_vcpu *vcpu, u64 select_idx, u64 val) · 15 unmodified lines
198201 {
199202 u64 reg;
200203
204+ if (!kvm_vcpu_has_pmu(vcpu))
205+ return;
206+
201207 reg = (select_idx == ARMV8_PMU_CYCLE_IDX)
202208 ? PMCCNTR_EL0 : PMEVCNTR0_EL0 + select_idx;
203209 __vcpu_sys_reg(vcpu, reg) += (s64)val - kvm_pmu_get_counter_value(vcpu, select_idx);
@@ -322,6 +328,9 @@ void kvm_pmu_enable_counter_mask(struct kvm_vcpu *vcpu, u64 val) · 118 unmodified lines
322328 struct kvm_pmu *pmu = &vcpu->arch.pmu;
323329 struct kvm_pmc *pmc;
324330
331+ if (!kvm_vcpu_has_pmu(vcpu))
332+ return;
333+
325334 if (!(__vcpu_sys_reg(vcpu, PMCR_EL0) & ARMV8_PMU_PMCR_E) || !val)
326335 return;
327336
@@ -357,7 +366,7 @@ void kvm_pmu_disable_counter_mask(struct kvm_vcpu *vcpu, u64 val) · 29 unmodified lines
357366 struct kvm_pmu *pmu = &vcpu->arch.pmu;
358367 struct kvm_pmc *pmc;
359368
360− if (!val)
369+ if (!kvm_vcpu_has_pmu(vcpu) || !val)
361370 return;
362371
363372 for (i = 0; i < ARMV8_PMU_MAX_COUNTERS; i++) {
@@ -527,6 +536,9 @@ void kvm_pmu_software_increment(struct kvm_vcpu *vcpu, u64 val) · 163 unmodified lines
527536 struct kvm_pmu *pmu = &vcpu->arch.pmu;
528537 int i;
529538
539+ if (!kvm_vcpu_has_pmu(vcpu))
540+ return;
541+
530542 if (!(__vcpu_sys_reg(vcpu, PMCR_EL0) & ARMV8_PMU_PMCR_E))
531543 return;
532544
@@ -576,6 +588,9 @@ void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val) · 43 unmodified lines
576588 {
577589 int i;
578590
591+ if (!kvm_vcpu_has_pmu(vcpu))
592+ return;
593+
579594 if (val & ARMV8_PMU_PMCR_E) {
580595 kvm_pmu_enable_counter_mask(vcpu,
581596 __vcpu_sys_reg(vcpu, PMCNTENSET_EL0));
@@ -739,6 +754,9 @@ void kvm_pmu_set_counter_event_type(struct kvm_vcpu *vcpu, u64 data, · 157 unmodified lines
739754 {
740755 u64 reg, mask;
741756
757+ if (!kvm_vcpu_has_pmu(vcpu))
758+ return;
759+
742760 mask = ARMV8_PMU_EVTYPE_MASK;
743761 mask &= ~ARMV8_PMU_EVTYPE_EVENT;
744762 mask |= kvm_pmu_event_mask(vcpu->kvm);
@@ -827,6 +845,9 @@ u64 kvm_pmu_get_pmceid(struct kvm_vcpu *vcpu, bool pmceid1) · 82 unmodified lines
827845 u64 val, mask = 0;
828846 int base, i, nr_events;
829847
848+ if (!kvm_vcpu_has_pmu(vcpu))
849+ return 0;
850+
830851 if (!pmceid1) {
831852 val = read_sysreg(pmceid0_el0);
832853 base = 0;
arch/arm64/kvm/psci.c+16−18
@@ -181,7 +181,8 @@ static void kvm_prepare_system_event(struct kvm_vcpu *vcpu, u32 type, u64 flags) · 180 unmodified lines
181181
182182 memset(&vcpu->run->system_event, 0, sizeof(vcpu->run->system_event));
183183 vcpu->run->system_event.type = type;
184− vcpu->run->system_event.flags = flags;
184+ vcpu->run->system_event.ndata = 1;
185+ vcpu->run->system_event.data[0] = flags;
185186 vcpu->run->exit_reason = KVM_EXIT_SYSTEM_EVENT;
186187 }
187188
@@ -215,15 +216,11 @@ static void kvm_psci_narrow_to_32bit(struct kvm_vcpu *vcpu) · 27 unmodified lines
215216
216217 static unsigned long kvm_psci_check_allowed_function(struct kvm_vcpu *vcpu, u32 fn)
217218 {
218− switch(fn) {
219− case PSCI_0_2_FN64_CPU_SUSPEND:
220− case PSCI_0_2_FN64_CPU_ON:
221− case PSCI_0_2_FN64_AFFINITY_INFO:
222− /* Disallow these functions for 32bit guests */
223− if (vcpu_mode_is_32bit(vcpu))
224− return PSCI_RET_NOT_SUPPORTED;
225− break;
226− }
219+ /*
220+ * Prevent 32 bit guests from calling 64 bit PSCI functions.
221+ */
222+ if ((fn & PSCI_0_2_64BIT) && vcpu_mode_is_32bit(vcpu))
223+ return PSCI_RET_NOT_SUPPORTED;
227224
228225 return 0;
229226 }
@@ -235,10 +232,6 @@ static int kvm_psci_0_2_call(struct kvm_vcpu *vcpu) · 5 unmodified lines
235232 unsigned long val;
236233 int ret = 1;
237234
238− val = kvm_psci_check_allowed_function(vcpu, psci_fn);
239− if (val)
240− goto out;
241−
242235 switch (psci_fn) {
243236 case PSCI_0_2_FN_PSCI_VERSION:
244237 /*
@@ -306,7 +299,6 @@ static int kvm_psci_0_2_call(struct kvm_vcpu *vcpu) · 61 unmodified lines
306299 break;
307300 }
308301
309−out:
310302 smccc_set_retval(vcpu, val, 0, 0, 0);
311303 return ret;
312304 }
@@ -318,9 +310,6 @@ static int kvm_psci_1_x_call(struct kvm_vcpu *vcpu, u32 minor) · 5 unmodified lines
318310 unsigned long val;
319311 int ret = 1;
320312
321− if (minor > 1)
322− return -EINVAL;
323−
324313 switch(psci_fn) {
325314 case PSCI_0_2_FN_PSCI_VERSION:
326315 val = minor == 0 ? KVM_ARM_PSCI_1_0 : KVM_ARM_PSCI_1_1;
@@ -426,6 +415,15 @@ static int kvm_psci_0_1_call(struct kvm_vcpu *vcpu) · 99 unmodified lines
426415 */
427416 int kvm_psci_call(struct kvm_vcpu *vcpu)
428417 {
418+ u32 psci_fn = smccc_get_function(vcpu);
419+ unsigned long val;
420+
421+ val = kvm_psci_check_allowed_function(vcpu, psci_fn);
422+ if (val) {
423+ smccc_set_retval(vcpu, val, 0, 0, 0);
424+ return 1;
425+ }
426+
429427 switch (kvm_psci_version(vcpu)) {
430428 case KVM_ARM_PSCI_1_1:
431429 return kvm_psci_1_x_call(vcpu, 1);
arch/arm64/kvm/reset.c+45−20
@@ -181,27 +181,51 @@ static int kvm_vcpu_enable_ptrauth(struct kvm_vcpu *vcpu) · 180 unmodified lines
181181 return 0;
182182 }
183183
184−static bool vcpu_allowed_register_width(struct kvm_vcpu *vcpu)
184+/**
185+ * kvm_set_vm_width() - set the register width for the guest
186+ * @vcpu: Pointer to the vcpu being configured
187+ *
188+ * Set both KVM_ARCH_FLAG_EL1_32BIT and KVM_ARCH_FLAG_REG_WIDTH_CONFIGURED
189+ * in the VM flags based on the vcpu's requested register width, the HW
190+ * capabilities and other options (such as MTE).
191+ * When REG_WIDTH_CONFIGURED is already set, the vcpu settings must be
192+ * consistent with the value of the FLAG_EL1_32BIT bit in the flags.
193+ *
194+ * Return: 0 on success, negative error code on failure.
195+ */
196+static int kvm_set_vm_width(struct kvm_vcpu *vcpu)
185197 {
186− struct kvm_vcpu *tmp;
198+ struct kvm *kvm = vcpu->kvm;
187199 bool is32bit;
188− unsigned long i;
189200
190201 is32bit = vcpu_has_feature(vcpu, KVM_ARM_VCPU_EL1_32BIT);
202+
203+ lockdep_assert_held(&kvm->lock);
204+
205+ if (test_bit(KVM_ARCH_FLAG_REG_WIDTH_CONFIGURED, &kvm->arch.flags)) {
206+ /*
207+ * The guest's register width is already configured.
208+ * Make sure that the vcpu is consistent with it.
209+ */
210+ if (is32bit == test_bit(KVM_ARCH_FLAG_EL1_32BIT, &kvm->arch.flags))
211+ return 0;
212+
213+ return -EINVAL;
214+ }
215+
191216 if (!cpus_have_const_cap(ARM64_HAS_32BIT_EL1) && is32bit)
192− return false;
217+ return -EINVAL;
193218
194219 /* MTE is incompatible with AArch32 */
195− if (kvm_has_mte(vcpu->kvm) && is32bit)
196− return false;
220+ if (kvm_has_mte(kvm) && is32bit)
221+ return -EINVAL;
197222
198− /* Check that the vcpus are either all 32bit or all 64bit */
199− kvm_for_each_vcpu(i, tmp, vcpu->kvm) {
200− if (vcpu_has_feature(tmp, KVM_ARM_VCPU_EL1_32BIT) != is32bit)
201− return false;
202− }
223+ if (is32bit)
224+ set_bit(KVM_ARCH_FLAG_EL1_32BIT, &kvm->arch.flags);
203225
204− return true;
226+ set_bit(KVM_ARCH_FLAG_REG_WIDTH_CONFIGURED, &kvm->arch.flags);
227+
228+ return 0;
205229 }
206230
207231 /**
@@ -230,10 +254,16 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu) · 22 unmodified lines
230254 u32 pstate;
231255
232256 mutex_lock(&vcpu->kvm->lock);
233− reset_state = vcpu->arch.reset_state;
234− WRITE_ONCE(vcpu->arch.reset_state.reset, false);
257+ ret = kvm_set_vm_width(vcpu);
258+ if (!ret) {
259+ reset_state = vcpu->arch.reset_state;
260+ WRITE_ONCE(vcpu->arch.reset_state.reset, false);
261+ }
235262 mutex_unlock(&vcpu->kvm->lock);
236263
264+ if (ret)
265+ return ret;
266+
237267 /* Reset PMU outside of the non-preemptible section */
238268 kvm_pmu_vcpu_reset(vcpu);
239269
@@ -260,14 +290,9 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu) · 20 unmodified lines
260290 }
261291 }
262292
263− if (!vcpu_allowed_register_width(vcpu)) {
264− ret = -EINVAL;
265− goto out;
266− }
267−
268293 switch (vcpu->arch.target) {
269294 default:
270− if (test_bit(KVM_ARM_VCPU_EL1_32BIT, vcpu->arch.features)) {
295+ if (vcpu_el1_is_32bit(vcpu)) {
271296 pstate = VCPU_RESET_PSTATE_SVC;
272297 } else {
273298 pstate = VCPU_RESET_PSTATE_EL1;
arch/arm64/kvm/vgic/vgic-debug.c+5−5
@@ -82,7 +82,7 @@ static bool end_of_vgic(struct vgic_state_iter *iter) · 81 unmodified lines
8282
8383 static void *vgic_debug_start(struct seq_file *s, loff_t *pos)
8484 {
85− struct kvm *kvm = (struct kvm *)s->private;
85+ struct kvm *kvm = s->private;
8686 struct vgic_state_iter *iter;
8787
8888 mutex_lock(&kvm->lock);
@@ -110,7 +110,7 @@ out: · 21 unmodified lines
110110
111111 static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos)
112112 {
113− struct kvm *kvm = (struct kvm *)s->private;
113+ struct kvm *kvm = s->private;
114114 struct vgic_state_iter *iter = kvm->arch.vgic.iter;
115115
116116 ++*pos;
@@ -122,7 +122,7 @@ static void *vgic_debug_next(struct seq_file *s, void *v, loff_t *pos) · 5 unmodified lines
122122
123123 static void vgic_debug_stop(struct seq_file *s, void *v)
124124 {
125− struct kvm *kvm = (struct kvm *)s->private;
125+ struct kvm *kvm = s->private;
126126 struct vgic_state_iter *iter;
127127
128128 /*
@@ -229,8 +229,8 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq, · 100 unmodified lines
229229
230230 static int vgic_debug_show(struct seq_file *s, void *v)
231231 {
232− struct kvm *kvm = (struct kvm *)s->private;
233− struct vgic_state_iter *iter = (struct vgic_state_iter *)v;
232+ struct kvm *kvm = s->private;
233+ struct vgic_state_iter *iter = v;
234234 struct vgic_irq *irq;
235235 struct kvm_vcpu *vcpu = NULL;
236236 unsigned long flags;
arch/arm64/kvm/vgic/vgic-its.c+1−1
@@ -2143,7 +2143,7 @@ static int vgic_its_save_ite(struct vgic_its *its, struct its_device *dev, · 2142 unmodified lines
21432143 static int vgic_its_restore_ite(struct vgic_its *its, u32 event_id,
21442144 void *ptr, void *opaque)
21452145 {
2146− struct its_device *dev = (struct its_device *)opaque;
2146+ struct its_device *dev = opaque;
21472147 struct its_collection *collection;
21482148 struct kvm *kvm = its->dev->kvm;
21492149 struct kvm_vcpu *vcpu = NULL;
arch/powerpc/kernel/module.c+1−1
@@ -101,7 +101,7 @@ __module_alloc(unsigned long size, unsigned long start, unsigned long end, bool · 100 unmodified lines
101101 * too.
102102 */
103103 return __vmalloc_node_range(size, 1, start, end, gfp, prot,
104− VM_FLUSH_RESET_PERMS | VM_NO_HUGE_VMAP,
104+ VM_FLUSH_RESET_PERMS,
105105 NUMA_NO_NODE, __builtin_return_address(0));
106106 }
107107
arch/powerpc/kernel/time.c+14−15
@@ -615,23 +615,22 @@ DEFINE_INTERRUPT_HANDLER_ASYNC(timer_interrupt) · 614 unmodified lines
615615 return;
616616 }
617617
618− /* Conditionally hard-enable interrupts. */
619− if (should_hard_irq_enable()) {
620− /*
621− * Ensure a positive value is written to the decrementer, or
622− * else some CPUs will continue to take decrementer exceptions.
623− * When the PPC_WATCHDOG (decrementer based) is configured,
624− * keep this at most 31 bits, which is about 4 seconds on most
625− * systems, which gives the watchdog a chance of catching timer
626− * interrupt hard lockups.
627− */
628− if (IS_ENABLED(CONFIG_PPC_WATCHDOG))
629− set_dec(0x7fffffff);
630− else
631− set_dec(decrementer_max);
618+ /*
619+ * Ensure a positive value is written to the decrementer, or
620+ * else some CPUs will continue to take decrementer exceptions.
621+ * When the PPC_WATCHDOG (decrementer based) is configured,
622+ * keep this at most 31 bits, which is about 4 seconds on most
623+ * systems, which gives the watchdog a chance of catching timer
624+ * interrupt hard lockups.
625+ */
626+ if (IS_ENABLED(CONFIG_PPC_WATCHDOG))
627+ set_dec(0x7fffffff);
628+ else
629+ set_dec(decrementer_max);
632630
631+ /* Conditionally hard-enable interrupts. */
632+ if (should_hard_irq_enable())
633633 do_hard_irq_enable();
634− }
635634
636635 #if defined(CONFIG_PPC32) && defined(CONFIG_PPC_PMAC)
637636 if (atomic_read(&ppc_n_lost_interrupts) != 0)
arch/powerpc/kvm/book3s_64_mmu_radix.c+5−4
@@ -168,9 +168,10 @@ int kvmppc_mmu_walk_radix_tree(struct kvm_vcpu *vcpu, gva_t eaddr, · 167 unmodified lines
168168 return -EINVAL;
169169 /* Read the entry from guest memory */
170170 addr = base + (index * sizeof(rpte));
171− vcpu->srcu_idx = srcu_read_lock(&kvm->srcu);
171+
172+ kvm_vcpu_srcu_read_lock(vcpu);
172173 ret = kvm_read_guest(kvm, addr, &rpte, sizeof(rpte));
173− srcu_read_unlock(&kvm->srcu, vcpu->srcu_idx);
174+ kvm_vcpu_srcu_read_unlock(vcpu);
174175 if (ret) {
175176 if (pte_ret_p)
176177 *pte_ret_p = addr;
@@ -246,9 +247,9 @@ int kvmppc_mmu_radix_translate_table(struct kvm_vcpu *vcpu, gva_t eaddr, · 69 unmodified lines
246247
247248 /* Read the table to find the root of the radix tree */
248249 ptbl = (table & PRTB_MASK) + (table_index * sizeof(entry));
249− vcpu->srcu_idx = srcu_read_lock(&kvm->srcu);
250+ kvm_vcpu_srcu_read_lock(vcpu);
250251 ret = kvm_read_guest(kvm, ptbl, &entry, sizeof(entry));
251− srcu_read_unlock(&kvm->srcu, vcpu->srcu_idx);
252+ kvm_vcpu_srcu_read_unlock(vcpu);
252253 if (ret)
253254 return ret;
254255
arch/powerpc/kvm/book3s_64_vio.c+23−22
@@ -420,13 +420,19 @@ static void kvmppc_tce_put(struct kvmppc_spapr_tce_table *stt, · 419 unmodified lines
420420 tbl[idx % TCES_PER_PAGE] = tce;
421421 }
422422
423−static void kvmppc_clear_tce(struct mm_struct *mm, struct iommu_table *tbl,
424− unsigned long entry)
423+static void kvmppc_clear_tce(struct mm_struct *mm, struct kvmppc_spapr_tce_table *stt,
424+ struct iommu_table *tbl, unsigned long entry)
425425 {
426− unsigned long hpa = 0;
427− enum dma_data_direction dir = DMA_NONE;
426+ unsigned long i;
427+ unsigned long subpages = 1ULL << (stt->page_shift - tbl->it_page_shift);
428+ unsigned long io_entry = entry << (stt->page_shift - tbl->it_page_shift);
429+
430+ for (i = 0; i < subpages; ++i) {
431+ unsigned long hpa = 0;
432+ enum dma_data_direction dir = DMA_NONE;
428433
429− iommu_tce_xchg_no_kill(mm, tbl, entry, &hpa, &dir);
434+ iommu_tce_xchg_no_kill(mm, tbl, io_entry + i, &hpa, &dir);
435+ }
430436 }
431437
432438 static long kvmppc_tce_iommu_mapped_dec(struct kvm *kvm,
@@ -485,6 +491,8 @@ static long kvmppc_tce_iommu_unmap(struct kvm *kvm, · 52 unmodified lines
485491 break;
486492 }
487493
494+ iommu_tce_kill(tbl, io_entry, subpages);
495+
488496 return ret;
489497 }
490498
@@ -544,6 +552,8 @@ static long kvmppc_tce_iommu_map(struct kvm *kvm, · 53 unmodified lines
544552 break;
545553 }
546554
555+ iommu_tce_kill(tbl, io_entry, subpages);
556+
547557 return ret;
548558 }
549559
@@ -590,10 +600,9 @@ long kvmppc_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn, · 40 unmodified lines
590600 ret = kvmppc_tce_iommu_map(vcpu->kvm, stt, stit->tbl,
591601 entry, ua, dir);
592602
593− iommu_tce_kill(stit->tbl, entry, 1);
594603
595604 if (ret != H_SUCCESS) {
596− kvmppc_clear_tce(vcpu->kvm->mm, stit->tbl, entry);
605+ kvmppc_clear_tce(vcpu->kvm->mm, stt, stit->tbl, entry);
597606 goto unlock_exit;
598607 }
599608 }
@@ -669,13 +678,13 @@ long kvmppc_h_put_tce_indirect(struct kvm_vcpu *vcpu, · 69 unmodified lines
669678 */
670679 if (get_user(tce, tces + i)) {
671680 ret = H_TOO_HARD;
672− goto invalidate_exit;
681+ goto unlock_exit;
673682 }
674683 tce = be64_to_cpu(tce);
675684
676685 if (kvmppc_tce_to_ua(vcpu->kvm, tce, &ua)) {
677686 ret = H_PARAMETER;
678− goto invalidate_exit;
687+ goto unlock_exit;
679688 }
680689
681690 list_for_each_entry_lockless(stit, &stt->iommu_tables, next) {
@@ -684,19 +693,15 @@ long kvmppc_h_put_tce_indirect(struct kvm_vcpu *vcpu, · 2 unmodified lines
684693 iommu_tce_direction(tce));
685694
686695 if (ret != H_SUCCESS) {
687− kvmppc_clear_tce(vcpu->kvm->mm, stit->tbl,
688− entry);
689− goto invalidate_exit;
696+ kvmppc_clear_tce(vcpu->kvm->mm, stt, stit->tbl,
697+ entry + i);
698+ goto unlock_exit;
690699 }
691700 }
692701
693702 kvmppc_tce_put(stt, entry + i, tce);
694703 }
695704
696−invalidate_exit:
697− list_for_each_entry_lockless(stit, &stt->iommu_tables, next)
698− iommu_tce_kill(stit->tbl, entry, npages);
699−
700705 unlock_exit:
701706 srcu_read_unlock(&vcpu->kvm->srcu, idx);
702707
@@ -735,20 +740,16 @@ long kvmppc_h_stuff_tce(struct kvm_vcpu *vcpu, · 32 unmodified lines
735740 continue;
736741
737742 if (ret == H_TOO_HARD)
738− goto invalidate_exit;
743+ return ret;
739744
740745 WARN_ON_ONCE(1);
741− kvmppc_clear_tce(vcpu->kvm->mm, stit->tbl, entry);
746+ kvmppc_clear_tce(vcpu->kvm->mm, stt, stit->tbl, entry + i);
742747 }
743748 }
744749
745750 for (i = 0; i < npages; ++i, ioba += (1ULL << stt->page_shift))
746751 kvmppc_tce_put(stt, ioba >> stt->page_shift, tce_value);
747752
748−invalidate_exit:
749− list_for_each_entry_lockless(stit, &stt->iommu_tables, next)
750− iommu_tce_kill(stit->tbl, ioba >> stt->page_shift, npages);
751−
752753 return ret;
753754 }
754755 EXPORT_SYMBOL_GPL(kvmppc_h_stuff_tce);
arch/powerpc/kvm/book3s_64_vio_hv.c+22−22
@@ -247,13 +247,19 @@ static void iommu_tce_kill_rm(struct iommu_table *tbl, · 246 unmodified lines
247247 tbl->it_ops->tce_kill(tbl, entry, pages, true);
248248 }
249249
250−static void kvmppc_rm_clear_tce(struct kvm *kvm, struct iommu_table *tbl,
251− unsigned long entry)
250+static void kvmppc_rm_clear_tce(struct kvm *kvm, struct kvmppc_spapr_tce_table *stt,
251+ struct iommu_table *tbl, unsigned long entry)
252252 {
253− unsigned long hpa = 0;
254− enum dma_data_direction dir = DMA_NONE;
253+ unsigned long i;
254+ unsigned long subpages = 1ULL << (stt->page_shift - tbl->it_page_shift);
255+ unsigned long io_entry = entry << (stt->page_shift - tbl->it_page_shift);
256+
257+ for (i = 0; i < subpages; ++i) {
258+ unsigned long hpa = 0;
259+ enum dma_data_direction dir = DMA_NONE;
255260
256− iommu_tce_xchg_no_kill_rm(kvm->mm, tbl, entry, &hpa, &dir);
261+ iommu_tce_xchg_no_kill_rm(kvm->mm, tbl, io_entry + i, &hpa, &dir);
262+ }
257263 }
258264
259265 static long kvmppc_rm_tce_iommu_mapped_dec(struct kvm *kvm,
@@ -316,6 +322,8 @@ static long kvmppc_rm_tce_iommu_unmap(struct kvm *kvm, · 56 unmodified lines
316322 break;
317323 }
318324
325+ iommu_tce_kill_rm(tbl, io_entry, subpages);
326+
319327 return ret;
320328 }
321329
@@ -379,6 +387,8 @@ static long kvmppc_rm_tce_iommu_map(struct kvm *kvm, · 57 unmodified lines
379387 break;
380388 }
381389
390+ iommu_tce_kill_rm(tbl, io_entry, subpages);
391+
382392 return ret;
383393 }
384394
@@ -420,10 +430,8 @@ long kvmppc_rm_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn, · 35 unmodified lines
420430 ret = kvmppc_rm_tce_iommu_map(vcpu->kvm, stt,
421431 stit->tbl, entry, ua, dir);
422432
423− iommu_tce_kill_rm(stit->tbl, entry, 1);
424−
425433 if (ret != H_SUCCESS) {
426− kvmppc_rm_clear_tce(vcpu->kvm, stit->tbl, entry);
434+ kvmppc_rm_clear_tce(vcpu->kvm, stt, stit->tbl, entry);
427435 return ret;
428436 }
429437 }
@@ -561,7 +569,7 @@ long kvmppc_rm_h_put_tce_indirect(struct kvm_vcpu *vcpu, · 131 unmodified lines
561569 ua = 0;
562570 if (kvmppc_rm_tce_to_ua(vcpu->kvm, tce, &ua)) {
563571 ret = H_PARAMETER;
564− goto invalidate_exit;
572+ goto unlock_exit;
565573 }
566574
567575 list_for_each_entry_lockless(stit, &stt->iommu_tables, next) {
@@ -570,19 +578,15 @@ long kvmppc_rm_h_put_tce_indirect(struct kvm_vcpu *vcpu, · 2 unmodified lines
570578 iommu_tce_direction(tce));
571579
572580 if (ret != H_SUCCESS) {
573− kvmppc_rm_clear_tce(vcpu->kvm, stit->tbl,
574− entry);
575− goto invalidate_exit;
581+ kvmppc_rm_clear_tce(vcpu->kvm, stt, stit->tbl,
582+ entry + i);
583+ goto unlock_exit;
576584 }
577585 }
578586
579587 kvmppc_rm_tce_put(stt, entry + i, tce);
580588 }
581589
582−invalidate_exit:
583− list_for_each_entry_lockless(stit, &stt->iommu_tables, next)
584− iommu_tce_kill_rm(stit->tbl, entry, npages);
585−
586590 unlock_exit:
587591 if (!prereg)
588592 arch_spin_unlock(&kvm->mmu_lock.rlock.raw_lock);
@@ -620,20 +624,16 @@ long kvmppc_rm_h_stuff_tce(struct kvm_vcpu *vcpu, · 31 unmodified lines
620624 continue;
621625
622626 if (ret == H_TOO_HARD)
623− goto invalidate_exit;
627+ return ret;
624628
625629 WARN_ON_ONCE_RM(1);
626− kvmppc_rm_clear_tce(vcpu->kvm, stit->tbl, entry);
630+ kvmppc_rm_clear_tce(vcpu->kvm, stt, stit->tbl, entry + i);
627631 }
628632 }
629633
630634 for (i = 0; i < npages; ++i, ioba += (1ULL << stt->page_shift))
631635 kvmppc_rm_tce_put(stt, ioba >> stt->page_shift, tce_value);
632636
633−invalidate_exit:
634− list_for_each_entry_lockless(stit, &stt->iommu_tables, next)
635− iommu_tce_kill_rm(stit->tbl, ioba >> stt->page_shift, npages);
636−
637637 return ret;
638638 }
639639
arch/powerpc/kvm/book3s_hv_nested.c+8−8
@@ -306,10 +306,10 @@ long kvmhv_enter_nested_guest(struct kvm_vcpu *vcpu) · 305 unmodified lines
306306 /* copy parameters in */
307307 hv_ptr = kvmppc_get_gpr(vcpu, 4);
308308 regs_ptr = kvmppc_get_gpr(vcpu, 5);
309− vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
309+ kvm_vcpu_srcu_read_lock(vcpu);
310310 err = kvmhv_read_guest_state_and_regs(vcpu, &l2_hv, &l2_regs,
311311 hv_ptr, regs_ptr);
312− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
312+ kvm_vcpu_srcu_read_unlock(vcpu);
313313 if (err)
314314 return H_PARAMETER;
315315
@@ -410,10 +410,10 @@ long kvmhv_enter_nested_guest(struct kvm_vcpu *vcpu) · 94 unmodified lines
410410 byteswap_hv_regs(&l2_hv);
411411 byteswap_pt_regs(&l2_regs);
412412 }
413− vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
413+ kvm_vcpu_srcu_read_lock(vcpu);
414414 err = kvmhv_write_guest_state_and_regs(vcpu, &l2_hv, &l2_regs,
415415 hv_ptr, regs_ptr);
416− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
416+ kvm_vcpu_srcu_read_unlock(vcpu);
417417 if (err)
418418 return H_AUTHORITY;
419419
@@ -600,16 +600,16 @@ long kvmhv_copy_tofrom_guest_nested(struct kvm_vcpu *vcpu) · 180 unmodified lines
600600 goto not_found;
601601
602602 /* Write what was loaded into our buffer back to the L1 guest */
603− vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
603+ kvm_vcpu_srcu_read_lock(vcpu);
604604 rc = kvm_vcpu_write_guest(vcpu, gp_to, buf, n);
605− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
605+ kvm_vcpu_srcu_read_unlock(vcpu);
606606 if (rc)
607607 goto not_found;
608608 } else {
609609 /* Load the data to be stored from the L1 guest into our buf */
610− vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
610+ kvm_vcpu_srcu_read_lock(vcpu);
611611 rc = kvm_vcpu_read_guest(vcpu, gp_from, buf, n);
612− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
612+ kvm_vcpu_srcu_read_unlock(vcpu);
613613 if (rc)
614614 goto not_found;
615615
arch/powerpc/kvm/book3s_rtas.c+2−2
@@ -229,9 +229,9 @@ int kvmppc_rtas_hcall(struct kvm_vcpu *vcpu) · 228 unmodified lines
229229 */
230230 args_phys = kvmppc_get_gpr(vcpu, 4) & KVM_PAM;
231231
232− vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
232+ kvm_vcpu_srcu_read_lock(vcpu);
233233 rc = kvm_read_guest(vcpu->kvm, args_phys, &args, sizeof(args));
234− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
234+ kvm_vcpu_srcu_read_unlock(vcpu);
235235 if (rc)
236236 goto fail;
237237
arch/powerpc/kvm/powerpc.c+2−2
@@ -425,9 +425,9 @@ int kvmppc_ld(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, · 424 unmodified lines
425425 return EMULATE_DONE;
426426 }
427427
428− vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
428+ kvm_vcpu_srcu_read_lock(vcpu);
429429 rc = kvm_read_guest(vcpu->kvm, pte.raddr, ptr, size);
430− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
430+ kvm_vcpu_srcu_read_unlock(vcpu);
431431 if (rc)
432432 return EMULATE_DO_MMIO;
433433
arch/powerpc/perf/Makefile+2−2
@@ -3,11 +3,11 @@ · 2 unmodified lines
33 obj-y += callchain.o callchain_$(BITS).o perf_regs.o
44 obj-$(CONFIG_COMPAT) += callchain_32.o
55
6−obj-$(CONFIG_PPC_PERF_CTRS) += core-book3s.o bhrb.o
6+obj-$(CONFIG_PPC_PERF_CTRS) += core-book3s.o
77 obj64-$(CONFIG_PPC_PERF_CTRS) += ppc970-pmu.o power5-pmu.o \
88 power5+-pmu.o power6-pmu.o power7-pmu.o \
99 isa207-common.o power8-pmu.o power9-pmu.o \
10− generic-compat-pmu.o power10-pmu.o
10+ generic-compat-pmu.o power10-pmu.o bhrb.o
1111 obj32-$(CONFIG_PPC_PERF_CTRS) += mpc7450-pmu.o
1212
1313 obj-$(CONFIG_PPC_POWERNV) += imc-pmu.o
arch/powerpc/perf/power10-pmu.c+1−1
@@ -91,8 +91,8 @@ extern u64 PERF_REG_EXTENDED_MASK; · 90 unmodified lines
9191
9292 /* Table of alternatives, sorted by column 0 */
9393 static const unsigned int power10_event_alternatives[][MAX_ALT] = {
94− { PM_CYC_ALT, PM_CYC },
9594 { PM_INST_CMPL_ALT, PM_INST_CMPL },
95+ { PM_CYC_ALT, PM_CYC },
9696 };
9797
9898 static int power10_get_alternatives(u64 event, unsigned int flags, u64 alt[])
arch/powerpc/perf/power9-pmu.c+4−4
@@ -133,11 +133,11 @@ int p9_dd22_bl_ev[] = { · 132 unmodified lines
133133
134134 /* Table of alternatives, sorted by column 0 */
135135 static const unsigned int power9_event_alternatives[][MAX_ALT] = {
136− { PM_INST_DISP, PM_INST_DISP_ALT },
137− { PM_RUN_CYC_ALT, PM_RUN_CYC },
138− { PM_RUN_INST_CMPL_ALT, PM_RUN_INST_CMPL },
139− { PM_LD_MISS_L1, PM_LD_MISS_L1_ALT },
140136 { PM_BR_2PATH, PM_BR_2PATH_ALT },
137+ { PM_INST_DISP, PM_INST_DISP_ALT },
138+ { PM_RUN_CYC_ALT, PM_RUN_CYC },
139+ { PM_LD_MISS_L1, PM_LD_MISS_L1_ALT },
140+ { PM_RUN_INST_CMPL_ALT, PM_RUN_INST_CMPL },
141141 };
142142
143143 static int power9_get_alternatives(u64 event, unsigned int flags, u64 alt[])
arch/riscv/Kconfig.socs+1−1
@@ -38,7 +38,7 @@ config SOC_VIRT · 37 unmodified lines
3838 select SIFIVE_PLIC
3939 select PM_GENERIC_DOMAINS if PM
4040 select PM_GENERIC_DOMAINS_OF if PM && OF
41− select RISCV_SBI_CPUIDLE if CPU_IDLE
41+ select RISCV_SBI_CPUIDLE if CPU_IDLE && RISCV_SBI
4242 help
4343 This enables support for QEMU Virt Machine.
4444
arch/riscv/boot/dts/microchip/microchip-mpfs-fabric.dtsi+14−2
@@ -7,7 +7,7 @@ · 6 unmodified lines
77 reg = <0x0 0x41000000 0x0 0xF0>;
88 microchip,sync-update-mask = /bits/ 32 <0>;
99 #pwm-cells = <2>;
10− clocks = <&clkcfg CLK_FIC3>;
10+ clocks = <&fabric_clk3>;
1111 status = "disabled";
1212 };
1313
@@ -16,10 +16,22 @@ · 2 unmodified lines
1616 reg = <0x0 0x44000000 0x0 0x1000>;
1717 #address-cells = <1>;
1818 #size-cells = <0>;
19− clocks = <&clkcfg CLK_FIC3>;
19+ clocks = <&fabric_clk3>;
2020 interrupt-parent = <&plic>;
2121 interrupts = <122>;
2222 clock-frequency = <100000>;
2323 status = "disabled";
2424 };
25+
26+ fabric_clk3: fabric-clk3 {
27+ compatible = "fixed-clock";
28+ #clock-cells = <0>;
29+ clock-frequency = <62500000>;
30+ };
31+
32+ fabric_clk1: fabric-clk1 {
33+ compatible = "fixed-clock";
34+ #clock-cells = <0>;
35+ clock-frequency = <125000000>;
36+ };
2537 };
arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts+1−1
@@ -45,7 +45,7 @@ · 44 unmodified lines
4545 };
4646
4747 &refclk {
48− clock-frequency = <600000000>;
48+ clock-frequency = <125000000>;
4949 };
5050
5151 &mmuart1 {
arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi+5−5
@@ -141,7 +141,7 @@ · 140 unmodified lines
141141 };
142142 };
143143
144− refclk: msspllclk {
144+ refclk: mssrefclk {
145145 compatible = "fixed-clock";
146146 #clock-cells = <0>;
147147 };
@@ -190,7 +190,7 @@ · 42 unmodified lines
190190
191191 clkcfg: clkcfg@20002000 {
192192 compatible = "microchip,mpfs-clkcfg";
193− reg = <0x0 0x20002000 0x0 0x1000>;
193+ reg = <0x0 0x20002000 0x0 0x1000>, <0x0 0x3E001000 0x0 0x1000>;
194194 clocks = <&refclk>;
195195 #clock-cells = <1>;
196196 };
@@ -393,8 +393,8 @@ · 196 unmodified lines
393393 reg = <0x0 0x20124000 0x0 0x1000>;
394394 interrupt-parent = <&plic>;
395395 interrupts = <80>, <81>;
396− clocks = <&clkcfg CLK_RTC>;
397− clock-names = "rtc";
396+ clocks = <&clkcfg CLK_RTC>, <&clkcfg CLK_RTCREF>;
397+ clock-names = "rtc", "rtcref";
398398 status = "disabled";
399399 };
400400
@@ -424,7 +424,7 @@ · 23 unmodified lines
424424 <0 0 0 3 &pcie_intc 2>,
425425 <0 0 0 4 &pcie_intc 3>;
426426 interrupt-map-mask = <0 0 0 7>;
427− clocks = <&clkcfg CLK_FIC0>, <&clkcfg CLK_FIC1>, <&clkcfg CLK_FIC3>;
427+ clocks = <&fabric_clk1>, <&fabric_clk1>, <&fabric_clk3>;
428428 clock-names = "fic0", "fic1", "fic3";
429429 ranges = <0x3000000 0x0 0x8000000 0x20 0x8000000 0x0 0x80000000>;
430430 msi-parent = <&pcie>;
arch/riscv/configs/defconfig+1−0
@@ -101,6 +101,7 @@ CONFIG_VIRTIO_BALLOON=y · 100 unmodified lines
101101 CONFIG_VIRTIO_INPUT=y
102102 CONFIG_VIRTIO_MMIO=y
103103 CONFIG_RPMSG_CHAR=y
104+CONFIG_RPMSG_CTRL=y
104105 CONFIG_RPMSG_VIRTIO=y
105106 CONFIG_EXT4_FS=y
106107 CONFIG_EXT4_FS_POSIX_ACL=y
arch/riscv/configs/rv32_defconfig+1−0
@@ -93,6 +93,7 @@ CONFIG_VIRTIO_BALLOON=y · 92 unmodified lines
9393 CONFIG_VIRTIO_INPUT=y
9494 CONFIG_VIRTIO_MMIO=y
9595 CONFIG_RPMSG_CHAR=y
96+CONFIG_RPMSG_CTRL=y
9697 CONFIG_RPMSG_VIRTIO=y
9798 CONFIG_EXT4_FS=y
9899 CONFIG_EXT4_FS_POSIX_ACL=y
arch/riscv/include/asm/kvm_host.h+0−3
@@ -193,9 +193,6 @@ struct kvm_vcpu_arch { · 192 unmodified lines
193193
194194 /* Don't run the VCPU (blocked) */
195195 bool pause;
196−
197− /* SRCU lock index for in-kernel run loop */
198− int srcu_idx;
199196 };
200197
201198 static inline void kvm_arch_hardware_unsetup(void) {}
arch/riscv/kernel/patch.c+1−1
@@ -104,7 +104,7 @@ static int patch_text_cb(void *data) · 103 unmodified lines
104104 struct patch_insn *patch = data;
105105 int ret = 0;
106106
107− if (atomic_inc_return(&patch->cpu_count) == 1) {
107+ if (atomic_inc_return(&patch->cpu_count) == num_online_cpus()) {
108108 ret =
109109 patch_text_nosync(patch->addr, &patch->insn,
110110 GET_INSN_LENGTH(patch->insn));
arch/riscv/kvm/vcpu.c+20−19
@@ -38,14 +38,16 @@ const struct kvm_stats_header kvm_vcpu_stats_header = { · 37 unmodified lines
3838 sizeof(kvm_vcpu_stats_desc),
3939 };
4040
41−#define KVM_RISCV_ISA_ALLOWED (riscv_isa_extension_mask(a) | \
42− riscv_isa_extension_mask(c) | \
43− riscv_isa_extension_mask(d) | \
44− riscv_isa_extension_mask(f) | \
45− riscv_isa_extension_mask(i) | \
46− riscv_isa_extension_mask(m) | \
47− riscv_isa_extension_mask(s) | \
48− riscv_isa_extension_mask(u))
41+#define KVM_RISCV_ISA_DISABLE_ALLOWED (riscv_isa_extension_mask(d) | \
42+ riscv_isa_extension_mask(f))
43+
44+#define KVM_RISCV_ISA_DISABLE_NOT_ALLOWED (riscv_isa_extension_mask(a) | \
45+ riscv_isa_extension_mask(c) | \
46+ riscv_isa_extension_mask(i) | \
47+ riscv_isa_extension_mask(m))
48+
49+#define KVM_RISCV_ISA_ALLOWED (KVM_RISCV_ISA_DISABLE_ALLOWED | \
50+ KVM_RISCV_ISA_DISABLE_NOT_ALLOWED)
4951
5052 static void kvm_riscv_reset_vcpu(struct kvm_vcpu *vcpu)
5153 {
@@ -219,7 +221,8 @@ static int kvm_riscv_vcpu_set_reg_config(struct kvm_vcpu *vcpu, · 167 unmodified lines
219221 switch (reg_num) {
220222 case KVM_REG_RISCV_CONFIG_REG(isa):
221223 if (!vcpu->arch.ran_atleast_once) {
222− vcpu->arch.isa = reg_val;
224+ /* Ignore the disable request for these extensions */
225+ vcpu->arch.isa = reg_val | KVM_RISCV_ISA_DISABLE_NOT_ALLOWED;
223226 vcpu->arch.isa &= riscv_isa_extension_base(NULL);
224227 vcpu->arch.isa &= KVM_RISCV_ISA_ALLOWED;
225228 kvm_riscv_vcpu_fp_reset(vcpu);
@@ -653,8 +656,6 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) · 427 unmodified lines
653656 vcpu->arch.isa);
654657 kvm_riscv_vcpu_host_fp_restore(&vcpu->arch.host_context);
655658
656− csr_write(CSR_HGATP, 0);
657−
658659 csr->vsstatus = csr_read(CSR_VSSTATUS);
659660 csr->vsie = csr_read(CSR_VSIE);
660661 csr->vstvec = csr_read(CSR_VSTVEC);
@@ -726,13 +727,13 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) · 65 unmodified lines
726727 /* Mark this VCPU ran at least once */
727728 vcpu->arch.ran_atleast_once = true;
728729
729− vcpu->arch.srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
730+ kvm_vcpu_srcu_read_lock(vcpu);
730731
731732 /* Process MMIO value returned from user-space */
732733 if (run->exit_reason == KVM_EXIT_MMIO) {
733734 ret = kvm_riscv_vcpu_mmio_return(vcpu, vcpu->run);
734735 if (ret) {
735− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->arch.srcu_idx);
736+ kvm_vcpu_srcu_read_unlock(vcpu);
736737 return ret;
737738 }
738739 }
@@ -741,13 +742,13 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) · 2 unmodified lines
741742 if (run->exit_reason == KVM_EXIT_RISCV_SBI) {
742743 ret = kvm_riscv_vcpu_sbi_return(vcpu, vcpu->run);
743744 if (ret) {
744− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->arch.srcu_idx);
745+ kvm_vcpu_srcu_read_unlock(vcpu);
745746 return ret;
746747 }
747748 }
748749
749750 if (run->immediate_exit) {
750− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->arch.srcu_idx);
751+ kvm_vcpu_srcu_read_unlock(vcpu);
751752 return -EINTR;
752753 }
753754
@@ -786,7 +787,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) · 32 unmodified lines
786787 */
787788 vcpu->mode = IN_GUEST_MODE;
788789
789− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->arch.srcu_idx);
790+ kvm_vcpu_srcu_read_unlock(vcpu);
790791 smp_mb__after_srcu_read_unlock();
791792
792793 /*
@@ -804,7 +805,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) · 11 unmodified lines
804805 vcpu->mode = OUTSIDE_GUEST_MODE;
805806 local_irq_enable();
806807 preempt_enable();
807− vcpu->arch.srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
808+ kvm_vcpu_srcu_read_lock(vcpu);
808809 continue;
809810 }
810811
@@ -848,7 +849,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) · 37 unmodified lines
848849
849850 preempt_enable();
850851
851− vcpu->arch.srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
852+ kvm_vcpu_srcu_read_lock(vcpu);
852853
853854 ret = kvm_riscv_vcpu_exit(vcpu, run, &trap);
854855 }
@@ -857,7 +858,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) · 2 unmodified lines
857858
858859 vcpu_put(vcpu);
859860
860− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->arch.srcu_idx);
861+ kvm_vcpu_srcu_read_unlock(vcpu);
861862
862863 return ret;
863864 }
arch/riscv/kvm/vcpu_exit.c+2−2
@@ -456,9 +456,9 @@ static int stage2_page_fault(struct kvm_vcpu *vcpu, struct kvm_run *run, · 455 unmodified lines
456456 void kvm_riscv_vcpu_wfi(struct kvm_vcpu *vcpu)
457457 {
458458 if (!kvm_arch_vcpu_runnable(vcpu)) {
459− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->arch.srcu_idx);
459+ kvm_vcpu_srcu_read_unlock(vcpu);
460460 kvm_vcpu_halt(vcpu);
461− vcpu->arch.srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
461+ kvm_vcpu_srcu_read_lock(vcpu);
462462 kvm_clear_request(KVM_REQ_UNHALT, vcpu);
463463 }
464464 }
arch/riscv/kvm/vcpu_fp.c+1−0
@@ -11,6 +11,7 @@ · 10 unmodified lines
1111 #include <linux/err.h>
1212 #include <linux/kvm_host.h>
1313 #include <linux/uaccess.h>
14+#include <asm/hwcap.h>
1415
1516 #ifdef CONFIG_FPU
1617 void kvm_riscv_vcpu_fp_reset(struct kvm_vcpu *vcpu)
arch/riscv/kvm/vcpu_sbi.c+3−2
@@ -83,7 +83,7 @@ void kvm_riscv_vcpu_sbi_forward(struct kvm_vcpu *vcpu, struct kvm_run *run) · 82 unmodified lines
8383
8484 void kvm_riscv_vcpu_sbi_system_reset(struct kvm_vcpu *vcpu,
8585 struct kvm_run *run,
86− u32 type, u64 flags)
86+ u32 type, u64 reason)
8787 {
8888 unsigned long i;
8989 struct kvm_vcpu *tmp;
@@ -94,7 +94,8 @@ void kvm_riscv_vcpu_sbi_system_reset(struct kvm_vcpu *vcpu, · 4 unmodified lines
9494
9595 memset(&run->system_event, 0, sizeof(run->system_event));
9696 run->system_event.type = type;
97− run->system_event.flags = flags;
97+ run->system_event.ndata = 1;
98+ run->system_event.data[0] = reason;
9899 run->exit_reason = KVM_EXIT_SYSTEM_EVENT;
99100 }
100101
arch/riscv/mm/init.c+1−0
@@ -718,6 +718,7 @@ retry: · 717 unmodified lines
718718 if (!check_l4) {
719719 disable_pgtable_l5();
720720 check_l4 = true;
721+ memset(early_pg_dir, 0, PAGE_SIZE);
721722 goto retry;
722723 }
723724 disable_pgtable_l4();
arch/s390/Kconfig+19−0
@@ -255,6 +255,10 @@ config HAVE_MARCH_Z15_FEATURES · 254 unmodified lines
255255 def_bool n
256256 select HAVE_MARCH_Z14_FEATURES
257257
258+config HAVE_MARCH_Z16_FEATURES
259+ def_bool n
260+ select HAVE_MARCH_Z15_FEATURES
261+
258262 choice
259263 prompt "Processor type"
260264 default MARCH_Z196
@@ -312,6 +316,14 @@ config MARCH_Z15 · 51 unmodified lines
312316 and 8561 series). The kernel will be slightly faster but will not
313317 work on older machines.
314318
319+config MARCH_Z16
320+ bool "IBM z16"
321+ select HAVE_MARCH_Z16_FEATURES
322+ depends on $(cc-option,-march=z16)
323+ help
324+ Select this to enable optimizations for IBM z16 (3931 and
325+ 3932 series).
326+
315327 endchoice
316328
317329 config MARCH_Z10_TUNE
@@ -332,6 +344,9 @@ config MARCH_Z14_TUNE · 14 unmodified lines
332344 config MARCH_Z15_TUNE
333345 def_bool TUNE_Z15 || MARCH_Z15 && TUNE_DEFAULT
334346
347+config MARCH_Z16_TUNE
348+ def_bool TUNE_Z16 || MARCH_Z16 && TUNE_DEFAULT
349+
335350 choice
336351 prompt "Tune code generation"
337352 default TUNE_DEFAULT
@@ -372,6 +387,10 @@ config TUNE_Z15 · 34 unmodified lines
372387 bool "IBM z15"
373388 depends on $(cc-option,-mtune=z15)
374389
390+config TUNE_Z16
391+ bool "IBM z16"
392+ depends on $(cc-option,-mtune=z16)
393+
375394 endchoice
376395
377396 config 64BIT
arch/s390/Makefile+2−0
@@ -42,6 +42,7 @@ mflags-$(CONFIG_MARCH_ZEC12) := -march=zEC12 · 41 unmodified lines
4242 mflags-$(CONFIG_MARCH_Z13) := -march=z13
4343 mflags-$(CONFIG_MARCH_Z14) := -march=z14
4444 mflags-$(CONFIG_MARCH_Z15) := -march=z15
45+mflags-$(CONFIG_MARCH_Z16) := -march=z16
4546
4647 export CC_FLAGS_MARCH := $(mflags-y)
4748
@@ -54,6 +55,7 @@ cflags-$(CONFIG_MARCH_ZEC12_TUNE) += -mtune=zEC12 · 6 unmodified lines
5455 cflags-$(CONFIG_MARCH_Z13_TUNE) += -mtune=z13
5556 cflags-$(CONFIG_MARCH_Z14_TUNE) += -mtune=z14
5657 cflags-$(CONFIG_MARCH_Z15_TUNE) += -mtune=z15
58+cflags-$(CONFIG_MARCH_Z16_TUNE) += -mtune=z16
5759
5860 cflags-y += -Wa,-I$(srctree)/arch/$(ARCH)/include
5961
arch/s390/configs/debug_defconfig+6−2
@@ -499,11 +499,13 @@ CONFIG_NLMON=m · 498 unmodified lines
499499 # CONFIG_NET_VENDOR_CHELSIO is not set
500500 # CONFIG_NET_VENDOR_CISCO is not set
501501 # CONFIG_NET_VENDOR_CORTINA is not set
502+# CONFIG_NET_VENDOR_DAVICOM is not set
502503 # CONFIG_NET_VENDOR_DEC is not set
503504 # CONFIG_NET_VENDOR_DLINK is not set
504505 # CONFIG_NET_VENDOR_EMULEX is not set
505506 # CONFIG_NET_VENDOR_ENGLEDER is not set
506507 # CONFIG_NET_VENDOR_EZCHIP is not set
508+# CONFIG_NET_VENDOR_FUNGIBLE is not set
507509 # CONFIG_NET_VENDOR_GOOGLE is not set
508510 # CONFIG_NET_VENDOR_HUAWEI is not set
509511 # CONFIG_NET_VENDOR_INTEL is not set
@@ -588,13 +590,13 @@ CONFIG_MLX5_INFINIBAND=m · 78 unmodified lines
588590 CONFIG_SYNC_FILE=y
589591 CONFIG_VFIO=m
590592 CONFIG_VFIO_PCI=m
593+CONFIG_MLX5_VFIO_PCI=m
591594 CONFIG_VFIO_MDEV=m
592595 CONFIG_VIRTIO_PCI=m
593596 CONFIG_VIRTIO_BALLOON=m
594597 CONFIG_VIRTIO_INPUT=y
595598 CONFIG_VHOST_NET=m
596599 CONFIG_VHOST_VSOCK=m
597−# CONFIG_SURFACE_PLATFORMS is not set
598600 CONFIG_S390_CCW_IOMMU=y
599601 CONFIG_S390_AP_IOMMU=y
600602 CONFIG_EXT4_FS=y
@@ -690,6 +692,7 @@ CONFIG_ENCRYPTED_KEYS=m · 89 unmodified lines
690692 CONFIG_KEY_NOTIFICATIONS=y
691693 CONFIG_SECURITY=y
692694 CONFIG_SECURITY_NETWORK=y
695+CONFIG_HARDENED_USERCOPY=y
693696 CONFIG_FORTIFY_SOURCE=y
694697 CONFIG_SECURITY_SELINUX=y
695698 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
@@ -733,6 +736,7 @@ CONFIG_CRYPTO_MD5=y · 37 unmodified lines
733736 CONFIG_CRYPTO_MICHAEL_MIC=m
734737 CONFIG_CRYPTO_RMD160=m
735738 CONFIG_CRYPTO_SHA3=m
739+CONFIG_CRYPTO_SM3=m
736740 CONFIG_CRYPTO_WP512=m
737741 CONFIG_CRYPTO_AES_TI=m
738742 CONFIG_CRYPTO_ANUBIS=m
@@ -786,7 +790,6 @@ CONFIG_DMA_CMA=y · 47 unmodified lines
786790 CONFIG_CMA_SIZE_MBYTES=0
787791 CONFIG_PRINTK_TIME=y
788792 CONFIG_DYNAMIC_DEBUG=y
789−CONFIG_DEBUG_INFO=y
790793 CONFIG_DEBUG_INFO_DWARF4=y
791794 CONFIG_DEBUG_INFO_BTF=y
792795 CONFIG_GDB_SCRIPTS=y
@@ -814,6 +817,7 @@ CONFIG_DEBUG_MEMORY_INIT=y · 21 unmodified lines
814817 CONFIG_MEMORY_NOTIFIER_ERROR_INJECT=m
815818 CONFIG_DEBUG_PER_CPU_MAPS=y
816819 CONFIG_KFENCE=y
820+CONFIG_KFENCE_DEFERRABLE=y
817821 CONFIG_KFENCE_STATIC_KEYS=y
818822 CONFIG_DEBUG_SHIRQ=y
819823 CONFIG_PANIC_ON_OOPS=y
arch/s390/configs/defconfig+4−2
@@ -490,11 +490,13 @@ CONFIG_NLMON=m · 489 unmodified lines
490490 # CONFIG_NET_VENDOR_CHELSIO is not set
491491 # CONFIG_NET_VENDOR_CISCO is not set
492492 # CONFIG_NET_VENDOR_CORTINA is not set
493+# CONFIG_NET_VENDOR_DAVICOM is not set
493494 # CONFIG_NET_VENDOR_DEC is not set
494495 # CONFIG_NET_VENDOR_DLINK is not set
495496 # CONFIG_NET_VENDOR_EMULEX is not set
496497 # CONFIG_NET_VENDOR_ENGLEDER is not set
497498 # CONFIG_NET_VENDOR_EZCHIP is not set
499+# CONFIG_NET_VENDOR_FUNGIBLE is not set
498500 # CONFIG_NET_VENDOR_GOOGLE is not set
499501 # CONFIG_NET_VENDOR_HUAWEI is not set
500502 # CONFIG_NET_VENDOR_INTEL is not set
@@ -578,13 +580,13 @@ CONFIG_MLX5_INFINIBAND=m · 77 unmodified lines
578580 CONFIG_SYNC_FILE=y
579581 CONFIG_VFIO=m
580582 CONFIG_VFIO_PCI=m
583+CONFIG_MLX5_VFIO_PCI=m
581584 CONFIG_VFIO_MDEV=m
582585 CONFIG_VIRTIO_PCI=m
583586 CONFIG_VIRTIO_BALLOON=m
584587 CONFIG_VIRTIO_INPUT=y
585588 CONFIG_VHOST_NET=m
586589 CONFIG_VHOST_VSOCK=m
587−# CONFIG_SURFACE_PLATFORMS is not set
588590 CONFIG_S390_CCW_IOMMU=y
589591 CONFIG_S390_AP_IOMMU=y
590592 CONFIG_EXT4_FS=y
@@ -720,6 +722,7 @@ CONFIG_CRYPTO_MD5=y · 129 unmodified lines
720722 CONFIG_CRYPTO_MICHAEL_MIC=m
721723 CONFIG_CRYPTO_RMD160=m
722724 CONFIG_CRYPTO_SHA3=m
725+CONFIG_CRYPTO_SM3=m
723726 CONFIG_CRYPTO_WP512=m
724727 CONFIG_CRYPTO_AES_TI=m
725728 CONFIG_CRYPTO_ANUBIS=m
@@ -772,7 +775,6 @@ CONFIG_DMA_CMA=y · 46 unmodified lines
772775 CONFIG_CMA_SIZE_MBYTES=0
773776 CONFIG_PRINTK_TIME=y
774777 CONFIG_DYNAMIC_DEBUG=y
775−CONFIG_DEBUG_INFO=y
776778 CONFIG_DEBUG_INFO_DWARF4=y
777779 CONFIG_DEBUG_INFO_BTF=y
778780 CONFIG_GDB_SCRIPTS=y
arch/s390/configs/zfcpdump_defconfig+3−3
@@ -26,6 +26,7 @@ CONFIG_CRASH_DUMP=y · 25 unmodified lines
2626 # CONFIG_S390_GUEST is not set
2727 # CONFIG_SECCOMP is not set
2828 # CONFIG_GCC_PLUGINS is not set
29+# CONFIG_BLOCK_LEGACY_AUTOLOAD is not set
2930 CONFIG_PARTITION_ADVANCED=y
3031 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
3132 # CONFIG_COMPACTION is not set
@@ -60,7 +61,6 @@ CONFIG_ZFCP=y · 28 unmodified lines
6061 # CONFIG_HID is not set
6162 # CONFIG_VIRTIO_MENU is not set
6263 # CONFIG_VHOST_MENU is not set
63−# CONFIG_SURFACE_PLATFORMS is not set
6464 # CONFIG_IOMMU_SUPPORT is not set
6565 # CONFIG_DNOTIFY is not set
6666 # CONFIG_INOTIFY_USER is not set
@@ -71,10 +71,10 @@ CONFIG_LSM="yama,loadpin,safesetid,integrity" · 4 unmodified lines
7171 CONFIG_XZ_DEC_MICROLZMA=y
7272 CONFIG_PRINTK_TIME=y
7373 # CONFIG_SYMBOLIC_ERRNAME is not set
74−CONFIG_DEBUG_INFO=y
74+CONFIG_DEBUG_KERNEL=y
75+CONFIG_DEBUG_INFO_DWARF4=y
7576 CONFIG_DEBUG_INFO_BTF=y
7677 CONFIG_DEBUG_FS=y
77−CONFIG_DEBUG_KERNEL=y
7878 CONFIG_PANIC_ON_OOPS=y
7979 # CONFIG_SCHED_DEBUG is not set
8080 CONFIG_RCU_CPU_STALL_TIMEOUT=60
arch/s390/include/asm/entry-common.h+1−1
@@ -58,7 +58,7 @@ static inline void arch_exit_to_user_mode_prepare(struct pt_regs *regs, · 57 unmodified lines
5858
5959 static inline bool on_thread_stack(void)
6060 {
61− return !(((unsigned long)(current->stack) ^ current_stack_pointer()) & ~(THREAD_SIZE - 1));
61+ return !(((unsigned long)(current->stack) ^ current_stack_pointer) & ~(THREAD_SIZE - 1));
6262 }
6363
6464 #endif
arch/s390/include/asm/processor.h+1−7
@@ -200,13 +200,7 @@ unsigned long __get_wchan(struct task_struct *p); · 199 unmodified lines
200200 /* Has task runtime instrumentation enabled ? */
201201 #define is_ri_task(tsk) (!!(tsk)->thread.ri_cb)
202202
203−static __always_inline unsigned long current_stack_pointer(void)
204−{
205− unsigned long sp;
206−
207− asm volatile("la %0,0(15)" : "=a" (sp));
208− return sp;
209−}
203+register unsigned long current_stack_pointer asm("r15");
210204
211205 static __always_inline unsigned short stap(void)
212206 {
arch/s390/include/asm/stacktrace.h+1−1
@@ -46,7 +46,7 @@ struct stack_frame { · 45 unmodified lines
4646 };
4747
4848 /*
49− * Unlike current_stack_pointer() which simply returns current value of %r15
49+ * Unlike current_stack_pointer which simply contains the current value of %r15
5050 * current_frame_address() returns function stack frame address, which matches
5151 * %r15 upon function invocation. It may differ from %r15 later if function
5252 * allocates stack for local variables or new stack frame to call other
arch/s390/kernel/machine_kexec.c+1−1
@@ -54,7 +54,7 @@ static void __do_machine_kdump(void *image) · 53 unmodified lines
5454 * This need to be done *after* s390_reset_system set the
5555 * prefix register of this CPU to zero
5656 */
57− memcpy((void *) __LC_FPREGS_SAVE_AREA,
57+ memcpy(absolute_pointer(__LC_FPREGS_SAVE_AREA),
5858 (void *)(prefix + __LC_FPREGS_SAVE_AREA), 512);
5959
6060 __load_psw_mask(PSW_MASK_BASE | PSW_DEFAULT_KEY | PSW_MASK_EA | PSW_MASK_BA);
arch/s390/kernel/processor.c+4−0
@@ -283,6 +283,10 @@ static int __init setup_elf_platform(void) · 282 unmodified lines
283283 case 0x8562:
284284 strcpy(elf_platform, "z15");
285285 break;
286+ case 0x3931:
287+ case 0x3932:
288+ strcpy(elf_platform, "z16");
289+ break;
286290 }
287291 return 0;
288292 }
arch/s390/kvm/interrupt.c+2−2
@@ -1334,11 +1334,11 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu) · 1333 unmodified lines
13341334 hrtimer_start(&vcpu->arch.ckc_timer, sltime, HRTIMER_MODE_REL);
13351335 VCPU_EVENT(vcpu, 4, "enabled wait: %llu ns", sltime);
13361336 no_timer:
1337− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
1337+ kvm_vcpu_srcu_read_unlock(vcpu);
13381338 kvm_vcpu_halt(vcpu);
13391339 vcpu->valid_wakeup = false;
13401340 __unset_cpu_idle(vcpu);
1341− vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
1341+ kvm_vcpu_srcu_read_lock(vcpu);
13421342
13431343 hrtimer_cancel(&vcpu->arch.ckc_timer);
13441344 return 0;
arch/s390/kvm/kvm-s390.c+4−4
@@ -4237,14 +4237,14 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) · 4236 unmodified lines
42374237 * We try to hold kvm->srcu during most of vcpu_run (except when run-
42384238 * ning the guest), so that memslots (and other stuff) are protected
42394239 */
4240− vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
4240+ kvm_vcpu_srcu_read_lock(vcpu);
42414241
42424242 do {
42434243 rc = vcpu_pre_run(vcpu);
42444244 if (rc)
42454245 break;
42464246
4247− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
4247+ kvm_vcpu_srcu_read_unlock(vcpu);
42484248 /*
42494249 * As PF_VCPU will be used in fault handler, between
42504250 * guest_enter and guest_exit should be no uaccess.
@@ -4281,12 +4281,12 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) · 30 unmodified lines
42814281 __enable_cpu_timer_accounting(vcpu);
42824282 guest_exit_irqoff();
42834283 local_irq_enable();
4284− vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
4284+ kvm_vcpu_srcu_read_lock(vcpu);
42854285
42864286 rc = vcpu_post_run(vcpu, exit_reason);
42874287 } while (!signal_pending(current) && !guestdbg_exit_pending(vcpu) && !rc);
42884288
4289− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
4289+ kvm_vcpu_srcu_read_unlock(vcpu);
42904290 return rc;
42914291 }
42924292
arch/s390/kvm/pv.c+1−6
@@ -137,12 +137,7 @@ static int kvm_s390_pv_alloc_vm(struct kvm *kvm) · 136 unmodified lines
137137 /* Allocate variable storage */
138138 vlen = ALIGN(virt * ((npages * PAGE_SIZE) / HPAGE_SIZE), PAGE_SIZE);
139139 vlen += uv_info.guest_virt_base_stor_len;
140− /*
141− * The Create Secure Configuration Ultravisor Call does not support
142− * using large pages for the virtual memory area.
143− * This is a hardware limitation.
144− */
145− kvm->arch.pv.stor_var = vmalloc_no_huge(vlen);
140+ kvm->arch.pv.stor_var = vzalloc(vlen);
146141 if (!kvm->arch.pv.stor_var)
147142 goto out_err;
148143 return 0;
arch/s390/kvm/vsie.c+2−2
@@ -1091,7 +1091,7 @@ static int do_vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page) · 1090 unmodified lines
10911091
10921092 handle_last_fault(vcpu, vsie_page);
10931093
1094− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
1094+ kvm_vcpu_srcu_read_unlock(vcpu);
10951095
10961096 /* save current guest state of bp isolation override */
10971097 guest_bp_isolation = test_thread_flag(TIF_ISOLATE_BP_GUEST);
@@ -1133,7 +1133,7 @@ static int do_vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page) · 35 unmodified lines
11331133 if (!guest_bp_isolation)
11341134 clear_thread_flag(TIF_ISOLATE_BP_GUEST);
11351135
1136− vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
1136+ kvm_vcpu_srcu_read_lock(vcpu);
11371137
11381138 if (rc == -EINTR) {
11391139 VCPU_EVENT(vcpu, 3, "%s", "machine check");
arch/s390/lib/test_unwind.c+1−1
@@ -147,7 +147,7 @@ static __always_inline struct pt_regs fake_pt_regs(void) · 146 unmodified lines
147147 struct pt_regs regs;
148148
149149 memset(&regs, 0, sizeof(regs));
150− regs.gprs[15] = current_stack_pointer();
150+ regs.gprs[15] = current_stack_pointer;
151151
152152 asm volatile(
153153 "basr %[psw_addr],0\n"
arch/sparc/include/asm/cacheflush_32.h+1−0
@@ -35,6 +35,7 @@ · 34 unmodified lines
3535 #define flush_page_for_dma(addr) \
3636 sparc32_cachetlb_ops->page_for_dma(addr)
3737
38+struct page;
3839 void sparc_flush_page_to_ram(struct page *page);
3940
4041 #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1
arch/x86/Kconfig+1−1
@@ -1866,7 +1866,7 @@ config X86_KERNEL_IBT · 1865 unmodified lines
18661866 code with them to make this happen.
18671867
18681868 In addition to building the kernel with IBT, seal all functions that
1869− are not indirect call targets, avoiding them ever becomming one.
1869+ are not indirect call targets, avoiding them ever becoming one.
18701870
18711871 This requires LTO like objtool runs and will slow down the build. It
18721872 does significantly reduce the number of ENDBR instructions in the
arch/x86/entry/entry_64.S+3−0
@@ -337,6 +337,9 @@ SYM_CODE_END(ret_from_fork) · 336 unmodified lines
337337
338338 call \cfunc
339339
340+ /* For some configurations \cfunc ends up being a noreturn. */
341+ REACHABLE
342+
340343 jmp error_return
341344 .endm
342345
arch/x86/events/intel/cstate.c+4−3
@@ -51,7 +51,7 @@ · 50 unmodified lines
5151 * perf code: 0x02
5252 * Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW,
5353 * SKL,KNL,GLM,CNL,KBL,CML,ICL,ICX,
54− * TGL,TNT,RKL,ADL,RPL
54+ * TGL,TNT,RKL,ADL,RPL,SPR
5555 * Scope: Core
5656 * MSR_CORE_C7_RESIDENCY: CORE C7 Residency Counter
5757 * perf code: 0x03
@@ -62,7 +62,7 @@ · 4 unmodified lines
6262 * perf code: 0x00
6363 * Available model: SNB,IVB,HSW,BDW,SKL,KNL,GLM,CNL,
6464 * KBL,CML,ICL,ICX,TGL,TNT,RKL,ADL,
65− * RPL
65+ * RPL,SPR
6666 * Scope: Package (physical package)
6767 * MSR_PKG_C3_RESIDENCY: Package C3 Residency Counter.
6868 * perf code: 0x01
@@ -74,7 +74,7 @@ · 5 unmodified lines
7474 * perf code: 0x02
7575 * Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW,
7676 * SKL,KNL,GLM,CNL,KBL,CML,ICL,ICX,
77− * TGL,TNT,RKL,ADL,RPL
77+ * TGL,TNT,RKL,ADL,RPL,SPR
7878 * Scope: Package (physical package)
7979 * MSR_PKG_C7_RESIDENCY: Package C7 Residency Counter.
8080 * perf code: 0x03
@@ -675,6 +675,7 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = { · 594 unmodified lines
675675 X86_MATCH_INTEL_FAM6_MODEL(ICELAKE, &icl_cstates),
676676 X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_X, &icx_cstates),
677677 X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_D, &icx_cstates),
678+ X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &icx_cstates),
678679
679680 X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, &icl_cstates),
680681 X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, &icl_cstates),
arch/x86/include/asm/compat.h+2−4
@@ -28,15 +28,13 @@ typedef u16 compat_ipc_pid_t; · 27 unmodified lines
2828 typedef __kernel_fsid_t compat_fsid_t;
2929
3030 struct compat_stat {
31− compat_dev_t st_dev;
32− u16 __pad1;
31+ u32 st_dev;
3332 compat_ino_t st_ino;
3433 compat_mode_t st_mode;
3534 compat_nlink_t st_nlink;
3635 __compat_uid_t st_uid;
3736 __compat_gid_t st_gid;
38− compat_dev_t st_rdev;
39− u16 __pad2;
37+ u32 st_rdev;
4038 u32 st_size;
4139 u32 st_blksize;
4240 u32 st_blocks;
arch/x86/include/asm/intel-family.h+3−0
@@ -26,6 +26,7 @@ · 25 unmodified lines
2626 * _G - parts with extra graphics on
2727 * _X - regular server parts
2828 * _D - micro server parts
29+ * _N,_P - other mobile parts
2930 *
3031 * Historical OPTDIFFs:
3132 *
@@ -107,8 +108,10 @@ · 75 unmodified lines
107108
108109 #define INTEL_FAM6_ALDERLAKE 0x97 /* Golden Cove / Gracemont */
109110 #define INTEL_FAM6_ALDERLAKE_L 0x9A /* Golden Cove / Gracemont */
111+#define INTEL_FAM6_ALDERLAKE_N 0xBE
110112
111113 #define INTEL_FAM6_RAPTORLAKE 0xB7
114+#define INTEL_FAM6_RAPTORLAKE_P 0xBA
112115
113116 /* "Small Core" Processors (Atom) */
114117
arch/x86/include/asm/io.h+0−2
@@ -210,8 +210,6 @@ void __iomem *ioremap(resource_size_t offset, unsigned long size); · 209 unmodified lines
210210 extern void iounmap(volatile void __iomem *addr);
211211 #define iounmap iounmap
212212
213−extern void set_iounmap_nonlazy(void);
214−
215213 #ifdef __KERNEL__
216214
217215 void memcpy_fromio(void *, const volatile void __iomem *, size_t);
arch/x86/include/asm/kvm-x86-ops.h+1−0
@@ -118,6 +118,7 @@ KVM_X86_OP_OPTIONAL(mem_enc_register_region) · 117 unmodified lines
118118 KVM_X86_OP_OPTIONAL(mem_enc_unregister_region)
119119 KVM_X86_OP_OPTIONAL(vm_copy_enc_context_from)
120120 KVM_X86_OP_OPTIONAL(vm_move_enc_context_from)
121+KVM_X86_OP_OPTIONAL(guest_memory_reclaimed)
121122 KVM_X86_OP(get_msr_feature)
122123 KVM_X86_OP(can_emulate_instruction)
123124 KVM_X86_OP(apic_init_signal_blocked)
arch/x86/include/asm/kvm_host.h+6−5
@@ -974,12 +974,10 @@ enum hv_tsc_page_status { · 973 unmodified lines
974974 HV_TSC_PAGE_UNSET = 0,
975975 /* TSC page MSR was written by the guest, update pending */
976976 HV_TSC_PAGE_GUEST_CHANGED,
977− /* TSC page MSR was written by KVM userspace, update pending */
977+ /* TSC page update was triggered from the host side */
978978 HV_TSC_PAGE_HOST_CHANGED,
979979 /* TSC page was properly set up and is currently active */
980980 HV_TSC_PAGE_SET,
981− /* TSC page is currently being updated and therefore is inactive */
982− HV_TSC_PAGE_UPDATING,
983981 /* TSC page was set up with an inaccessible GPA */
984982 HV_TSC_PAGE_BROKEN,
985983 };
@@ -1052,6 +1050,7 @@ enum kvm_apicv_inhibit { · 66 unmodified lines
10521050 APICV_INHIBIT_REASON_X2APIC,
10531051 APICV_INHIBIT_REASON_BLOCKIRQ,
10541052 APICV_INHIBIT_REASON_ABSENT,
1053+ APICV_INHIBIT_REASON_SEV,
10551054 };
10561055
10571056 struct kvm_arch {
@@ -1485,6 +1484,7 @@ struct kvm_x86_ops { · 427 unmodified lines
14851484 int (*mem_enc_unregister_region)(struct kvm *kvm, struct kvm_enc_region *argp);
14861485 int (*vm_copy_enc_context_from)(struct kvm *kvm, unsigned int source_fd);
14871486 int (*vm_move_enc_context_from)(struct kvm *kvm, unsigned int source_fd);
1487+ void (*guest_memory_reclaimed)(struct kvm *kvm);
14881488
14891489 int (*get_msr_feature)(struct kvm_msr_entry *entry);
14901490
@@ -1585,8 +1585,9 @@ static inline int kvm_arch_flush_remote_tlb(struct kvm *kvm) · 94 unmodified lines
15851585 #define kvm_arch_pmi_in_guest(vcpu) \
15861586 ((vcpu) && (vcpu)->arch.handling_intr_from_guest)
15871587
1588−int kvm_mmu_module_init(void);
1589−void kvm_mmu_module_exit(void);
1588+void kvm_mmu_x86_module_init(void);
1589+int kvm_mmu_vendor_module_init(void);
1590+void kvm_mmu_vendor_module_exit(void);
15901591
15911592 void kvm_mmu_destroy(struct kvm_vcpu *vcpu);
15921593 int kvm_mmu_create(struct kvm_vcpu *vcpu);
arch/x86/include/asm/microcode.h+2−0
@@ -131,10 +131,12 @@ extern void __init load_ucode_bsp(void); · 130 unmodified lines
131131 extern void load_ucode_ap(void);
132132 void reload_early_microcode(void);
133133 extern bool initrd_gone;
134+void microcode_bsp_resume(void);
134135 #else
135136 static inline void __init load_ucode_bsp(void) { }
136137 static inline void load_ucode_ap(void) { }
137138 static inline void reload_early_microcode(void) { }
139+static inline void microcode_bsp_resume(void) { }
138140 #endif
139141
140142 #endif /* _ASM_X86_MICROCODE_H */
arch/x86/include/asm/msr-index.h+2−2
@@ -128,9 +128,9 @@ · 127 unmodified lines
128128 #define TSX_CTRL_RTM_DISABLE BIT(0) /* Disable RTM feature */
129129 #define TSX_CTRL_CPUID_CLEAR BIT(1) /* Disable TSX enumeration */
130130
131−/* SRBDS support */
132131 #define MSR_IA32_MCU_OPT_CTRL 0x00000123
133−#define RNGDS_MITG_DIS BIT(0)
132+#define RNGDS_MITG_DIS BIT(0) /* SRBDS support */
133+#define RTM_ALLOW BIT(1) /* TSX development mode */
134134
135135 #define MSR_IA32_SYSENTER_CS 0x00000174
136136 #define MSR_IA32_SYSENTER_ESP 0x00000175
arch/x86/include/asm/pgtable_types.h+0−4
@@ -559,10 +559,6 @@ static inline void update_page_count(int level, unsigned long pages) { } · 558 unmodified lines
559559 extern pte_t *lookup_address(unsigned long address, unsigned int *level);
560560 extern pte_t *lookup_address_in_pgd(pgd_t *pgd, unsigned long address,
561561 unsigned int *level);
562−
563−struct mm_struct;
564−extern pte_t *lookup_address_in_mm(struct mm_struct *mm, unsigned long address,
565− unsigned int *level);
566562 extern pmd_t *lookup_pmd_address(unsigned long address);
567563 extern phys_addr_t slow_virt_to_phys(void *__address);
568564 extern int __init kernel_map_pages_in_pgd(pgd_t *pgd, u64 pfn,
arch/x86/include/asm/static_call.h+1−0
@@ -26,6 +26,7 @@ · 25 unmodified lines
2626 ".align 4 \n" \
2727 ".globl " STATIC_CALL_TRAMP_STR(name) " \n" \
2828 STATIC_CALL_TRAMP_STR(name) ": \n" \
29+ ANNOTATE_NOENDBR \
2930 insns " \n" \
3031 ".byte 0x53, 0x43, 0x54 \n" \
3132 ".type " STATIC_CALL_TRAMP_STR(name) ", @function \n" \
arch/x86/kernel/cpu/common.c+2−0
@@ -1855,6 +1855,8 @@ void identify_secondary_cpu(struct cpuinfo_x86 *c) · 1854 unmodified lines
18551855 validate_apic_and_package_id(c);
18561856 x86_spec_ctrl_setup_ap();
18571857 update_srbds_msr();
1858+
1859+ tsx_ap_init();
18581860 }
18591861
18601862 static __init int setup_noclflush(char *arg)
arch/x86/kernel/cpu/cpu.h+2−3
@@ -55,11 +55,10 @@ enum tsx_ctrl_states { · 54 unmodified lines
5555 extern __ro_after_init enum tsx_ctrl_states tsx_ctrl_state;
5656
5757 extern void __init tsx_init(void);
58−extern void tsx_enable(void);
59−extern void tsx_disable(void);
60−extern void tsx_clear_cpuid(void);
58+void tsx_ap_init(void);
6159 #else
6260 static inline void tsx_init(void) { }
61+static inline void tsx_ap_init(void) { }
6362 #endif /* CONFIG_CPU_SUP_INTEL */
6463
6564 extern void get_cpu_cap(struct cpuinfo_x86 *c);
arch/x86/kernel/cpu/intel.c+0−7
@@ -717,13 +717,6 @@ static void init_intel(struct cpuinfo_x86 *c) · 716 unmodified lines
717717
718718 init_intel_misc_features(c);
719719
720− if (tsx_ctrl_state == TSX_CTRL_ENABLE)
721− tsx_enable();
722− else if (tsx_ctrl_state == TSX_CTRL_DISABLE)
723− tsx_disable();
724− else if (tsx_ctrl_state == TSX_CTRL_RTM_ALWAYS_ABORT)
725− tsx_clear_cpuid();
726−
727720 split_lock_init();
728721 bus_lock_init();
729722
arch/x86/kernel/cpu/microcode/core.c+3−3
@@ -758,9 +758,9 @@ static struct subsys_interface mc_cpu_interface = { · 757 unmodified lines
758758 };
759759
760760 /**
761− * mc_bp_resume - Update boot CPU microcode during resume.
761+ * microcode_bsp_resume - Update boot CPU microcode during resume.
762762 */
763−static void mc_bp_resume(void)
763+void microcode_bsp_resume(void)
764764 {
765765 int cpu = smp_processor_id();
766766 struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
@@ -772,7 +772,7 @@ static void mc_bp_resume(void) · 5 unmodified lines
772772 }
773773
774774 static struct syscore_ops mc_syscore_ops = {
775− .resume = mc_bp_resume,
775+ .resume = microcode_bsp_resume,
776776 };
777777
778778 static int mc_cpu_starting(unsigned int cpu)
arch/x86/kernel/cpu/tsx.c+94−10
@@ -19,7 +19,7 @@ · 18 unmodified lines
1919
2020 enum tsx_ctrl_states tsx_ctrl_state __ro_after_init = TSX_CTRL_NOT_SUPPORTED;
2121
22−void tsx_disable(void)
22+static void tsx_disable(void)
2323 {
2424 u64 tsx;
2525
@@ -39,7 +39,7 @@ void tsx_disable(void) · 13 unmodified lines
3939 wrmsrl(MSR_IA32_TSX_CTRL, tsx);
4040 }
4141
42−void tsx_enable(void)
42+static void tsx_enable(void)
4343 {
4444 u64 tsx;
4545
@@ -58,7 +58,7 @@ void tsx_enable(void) · 12 unmodified lines
5858 wrmsrl(MSR_IA32_TSX_CTRL, tsx);
5959 }
6060
61−static bool __init tsx_ctrl_is_supported(void)
61+static bool tsx_ctrl_is_supported(void)
6262 {
6363 u64 ia32_cap = x86_read_arch_cap_msr();
6464
@@ -84,7 +84,45 @@ static enum tsx_ctrl_states x86_get_tsx_auto_mode(void) · 19 unmodified lines
8484 return TSX_CTRL_ENABLE;
8585 }
8686
87−void tsx_clear_cpuid(void)
87+/*
88+ * Disabling TSX is not a trivial business.
89+ *
90+ * First of all, there's a CPUID bit: X86_FEATURE_RTM_ALWAYS_ABORT
91+ * which says that TSX is practically disabled (all transactions are
92+ * aborted by default). When that bit is set, the kernel unconditionally
93+ * disables TSX.
94+ *
95+ * In order to do that, however, it needs to dance a bit:
96+ *
97+ * 1. The first method to disable it is through MSR_TSX_FORCE_ABORT and
98+ * the MSR is present only when *two* CPUID bits are set:
99+ *
100+ * - X86_FEATURE_RTM_ALWAYS_ABORT
101+ * - X86_FEATURE_TSX_FORCE_ABORT
102+ *
103+ * 2. The second method is for CPUs which do not have the above-mentioned
104+ * MSR: those use a different MSR - MSR_IA32_TSX_CTRL and disable TSX
105+ * through that one. Those CPUs can also have the initially mentioned
106+ * CPUID bit X86_FEATURE_RTM_ALWAYS_ABORT set and for those the same strategy
107+ * applies: TSX gets disabled unconditionally.
108+ *
109+ * When either of the two methods are present, the kernel disables TSX and
110+ * clears the respective RTM and HLE feature flags.
111+ *
112+ * An additional twist in the whole thing presents late microcode loading
113+ * which, when done, may cause for the X86_FEATURE_RTM_ALWAYS_ABORT CPUID
114+ * bit to be set after the update.
115+ *
116+ * A subsequent hotplug operation on any logical CPU except the BSP will
117+ * cause for the supported CPUID feature bits to get re-detected and, if
118+ * RTM and HLE get cleared all of a sudden, but, userspace did consult
119+ * them before the update, then funny explosions will happen. Long story
120+ * short: the kernel doesn't modify CPUID feature bits after booting.
121+ *
122+ * That's why, this function's call in init_intel() doesn't clear the
123+ * feature flags.
124+ */
125+static void tsx_clear_cpuid(void)
88126 {
89127 u64 msr;
90128
@@ -97,6 +135,39 @@ void tsx_clear_cpuid(void) · 6 unmodified lines
97135 rdmsrl(MSR_TSX_FORCE_ABORT, msr);
98136 msr |= MSR_TFA_TSX_CPUID_CLEAR;
99137 wrmsrl(MSR_TSX_FORCE_ABORT, msr);
138+ } else if (tsx_ctrl_is_supported()) {
139+ rdmsrl(MSR_IA32_TSX_CTRL, msr);
140+ msr |= TSX_CTRL_CPUID_CLEAR;
141+ wrmsrl(MSR_IA32_TSX_CTRL, msr);
142+ }
143+}
144+
145+/*
146+ * Disable TSX development mode
147+ *
148+ * When the microcode released in Feb 2022 is applied, TSX will be disabled by
149+ * default on some processors. MSR 0x122 (TSX_CTRL) and MSR 0x123
150+ * (IA32_MCU_OPT_CTRL) can be used to re-enable TSX for development, doing so is
151+ * not recommended for production deployments. In particular, applying MD_CLEAR
152+ * flows for mitigation of the Intel TSX Asynchronous Abort (TAA) transient
153+ * execution attack may not be effective on these processors when Intel TSX is
154+ * enabled with updated microcode.
155+ */
156+static void tsx_dev_mode_disable(void)
157+{
158+ u64 mcu_opt_ctrl;
159+
160+ /* Check if RTM_ALLOW exists */
161+ if (!boot_cpu_has_bug(X86_BUG_TAA) || !tsx_ctrl_is_supported() ||
162+ !cpu_feature_enabled(X86_FEATURE_SRBDS_CTRL))
163+ return;
164+
165+ rdmsrl(MSR_IA32_MCU_OPT_CTRL, mcu_opt_ctrl);
166+
167+ if (mcu_opt_ctrl & RTM_ALLOW) {
168+ mcu_opt_ctrl &= ~RTM_ALLOW;
169+ wrmsrl(MSR_IA32_MCU_OPT_CTRL, mcu_opt_ctrl);
170+ setup_force_cpu_cap(X86_FEATURE_RTM_ALWAYS_ABORT);
100171 }
101172 }
102173
@@ -105,14 +176,14 @@ void __init tsx_init(void) · 2 unmodified lines
105176 char arg[5] = {};
106177 int ret;
107178
179+ tsx_dev_mode_disable();
180+
108181 /*
109− * Hardware will always abort a TSX transaction if both CPUID bits
110− * RTM_ALWAYS_ABORT and TSX_FORCE_ABORT are set. In this case, it is
111− * better not to enumerate CPUID.RTM and CPUID.HLE bits. Clear them
112− * here.
182+ * Hardware will always abort a TSX transaction when the CPUID bit
183+ * RTM_ALWAYS_ABORT is set. In this case, it is better not to enumerate
184+ * CPUID.RTM and CPUID.HLE bits. Clear them here.
113185 */
114− if (boot_cpu_has(X86_FEATURE_RTM_ALWAYS_ABORT) &&
115− boot_cpu_has(X86_FEATURE_TSX_FORCE_ABORT)) {
186+ if (boot_cpu_has(X86_FEATURE_RTM_ALWAYS_ABORT)) {
116187 tsx_ctrl_state = TSX_CTRL_RTM_ALWAYS_ABORT;
117188 tsx_clear_cpuid();
118189 setup_clear_cpu_cap(X86_FEATURE_RTM);
@@ -175,3 +246,16 @@ void __init tsx_init(void) · 56 unmodified lines
175246 setup_force_cpu_cap(X86_FEATURE_HLE);
176247 }
177248 }
249+
250+void tsx_ap_init(void)
251+{
252+ tsx_dev_mode_disable();
253+
254+ if (tsx_ctrl_state == TSX_CTRL_ENABLE)
255+ tsx_enable();
256+ else if (tsx_ctrl_state == TSX_CTRL_DISABLE)
257+ tsx_disable();
258+ else if (tsx_ctrl_state == TSX_CTRL_RTM_ALWAYS_ABORT)
259+ /* See comment over that function for more details. */
260+ tsx_clear_cpuid();
261+}
arch/x86/kernel/crash_dump_64.c+0−1
@@ -37,7 +37,6 @@ static ssize_t __copy_oldmem_page(unsigned long pfn, char *buf, size_t csize, · 36 unmodified lines
3737 } else
3838 memcpy(buf, vaddr + offset, csize);
3939
40− set_iounmap_nonlazy();
4140 iounmap((void __iomem *)vaddr);
4241 return csize;
4342 }
arch/x86/kernel/kvm.c+13−0
@@ -69,6 +69,7 @@ static DEFINE_PER_CPU_DECRYPTED(struct kvm_vcpu_pv_apf_data, apf_reason) __align · 68 unmodified lines
6969 DEFINE_PER_CPU_DECRYPTED(struct kvm_steal_time, steal_time) __aligned(64) __visible;
7070 static int has_steal_clock = 0;
7171
72+static int has_guest_poll = 0;
7273 /*
7374 * No need for any "IO delay" on KVM
7475 */
@@ -706,14 +707,26 @@ static int kvm_cpu_down_prepare(unsigned int cpu) · 631 unmodified lines
706707
707708 static int kvm_suspend(void)
708709 {
710+ u64 val = 0;
711+
709712 kvm_guest_cpu_offline(false);
710713
714+#ifdef CONFIG_ARCH_CPUIDLE_HALTPOLL
715+ if (kvm_para_has_feature(KVM_FEATURE_POLL_CONTROL))
716+ rdmsrl(MSR_KVM_POLL_CONTROL, val);
717+ has_guest_poll = !(val & 1);
718+#endif
711719 return 0;
712720 }
713721
714722 static void kvm_resume(void)
715723 {
716724 kvm_cpu_online(raw_smp_processor_id());
725+
726+#ifdef CONFIG_ARCH_CPUIDLE_HALTPOLL
727+ if (kvm_para_has_feature(KVM_FEATURE_POLL_CONTROL) && has_guest_poll)
728+ wrmsrl(MSR_KVM_POLL_CONTROL, 0);
729+#endif
717730 }
718731
719732 static struct syscore_ops kvm_syscore_ops = {
arch/x86/kernel/unwind_orc.c+4−4
@@ -339,11 +339,11 @@ static bool stack_access_ok(struct unwind_state *state, unsigned long _addr, · 338 unmodified lines
339339 struct stack_info *info = &state->stack_info;
340340 void *addr = (void *)_addr;
341341
342− if (!on_stack(info, addr, len) &&
343− (get_stack_info(addr, state->task, info, &state->stack_mask)))
344− return false;
342+ if (on_stack(info, addr, len))
343+ return true;
345344
346− return true;
345+ return !get_stack_info(addr, state->task, info, &state->stack_mask) &&
346+ on_stack(info, addr, len);
347347 }
348348
349349 static bool deref_stack_reg(struct unwind_state *state, unsigned long addr,
arch/x86/kvm/cpuid.c+14−5
@@ -1085,12 +1085,21 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function) · 1084 unmodified lines
10851085 case 0x80000000:
10861086 entry->eax = min(entry->eax, 0x80000021);
10871087 /*
1088− * Serializing LFENCE is reported in a multitude of ways,
1089− * and NullSegClearsBase is not reported in CPUID on Zen2;
1090− * help userspace by providing the CPUID leaf ourselves.
1088+ * Serializing LFENCE is reported in a multitude of ways, and
1089+ * NullSegClearsBase is not reported in CPUID on Zen2; help
1090+ * userspace by providing the CPUID leaf ourselves.
1091+ *
1092+ * However, only do it if the host has CPUID leaf 0x8000001d.
1093+ * QEMU thinks that it can query the host blindly for that
1094+ * CPUID leaf if KVM reports that it supports 0x8000001d or
1095+ * above. The processor merrily returns values from the
1096+ * highest Intel leaf which QEMU tries to use as the guest's
1097+ * 0x8000001d. Even worse, this can result in an infinite
1098+ * loop if said highest leaf has no subleaves indexed by ECX.
10911099 */
1092− if (static_cpu_has(X86_FEATURE_LFENCE_RDTSC)
1093− || !static_cpu_has_bug(X86_BUG_NULL_SEG))
1100+ if (entry->eax >= 0x8000001d &&
1101+ (static_cpu_has(X86_FEATURE_LFENCE_RDTSC)
1102+ || !static_cpu_has_bug(X86_BUG_NULL_SEG)))
10941103 entry->eax = max(entry->eax, 0x80000021);
10951104 break;
10961105 case 0x80000001:
arch/x86/kvm/hyperv.c+8−32
@@ -1135,11 +1135,13 @@ void kvm_hv_setup_tsc_page(struct kvm *kvm, · 1134 unmodified lines
11351135 BUILD_BUG_ON(sizeof(tsc_seq) != sizeof(hv->tsc_ref.tsc_sequence));
11361136 BUILD_BUG_ON(offsetof(struct ms_hyperv_tsc_page, tsc_sequence) != 0);
11371137
1138+ mutex_lock(&hv->hv_lock);
1139+
11381140 if (hv->hv_tsc_page_status == HV_TSC_PAGE_BROKEN ||
1141+ hv->hv_tsc_page_status == HV_TSC_PAGE_SET ||
11391142 hv->hv_tsc_page_status == HV_TSC_PAGE_UNSET)
1140− return;
1143+ goto out_unlock;
11411144
1142− mutex_lock(&hv->hv_lock);
11431145 if (!(hv->hv_tsc_page & HV_X64_MSR_TSC_REFERENCE_ENABLE))
11441146 goto out_unlock;
11451147
@@ -1201,45 +1203,19 @@ out_unlock: · 55 unmodified lines
12011203 mutex_unlock(&hv->hv_lock);
12021204 }
12031205
1204−void kvm_hv_invalidate_tsc_page(struct kvm *kvm)
1206+void kvm_hv_request_tsc_page_update(struct kvm *kvm)
12051207 {
12061208 struct kvm_hv *hv = to_kvm_hv(kvm);
1207− u64 gfn;
1208− int idx;
1209−
1210− if (hv->hv_tsc_page_status == HV_TSC_PAGE_BROKEN ||
1211− hv->hv_tsc_page_status == HV_TSC_PAGE_UNSET ||
1212− tsc_page_update_unsafe(hv))
1213− return;
12141209
12151210 mutex_lock(&hv->hv_lock);
12161211
1217− if (!(hv->hv_tsc_page & HV_X64_MSR_TSC_REFERENCE_ENABLE))
1218− goto out_unlock;
1219−
1220− /* Preserve HV_TSC_PAGE_GUEST_CHANGED/HV_TSC_PAGE_HOST_CHANGED states */
1221− if (hv->hv_tsc_page_status == HV_TSC_PAGE_SET)
1222− hv->hv_tsc_page_status = HV_TSC_PAGE_UPDATING;
1212+ if (hv->hv_tsc_page_status == HV_TSC_PAGE_SET &&
1213+ !tsc_page_update_unsafe(hv))
1214+ hv->hv_tsc_page_status = HV_TSC_PAGE_HOST_CHANGED;
12231215
1224− gfn = hv->hv_tsc_page >> HV_X64_MSR_TSC_REFERENCE_ADDRESS_SHIFT;
1225−
1226− hv->tsc_ref.tsc_sequence = 0;
1227−
1228− /*
1229− * Take the srcu lock as memslots will be accessed to check the gfn
1230− * cache generation against the memslots generation.
1231− */
1232− idx = srcu_read_lock(&kvm->srcu);
1233− if (kvm_write_guest(kvm, gfn_to_gpa(gfn),
1234− &hv->tsc_ref, sizeof(hv->tsc_ref.tsc_sequence)))
1235− hv->hv_tsc_page_status = HV_TSC_PAGE_BROKEN;
1236− srcu_read_unlock(&kvm->srcu, idx);
1237−
1238−out_unlock:
12391216 mutex_unlock(&hv->hv_lock);
12401217 }
12411218
1242−
12431219 static bool hv_check_msr_access(struct kvm_vcpu_hv *hv_vcpu, u32 msr)
12441220 {
12451221 if (!hv_vcpu->enforce_cpuid)
arch/x86/kvm/hyperv.h+1−1
@@ -137,7 +137,7 @@ void kvm_hv_process_stimers(struct kvm_vcpu *vcpu); · 136 unmodified lines
137137
138138 void kvm_hv_setup_tsc_page(struct kvm *kvm,
139139 struct pvclock_vcpu_time_info *hv_clock);
140−void kvm_hv_invalidate_tsc_page(struct kvm *kvm);
140+void kvm_hv_request_tsc_page_update(struct kvm *kvm);
141141
142142 void kvm_hv_init_vm(struct kvm *kvm);
143143 void kvm_hv_destroy_vm(struct kvm *kvm);
arch/x86/kvm/mmu.h+24−0
@@ -65,6 +65,30 @@ static __always_inline u64 rsvd_bits(int s, int e) · 64 unmodified lines
6565 return ((2ULL << (e - s)) - 1) << s;
6666 }
6767
68+/*
69+ * The number of non-reserved physical address bits irrespective of features
70+ * that repurpose legal bits, e.g. MKTME.
71+ */
72+extern u8 __read_mostly shadow_phys_bits;
73+
74+static inline gfn_t kvm_mmu_max_gfn(void)
75+{
76+ /*
77+ * Note that this uses the host MAXPHYADDR, not the guest's.
78+ * EPT/NPT cannot support GPAs that would exceed host.MAXPHYADDR;
79+ * assuming KVM is running on bare metal, guest accesses beyond
80+ * host.MAXPHYADDR will hit a #PF(RSVD) and never cause a vmexit
81+ * (either EPT Violation/Misconfig or #NPF), and so KVM will never
82+ * install a SPTE for such addresses. If KVM is running as a VM
83+ * itself, on the other hand, it might see a MAXPHYADDR that is less
84+ * than hardware's real MAXPHYADDR. Using the host MAXPHYADDR
85+ * disallows such SPTEs entirely and simplifies the TDP MMU.
86+ */
87+ int max_gpa_bits = likely(tdp_enabled) ? shadow_phys_bits : 52;
88+
89+ return (1ULL << (max_gpa_bits - PAGE_SHIFT)) - 1;
90+}
91+
6892 void kvm_mmu_set_mmio_spte_mask(u64 mmio_value, u64 mmio_mask, u64 access_mask);
6993 void kvm_mmu_set_ept_masks(bool has_ad_bits, bool has_exec_only);
7094
arch/x86/kvm/mmu/mmu.c+66−11
@@ -2804,8 +2804,12 @@ static int host_pfn_mapping_level(struct kvm *kvm, gfn_t gfn, kvm_pfn_t pfn, · 2803 unmodified lines
28042804 const struct kvm_memory_slot *slot)
28052805 {
28062806 unsigned long hva;
2807− pte_t *pte;
2808− int level;
2807+ unsigned long flags;
2808+ int level = PG_LEVEL_4K;
2809+ pgd_t pgd;
2810+ p4d_t p4d;
2811+ pud_t pud;
2812+ pmd_t pmd;
28092813
28102814 if (!PageCompound(pfn_to_page(pfn)) && !kvm_is_zone_device_pfn(pfn))
28112815 return PG_LEVEL_4K;
@@ -2820,10 +2824,43 @@ static int host_pfn_mapping_level(struct kvm *kvm, gfn_t gfn, kvm_pfn_t pfn, · 8 unmodified lines
28202824 */
28212825 hva = __gfn_to_hva_memslot(slot, gfn);
28222826
2823− pte = lookup_address_in_mm(kvm->mm, hva, &level);
2824− if (unlikely(!pte))
2825− return PG_LEVEL_4K;
2827+ /*
2828+ * Lookup the mapping level in the current mm. The information
2829+ * may become stale soon, but it is safe to use as long as
2830+ * 1) mmu_notifier_retry was checked after taking mmu_lock, and
2831+ * 2) mmu_lock is taken now.
2832+ *
2833+ * We still need to disable IRQs to prevent concurrent tear down
2834+ * of page tables.
2835+ */
2836+ local_irq_save(flags);
2837+
2838+ pgd = READ_ONCE(*pgd_offset(kvm->mm, hva));
2839+ if (pgd_none(pgd))
2840+ goto out;
2841+
2842+ p4d = READ_ONCE(*p4d_offset(&pgd, hva));
2843+ if (p4d_none(p4d) || !p4d_present(p4d))
2844+ goto out;
2845+
2846+ pud = READ_ONCE(*pud_offset(&p4d, hva));
2847+ if (pud_none(pud) || !pud_present(pud))
2848+ goto out;
2849+
2850+ if (pud_large(pud)) {
2851+ level = PG_LEVEL_1G;
2852+ goto out;
2853+ }
28262854
2855+ pmd = READ_ONCE(*pmd_offset(&pud, hva));
2856+ if (pmd_none(pmd) || !pmd_present(pmd))
2857+ goto out;
2858+
2859+ if (pmd_large(pmd))
2860+ level = PG_LEVEL_2M;
2861+
2862+out:
2863+ local_irq_restore(flags);
28272864 return level;
28282865 }
28292866
@@ -2992,9 +3029,15 @@ static bool handle_abnormal_pfn(struct kvm_vcpu *vcpu, struct kvm_page_fault *fa · 162 unmodified lines
29923029 /*
29933030 * If MMIO caching is disabled, emulate immediately without
29943031 * touching the shadow page tables as attempting to install an
2995− * MMIO SPTE will just be an expensive nop.
3032+ * MMIO SPTE will just be an expensive nop. Do not cache MMIO
3033+ * whose gfn is greater than host.MAXPHYADDR, any guest that
3034+ * generates such gfns is running nested and is being tricked
3035+ * by L0 userspace (you can observe gfn > L1.MAXPHYADDR if
3036+ * and only if L1's MAXPHYADDR is inaccurate with respect to
3037+ * the hardware's).
29963038 */
2997− if (unlikely(!shadow_mmio_value)) {
3039+ if (unlikely(!shadow_mmio_value) ||
3040+ unlikely(fault->gfn > kvm_mmu_max_gfn())) {
29983041 *ret_val = RET_PF_EMULATE;
29993042 return true;
30003043 }
@@ -6237,12 +6280,24 @@ static int set_nx_huge_pages(const char *val, const struct kernel_param *kp) · 3236 unmodified lines
62376280 return 0;
62386281 }
62396282
6240−int kvm_mmu_module_init(void)
6283+/*
6284+ * nx_huge_pages needs to be resolved to true/false when kvm.ko is loaded, as
6285+ * its default value of -1 is technically undefined behavior for a boolean.
6286+ */
6287+void kvm_mmu_x86_module_init(void)
62416288 {
6242− int ret = -ENOMEM;
6243−
62446289 if (nx_huge_pages == -1)
62456290 __set_nx_huge_pages(get_nx_auto_mode());
6291+}
6292+
6293+/*
6294+ * The bulk of the MMU initialization is deferred until the vendor module is
6295+ * loaded as many of the masks/values may be modified by VMX or SVM, i.e. need
6296+ * to be reset when a potentially different vendor module is loaded.
6297+ */
6298+int kvm_mmu_vendor_module_init(void)
6299+{
6300+ int ret = -ENOMEM;
62466301
62476302 /*
62486303 * MMU roles use union aliasing which is, generally speaking, an
@@ -6290,7 +6345,7 @@ void kvm_mmu_destroy(struct kvm_vcpu *vcpu) · 41 unmodified lines
62906345 mmu_free_memory_caches(vcpu);
62916346 }
62926347
6293−void kvm_mmu_module_exit(void)
6348+void kvm_mmu_vendor_module_exit(void)
62946349 {
62956350 mmu_destroy_caches();
62966351 percpu_counter_destroy(&kvm_total_used_mmu_pages);
arch/x86/kvm/mmu/spte.h+0−6
@@ -201,12 +201,6 @@ static inline bool is_removed_spte(u64 spte) · 200 unmodified lines
201201 */
202202 extern u64 __read_mostly shadow_nonpresent_or_rsvd_lower_gfn_mask;
203203
204−/*
205− * The number of non-reserved physical address bits irrespective of features
206− * that repurpose legal bits, e.g. MKTME.
207− */
208−extern u8 __read_mostly shadow_phys_bits;
209−
210204 static inline bool is_mmio_spte(u64 spte)
211205 {
212206 return (spte & shadow_mmio_mask) == shadow_mmio_value &&
arch/x86/kvm/mmu/tdp_mmu.c+9−8
@@ -51,7 +51,7 @@ void kvm_mmu_uninit_tdp_mmu(struct kvm *kvm) · 50 unmodified lines
5151 if (!kvm->arch.tdp_mmu_enabled)
5252 return;
5353
54− flush_workqueue(kvm->arch.tdp_mmu_zap_wq);
54+ /* Also waits for any queued work items. */
5555 destroy_workqueue(kvm->arch.tdp_mmu_zap_wq);
5656
5757 WARN_ON(!list_empty(&kvm->arch.tdp_mmu_pages));
@@ -815,14 +815,15 @@ static inline bool __must_check tdp_mmu_iter_cond_resched(struct kvm *kvm, · 757 unmodified lines
815815 return iter->yielded;
816816 }
817817
818−static inline gfn_t tdp_mmu_max_gfn_host(void)
818+static inline gfn_t tdp_mmu_max_gfn_exclusive(void)
819819 {
820820 /*
821− * Bound TDP MMU walks at host.MAXPHYADDR, guest accesses beyond that
822− * will hit a #PF(RSVD) and never hit an EPT Violation/Misconfig / #NPF,
823− * and so KVM will never install a SPTE for such addresses.
821+ * Bound TDP MMU walks at host.MAXPHYADDR. KVM disallows memslots with
822+ * a gpa range that would exceed the max gfn, and KVM does not create
823+ * MMIO SPTEs for "impossible" gfns, instead sending such accesses down
824+ * the slow emulation path every time.
824825 */
825− return 1ULL << (shadow_phys_bits - PAGE_SHIFT);
826+ return kvm_mmu_max_gfn() + 1;
826827 }
827828
828829 static void __tdp_mmu_zap_root(struct kvm *kvm, struct kvm_mmu_page *root,
@@ -830,7 +831,7 @@ static void __tdp_mmu_zap_root(struct kvm *kvm, struct kvm_mmu_page *root, · 1 unmodified line
830831 {
831832 struct tdp_iter iter;
832833
833− gfn_t end = tdp_mmu_max_gfn_host();
834+ gfn_t end = tdp_mmu_max_gfn_exclusive();
834835 gfn_t start = 0;
835836
836837 for_each_tdp_pte_min_level(iter, root, zap_level, start, end) {
@@ -923,7 +924,7 @@ static bool tdp_mmu_zap_leafs(struct kvm *kvm, struct kvm_mmu_page *root, · 86 unmodified lines
923924 {
924925 struct tdp_iter iter;
925926
926− end = min(end, tdp_mmu_max_gfn_host());
927+ end = min(end, tdp_mmu_max_gfn_exclusive());
927928
928929 lockdep_assert_held_write(&kvm->mmu_lock);
929930
arch/x86/kvm/pmu.h+9−0
@@ -138,6 +138,15 @@ static inline u64 get_sample_period(struct kvm_pmc *pmc, u64 counter_value) · 137 unmodified lines
138138 return sample_period;
139139 }
140140
141+static inline void pmc_update_sample_period(struct kvm_pmc *pmc)
142+{
143+ if (!pmc->perf_event || pmc->is_paused)
144+ return;
145+
146+ perf_event_period(pmc->perf_event,
147+ get_sample_period(pmc, pmc->counter));
148+}
149+
141150 void reprogram_gp_counter(struct kvm_pmc *pmc, u64 eventsel);
142151 void reprogram_fixed_counter(struct kvm_pmc *pmc, u8 ctrl, int fixed_idx);
143152 void reprogram_counter(struct kvm_pmu *pmu, int pmc_idx);
arch/x86/kvm/svm/avic.c+2−1
@@ -837,7 +837,8 @@ bool avic_check_apicv_inhibit_reasons(enum kvm_apicv_inhibit reason) · 836 unmodified lines
837837 BIT(APICV_INHIBIT_REASON_IRQWIN) |
838838 BIT(APICV_INHIBIT_REASON_PIT_REINJ) |
839839 BIT(APICV_INHIBIT_REASON_X2APIC) |
840− BIT(APICV_INHIBIT_REASON_BLOCKIRQ);
840+ BIT(APICV_INHIBIT_REASON_BLOCKIRQ) |
841+ BIT(APICV_INHIBIT_REASON_SEV);
841842
842843 return supported & BIT(reason);
843844 }
arch/x86/kvm/svm/pmu.c+1−0
@@ -257,6 +257,7 @@ static int amd_pmu_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) · 256 unmodified lines
257257 pmc = get_gp_pmc_amd(pmu, msr, PMU_TYPE_COUNTER);
258258 if (pmc) {
259259 pmc->counter += data - pmc_read_counter(pmc);
260+ pmc_update_sample_period(pmc);
260261 return 0;
261262 }
262263 /* MSR_EVNTSELn */
arch/x86/kvm/svm/sev.c+35−35
@@ -260,6 +260,8 @@ static int sev_guest_init(struct kvm *kvm, struct kvm_sev_cmd *argp) · 259 unmodified lines
260260 INIT_LIST_HEAD(&sev->regions_list);
261261 INIT_LIST_HEAD(&sev->mirror_vms);
262262
263+ kvm_set_apicv_inhibit(kvm, APICV_INHIBIT_REASON_SEV);
264+
263265 return 0;
264266
265267 e_free:
@@ -465,6 +467,7 @@ static void sev_clflush_pages(struct page *pages[], unsigned long npages) · 199 unmodified lines
465467 page_virtual = kmap_atomic(pages[i]);
466468 clflush_cache_range(page_virtual, PAGE_SIZE);
467469 kunmap_atomic(page_virtual);
470+ cond_resched();
468471 }
469472 }
470473
@@ -2223,51 +2226,47 @@ int sev_cpu_init(struct svm_cpu_data *sd) · 1752 unmodified lines
22232226 * Pages used by hardware to hold guest encrypted state must be flushed before
22242227 * returning them to the system.
22252228 */
2226−static void sev_flush_guest_memory(struct vcpu_svm *svm, void *va,
2227− unsigned long len)
2229+static void sev_flush_encrypted_page(struct kvm_vcpu *vcpu, void *va)
22282230 {
2231+ int asid = to_kvm_svm(vcpu->kvm)->sev_info.asid;
2232+
22292233 /*
2230− * If hardware enforced cache coherency for encrypted mappings of the
2231− * same physical page is supported, nothing to do.
2234+ * Note! The address must be a kernel address, as regular page walk
2235+ * checks are performed by VM_PAGE_FLUSH, i.e. operating on a user
2236+ * address is non-deterministic and unsafe. This function deliberately
2237+ * takes a pointer to deter passing in a user address.
22322238 */
2233− if (boot_cpu_has(X86_FEATURE_SME_COHERENT))
2234− return;
2239+ unsigned long addr = (unsigned long)va;
22352240
22362241 /*
2237− * If the VM Page Flush MSR is supported, use it to flush the page
2238− * (using the page virtual address and the guest ASID).
2242+ * If CPU enforced cache coherency for encrypted mappings of the
2243+ * same physical page is supported, use CLFLUSHOPT instead. NOTE: cache
2244+ * flush is still needed in order to work properly with DMA devices.
22392245 */
2240− if (boot_cpu_has(X86_FEATURE_VM_PAGE_FLUSH)) {
2241− struct kvm_sev_info *sev;
2242− unsigned long va_start;
2243− u64 start, stop;
2244−
2245− /* Align start and stop to page boundaries. */
2246− va_start = (unsigned long)va;
2247− start = (u64)va_start & PAGE_MASK;
2248− stop = PAGE_ALIGN((u64)va_start + len);
2249−
2250− if (start < stop) {
2251− sev = &to_kvm_svm(svm->vcpu.kvm)->sev_info;
2246+ if (boot_cpu_has(X86_FEATURE_SME_COHERENT)) {
2247+ clflush_cache_range(va, PAGE_SIZE);
2248+ return;
2249+ }
22522250
2253− while (start < stop) {
2254− wrmsrl(MSR_AMD64_VM_PAGE_FLUSH,
2255− start | sev->asid);
2251+ /*
2252+ * VM Page Flush takes a host virtual address and a guest ASID. Fall
2253+ * back to WBINVD if this faults so as not to make any problems worse
2254+ * by leaving stale encrypted data in the cache.
2255+ */
2256+ if (WARN_ON_ONCE(wrmsrl_safe(MSR_AMD64_VM_PAGE_FLUSH, addr | asid)))
2257+ goto do_wbinvd;
22562258
2257− start += PAGE_SIZE;
2258− }
2259+ return;
22592260
2260− return;
2261− }
2261+do_wbinvd:
2262+ wbinvd_on_all_cpus();
2263+}
22622264
2263− WARN(1, "Address overflow, using WBINVD\n");
2264− }
2265+void sev_guest_memory_reclaimed(struct kvm *kvm)
2266+{
2267+ if (!sev_guest(kvm))
2268+ return;
22652269
2266− /*
2267− * Hardware should always have one of the above features,
2268− * but if not, use WBINVD and issue a warning.
2269− */
2270− WARN_ONCE(1, "Using WBINVD to flush guest memory\n");
22712270 wbinvd_on_all_cpus();
22722271 }
22732272
@@ -2281,7 +2280,8 @@ void sev_free_vcpu(struct kvm_vcpu *vcpu) · 7 unmodified lines
22812280 svm = to_svm(vcpu);
22822281
22832282 if (vcpu->arch.guest_state_protected)
2284− sev_flush_guest_memory(svm, svm->sev_es.vmsa, PAGE_SIZE);
2283+ sev_flush_encrypted_page(vcpu, svm->sev_es.vmsa);
2284+
22852285 __free_page(virt_to_page(svm->sev_es.vmsa));
22862286
22872287 if (svm->sev_es.ghcb_sa_free)
arch/x86/kvm/svm/svm.c+1−0
@@ -4620,6 +4620,7 @@ static struct kvm_x86_ops svm_x86_ops __initdata = { · 4619 unmodified lines
46204620 .mem_enc_ioctl = sev_mem_enc_ioctl,
46214621 .mem_enc_register_region = sev_mem_enc_register_region,
46224622 .mem_enc_unregister_region = sev_mem_enc_unregister_region,
4623+ .guest_memory_reclaimed = sev_guest_memory_reclaimed,
46234624
46244625 .vm_copy_enc_context_from = sev_vm_copy_enc_context_from,
46254626 .vm_move_enc_context_from = sev_vm_move_enc_context_from,
arch/x86/kvm/svm/svm.h+2−0
@@ -609,6 +609,8 @@ int sev_mem_enc_unregister_region(struct kvm *kvm, · 608 unmodified lines
609609 struct kvm_enc_region *range);
610610 int sev_vm_copy_enc_context_from(struct kvm *kvm, unsigned int source_fd);
611611 int sev_vm_move_enc_context_from(struct kvm *kvm, unsigned int source_fd);
612+void sev_guest_memory_reclaimed(struct kvm *kvm);
613+
612614 void pre_sev_run(struct vcpu_svm *svm, int cpu);
613615 void __init sev_set_cpu_caps(void);
614616 void __init sev_hardware_setup(void);
arch/x86/kvm/vmx/nested.c+5−0
@@ -4618,6 +4618,11 @@ void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 vm_exit_reason, · 4617 unmodified lines
46184618 kvm_make_request(KVM_REQ_APIC_PAGE_RELOAD, vcpu);
46194619 }
46204620
4621+ if (vmx->nested.update_vmcs01_apicv_status) {
4622+ vmx->nested.update_vmcs01_apicv_status = false;
4623+ kvm_make_request(KVM_REQ_APICV_UPDATE, vcpu);
4624+ }
4625+
46214626 if ((vm_exit_reason != -1) &&
46224627 (enable_shadow_vmcs || evmptr_is_valid(vmx->nested.hv_evmcs_vmptr)))
46234628 vmx->nested.need_vmcs12_to_shadow_sync = true;
arch/x86/kvm/vmx/pmu_intel.c+2−6
@@ -431,15 +431,11 @@ static int intel_pmu_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) · 430 unmodified lines
431431 !(msr & MSR_PMC_FULL_WIDTH_BIT))
432432 data = (s64)(s32)data;
433433 pmc->counter += data - pmc_read_counter(pmc);
434− if (pmc->perf_event && !pmc->is_paused)
435− perf_event_period(pmc->perf_event,
436− get_sample_period(pmc, data));
434+ pmc_update_sample_period(pmc);
437435 return 0;
438436 } else if ((pmc = get_fixed_pmc(pmu, msr))) {
439437 pmc->counter += data - pmc_read_counter(pmc);
440− if (pmc->perf_event && !pmc->is_paused)
441− perf_event_period(pmc->perf_event,
442− get_sample_period(pmc, data));
438+ pmc_update_sample_period(pmc);
443439 return 0;
444440 } else if ((pmc = get_gp_pmc(pmu, msr, MSR_P6_EVNTSEL0))) {
445441 if (data == pmc->eventsel)
arch/x86/kvm/vmx/vmx.c+5−0
@@ -4174,6 +4174,11 @@ static void vmx_refresh_apicv_exec_ctrl(struct kvm_vcpu *vcpu) · 4173 unmodified lines
41744174 {
41754175 struct vcpu_vmx *vmx = to_vmx(vcpu);
41764176
4177+ if (is_guest_mode(vcpu)) {
4178+ vmx->nested.update_vmcs01_apicv_status = true;
4179+ return;
4180+ }
4181+
41774182 pin_controls_set(vmx, vmx_pin_based_exec_ctrl(vmx));
41784183 if (cpu_has_secondary_exec_ctrls()) {
41794184 if (kvm_vcpu_apicv_active(vcpu))
arch/x86/kvm/vmx/vmx.h+1−0
@@ -183,6 +183,7 @@ struct nested_vmx { · 182 unmodified lines
183183 bool change_vmcs01_virtual_apic_mode;
184184 bool reload_vmcs01_apic_access_page;
185185 bool update_vmcs01_cpu_dirty_logging;
186+ bool update_vmcs01_apicv_status;
186187
187188 /*
188189 * Enlightened VMCS has been enabled. It does not mean that L1 has to
arch/x86/kvm/x86.c+65−30
@@ -2901,7 +2901,7 @@ static void kvm_end_pvclock_update(struct kvm *kvm) · 2900 unmodified lines
29012901
29022902 static void kvm_update_masterclock(struct kvm *kvm)
29032903 {
2904− kvm_hv_invalidate_tsc_page(kvm);
2904+ kvm_hv_request_tsc_page_update(kvm);
29052905 kvm_start_pvclock_update(kvm);
29062906 pvclock_update_vm_gtod_copy(kvm);
29072907 kvm_end_pvclock_update(kvm);
@@ -3113,8 +3113,7 @@ static int kvm_guest_time_update(struct kvm_vcpu *v) · 205 unmodified lines
31133113 offsetof(struct compat_vcpu_info, time));
31143114 if (vcpu->xen.vcpu_time_info_set)
31153115 kvm_setup_pvclock_page(v, &vcpu->xen.vcpu_time_info_cache, 0);
3116− if (!v->vcpu_idx)
3117− kvm_hv_setup_tsc_page(v->kvm, &vcpu->hv_clock);
3116+ kvm_hv_setup_tsc_page(v->kvm, &vcpu->hv_clock);
31183117 return 0;
31193118 }
31203119
@@ -6241,7 +6240,7 @@ static int kvm_vm_ioctl_set_clock(struct kvm *kvm, void __user *argp) · 3120 unmodified lines
62416240 if (data.flags & ~KVM_CLOCK_VALID_FLAGS)
62426241 return -EINVAL;
62436242
6244− kvm_hv_invalidate_tsc_page(kvm);
6243+ kvm_hv_request_tsc_page_update(kvm);
62456244 kvm_start_pvclock_update(kvm);
62466245 pvclock_update_vm_gtod_copy(kvm);
62476246
@@ -8926,7 +8925,7 @@ int kvm_arch_init(void *opaque) · 2678 unmodified lines
89268925 }
89278926 kvm_nr_uret_msrs = 0;
89288927
8929− r = kvm_mmu_module_init();
8928+ r = kvm_mmu_vendor_module_init();
89308929 if (r)
89318930 goto out_free_percpu;
89328931
@@ -8974,7 +8973,7 @@ void kvm_arch_exit(void) · 41 unmodified lines
89748973 cancel_work_sync(&pvclock_gtod_work);
89758974 #endif
89768975 kvm_x86_ops.hardware_enable = NULL;
8977− kvm_mmu_module_exit();
8976+ kvm_mmu_vendor_module_exit();
89788977 free_percpu(user_return_msrs);
89798978 kmem_cache_destroy(x86_emulator_cache);
89808979 #ifdef CONFIG_KVM_XEN
@@ -9112,7 +9111,7 @@ static void kvm_apicv_init(struct kvm *kvm) · 131 unmodified lines
91129111
91139112 if (!enable_apicv)
91149113 set_or_clear_apicv_inhibit(inhibits,
9115− APICV_INHIBIT_REASON_ABSENT, true);
9114+ APICV_INHIBIT_REASON_DISABLE, true);
91169115 }
91179116
91189117 static void kvm_sched_yield(struct kvm_vcpu *vcpu, unsigned long dest_id)
@@ -9890,6 +9889,11 @@ void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm, · 771 unmodified lines
98909889 kvm_make_all_cpus_request(kvm, KVM_REQ_APIC_PAGE_RELOAD);
98919890 }
98929891
9892+void kvm_arch_guest_memory_reclaimed(struct kvm *kvm)
9893+{
9894+ static_call_cond(kvm_x86_guest_memory_reclaimed)(kvm);
9895+}
9896+
98939897 static void kvm_vcpu_reload_apic_access_page(struct kvm_vcpu *vcpu)
98949898 {
98959899 if (!lapic_in_kernel(vcpu))
@@ -10016,12 +10020,14 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) · 120 unmodified lines
1001610020 if (kvm_check_request(KVM_REQ_HV_CRASH, vcpu)) {
1001710021 vcpu->run->exit_reason = KVM_EXIT_SYSTEM_EVENT;
1001810022 vcpu->run->system_event.type = KVM_SYSTEM_EVENT_CRASH;
10023+ vcpu->run->system_event.ndata = 0;
1001910024 r = 0;
1002010025 goto out;
1002110026 }
1002210027 if (kvm_check_request(KVM_REQ_HV_RESET, vcpu)) {
1002310028 vcpu->run->exit_reason = KVM_EXIT_SYSTEM_EVENT;
1002410029 vcpu->run->system_event.type = KVM_SYSTEM_EVENT_RESET;
10030+ vcpu->run->system_event.ndata = 0;
1002510031 r = 0;
1002610032 goto out;
1002710033 }
@@ -10098,7 +10104,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) · 70 unmodified lines
1009810104 /* Store vcpu->apicv_active before vcpu->mode. */
1009910105 smp_store_release(&vcpu->mode, IN_GUEST_MODE);
1010010106
10101− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
10107+ kvm_vcpu_srcu_read_unlock(vcpu);
1010210108
1010310109 /*
1010410110 * 1) We should set ->mode before checking ->requests. Please see
@@ -10129,7 +10135,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) · 24 unmodified lines
1012910135 smp_wmb();
1013010136 local_irq_enable();
1013110137 preempt_enable();
10132− vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
10138+ kvm_vcpu_srcu_read_lock(vcpu);
1013310139 r = 1;
1013410140 goto cancel_injection;
1013510141 }
@@ -10255,7 +10261,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) · 119 unmodified lines
1025510261 local_irq_enable();
1025610262 preempt_enable();
1025710263
10258− vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
10264+ kvm_vcpu_srcu_read_lock(vcpu);
1025910265
1026010266 /*
1026110267 * Profile KVM exit RIPs:
@@ -10285,7 +10291,7 @@ out: · 23 unmodified lines
1028510291 }
1028610292
1028710293 /* Called within kvm->srcu read side. */
10288−static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu)
10294+static inline int vcpu_block(struct kvm_vcpu *vcpu)
1028910295 {
1029010296 bool hv_timer;
1029110297
@@ -10301,12 +10307,12 @@ static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu) · 9 unmodified lines
1030110307 if (hv_timer)
1030210308 kvm_lapic_switch_to_sw_timer(vcpu);
1030310309
10304− srcu_read_unlock(&kvm->srcu, vcpu->srcu_idx);
10310+ kvm_vcpu_srcu_read_unlock(vcpu);
1030510311 if (vcpu->arch.mp_state == KVM_MP_STATE_HALTED)
1030610312 kvm_vcpu_halt(vcpu);
1030710313 else
1030810314 kvm_vcpu_block(vcpu);
10309− vcpu->srcu_idx = srcu_read_lock(&kvm->srcu);
10315+ kvm_vcpu_srcu_read_lock(vcpu);
1031010316
1031110317 if (hv_timer)
1031210318 kvm_lapic_switch_to_hv_timer(vcpu);
@@ -10348,7 +10354,6 @@ static inline bool kvm_vcpu_running(struct kvm_vcpu *vcpu) · 35 unmodified lines
1034810354 static int vcpu_run(struct kvm_vcpu *vcpu)
1034910355 {
1035010356 int r;
10351− struct kvm *kvm = vcpu->kvm;
1035210357
1035310358 vcpu->arch.l1tf_flush_l1d = true;
1035410359
@@ -10356,7 +10361,7 @@ static int vcpu_run(struct kvm_vcpu *vcpu) · 1 unmodified line
1035610361 if (kvm_vcpu_running(vcpu)) {
1035710362 r = vcpu_enter_guest(vcpu);
1035810363 } else {
10359− r = vcpu_block(kvm, vcpu);
10364+ r = vcpu_block(vcpu);
1036010365 }
1036110366
1036210367 if (r <= 0)
@@ -10375,9 +10380,9 @@ static int vcpu_run(struct kvm_vcpu *vcpu) · 12 unmodified lines
1037510380 }
1037610381
1037710382 if (__xfer_to_guest_mode_work_pending()) {
10378− srcu_read_unlock(&kvm->srcu, vcpu->srcu_idx);
10383+ kvm_vcpu_srcu_read_unlock(vcpu);
1037910384 r = xfer_to_guest_mode_handle_work(vcpu);
10380− vcpu->srcu_idx = srcu_read_lock(&kvm->srcu);
10385+ kvm_vcpu_srcu_read_lock(vcpu);
1038110386 if (r)
1038210387 return r;
1038310388 }
@@ -10388,12 +10393,7 @@ static int vcpu_run(struct kvm_vcpu *vcpu) · 4 unmodified lines
1038810393
1038910394 static inline int complete_emulated_io(struct kvm_vcpu *vcpu)
1039010395 {
10391− int r;
10392−
10393− vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
10394− r = kvm_emulate_instruction(vcpu, EMULTYPE_NO_DECODE);
10395− srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
10396− return r;
10396+ return kvm_emulate_instruction(vcpu, EMULTYPE_NO_DECODE);
1039710397 }
1039810398
1039910399 static int complete_emulated_pio(struct kvm_vcpu *vcpu)
@@ -10485,7 +10485,6 @@ static void kvm_put_guest_fpu(struct kvm_vcpu *vcpu) · 85 unmodified lines
1048510485 int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu)
1048610486 {
1048710487 struct kvm_run *kvm_run = vcpu->run;
10488− struct kvm *kvm = vcpu->kvm;
1048910488 int r;
1049010489
1049110490 vcpu_load(vcpu);
@@ -10493,7 +10492,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) · 1 unmodified line
1049310492 kvm_run->flags = 0;
1049410493 kvm_load_guest_fpu(vcpu);
1049510494
10496− vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
10495+ kvm_vcpu_srcu_read_lock(vcpu);
1049710496 if (unlikely(vcpu->arch.mp_state == KVM_MP_STATE_UNINITIALIZED)) {
1049810497 if (kvm_run->immediate_exit) {
1049910498 r = -EINTR;
@@ -10505,9 +10504,9 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) · 5 unmodified lines
1050510504 */
1050610505 WARN_ON_ONCE(kvm_lapic_hv_timer_in_use(vcpu));
1050710506
10508− srcu_read_unlock(&kvm->srcu, vcpu->srcu_idx);
10507+ kvm_vcpu_srcu_read_unlock(vcpu);
1050910508 kvm_vcpu_block(vcpu);
10510− vcpu->srcu_idx = srcu_read_lock(&kvm->srcu);
10509+ kvm_vcpu_srcu_read_lock(vcpu);
1051110510
1051210511 if (kvm_apic_accept_events(vcpu) < 0) {
1051310512 r = 0;
@@ -10568,7 +10567,7 @@ out: · 54 unmodified lines
1056810567 if (kvm_run->kvm_valid_regs)
1056910568 store_regs(vcpu);
1057010569 post_kvm_run_save(vcpu);
10571− srcu_read_unlock(&kvm->srcu, vcpu->srcu_idx);
10570+ kvm_vcpu_srcu_read_unlock(vcpu);
1057210571
1057310572 kvm_sigset_deactivate(vcpu);
1057410573 vcpu_put(vcpu);
@@ -10986,6 +10985,9 @@ static void kvm_arch_vcpu_guestdbg_update_apicv_inhibit(struct kvm *kvm) · 411 unmodified lines
1098610985 struct kvm_vcpu *vcpu;
1098710986 unsigned long i;
1098810987
10988+ if (!enable_apicv)
10989+ return;
10990+
1098910991 down_write(&kvm->arch.apicv_update_lock);
1099010992
1099110993 kvm_for_each_vcpu(i, vcpu, kvm) {
@@ -11197,8 +11199,21 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu) · 205 unmodified lines
1119711199 r = kvm_create_lapic(vcpu, lapic_timer_advance_ns);
1119811200 if (r < 0)
1119911201 goto fail_mmu_destroy;
11200− if (kvm_apicv_activated(vcpu->kvm))
11202+
11203+ /*
11204+ * Defer evaluating inhibits until the vCPU is first run, as
11205+ * this vCPU will not get notified of any changes until this
11206+ * vCPU is visible to other vCPUs (marked online and added to
11207+ * the set of vCPUs). Opportunistically mark APICv active as
11208+ * VMX in particularly is highly unlikely to have inhibits.
11209+ * Ignore the current per-VM APICv state so that vCPU creation
11210+ * is guaranteed to run with a deterministic value, the request
11211+ * will ensure the vCPU gets the correct state before VM-Entry.
11212+ */
11213+ if (enable_apicv) {
1120111214 vcpu->arch.apicv_active = true;
11215+ kvm_make_request(KVM_REQ_APICV_UPDATE, vcpu);
11216+ }
1120211217 } else
1120311218 static_branch_inc(&kvm_has_noapic_vcpu);
1120411219
@@ -11996,8 +12011,12 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm, · 791 unmodified lines
1199612011 struct kvm_memory_slot *new,
1199712012 enum kvm_mr_change change)
1199812013 {
11999− if (change == KVM_MR_CREATE || change == KVM_MR_MOVE)
12014+ if (change == KVM_MR_CREATE || change == KVM_MR_MOVE) {
12015+ if ((new->base_gfn + new->npages - 1) > kvm_mmu_max_gfn())
12016+ return -EINVAL;
12017+
1200012018 return kvm_alloc_memslot_metadata(kvm, new);
12019+ }
1200112020
1200212021 if (change == KVM_MR_FLAGS_ONLY)
1200312022 memcpy(&new->arch, &old->arch, sizeof(old->arch));
@@ -12986,3 +13005,19 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_vmgexit_enter); · 982 unmodified lines
1298613005 EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_vmgexit_exit);
1298713006 EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_vmgexit_msr_protocol_enter);
1298813007 EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_vmgexit_msr_protocol_exit);
13008+
13009+static int __init kvm_x86_init(void)
13010+{
13011+ kvm_mmu_x86_module_init();
13012+ return 0;
13013+}
13014+module_init(kvm_x86_init);
13015+
13016+static void __exit kvm_x86_exit(void)
13017+{
13018+ /*
13019+ * If module_init() is implemented, module_exit() must also be
13020+ * implemented to allow module unload.
13021+ */
13022+}
13023+module_exit(kvm_x86_exit);
arch/x86/lib/copy_user_64.S+52−35
@@ -53,12 +53,12 @@ · 52 unmodified lines
5353 SYM_FUNC_START(copy_user_generic_unrolled)
5454 ASM_STAC
5555 cmpl $8,%edx
56− jb 20f /* less then 8 bytes, go to byte copy loop */
56+ jb .Lcopy_user_short_string_bytes
5757 ALIGN_DESTINATION
5858 movl %edx,%ecx
5959 andl $63,%edx
6060 shrl $6,%ecx
61− jz .L_copy_short_string
61+ jz copy_user_short_string
6262 1: movq (%rsi),%r8
6363 2: movq 1*8(%rsi),%r9
6464 3: movq 2*8(%rsi),%r10
@@ -79,37 +79,11 @@ SYM_FUNC_START(copy_user_generic_unrolled) · 14 unmodified lines
7979 leaq 64(%rdi),%rdi
8080 decl %ecx
8181 jnz 1b
82−.L_copy_short_string:
83− movl %edx,%ecx
84− andl $7,%edx
85− shrl $3,%ecx
86− jz 20f
87−18: movq (%rsi),%r8
88−19: movq %r8,(%rdi)
89− leaq 8(%rsi),%rsi
90− leaq 8(%rdi),%rdi
91− decl %ecx
92− jnz 18b
93−20: andl %edx,%edx
94− jz 23f
95− movl %edx,%ecx
96−21: movb (%rsi),%al
97−22: movb %al,(%rdi)
98− incq %rsi
99− incq %rdi
100− decl %ecx
101− jnz 21b
102−23: xor %eax,%eax
103− ASM_CLAC
104− RET
82+ jmp copy_user_short_string
10583
10684 30: shll $6,%ecx
10785 addl %ecx,%edx
108− jmp 60f
109−40: leal (%rdx,%rcx,8),%edx
110− jmp 60f
111−50: movl %ecx,%edx
112−60: jmp .Lcopy_user_handle_tail /* ecx is zerorest also */
86+ jmp .Lcopy_user_handle_tail
11387
11488 _ASM_EXTABLE_CPY(1b, 30b)
11589 _ASM_EXTABLE_CPY(2b, 30b)
@@ -127,10 +101,6 @@ SYM_FUNC_START(copy_user_generic_unrolled) · 11 unmodified lines
127101 _ASM_EXTABLE_CPY(14b, 30b)
128102 _ASM_EXTABLE_CPY(15b, 30b)
129103 _ASM_EXTABLE_CPY(16b, 30b)
130− _ASM_EXTABLE_CPY(18b, 40b)
131− _ASM_EXTABLE_CPY(19b, 40b)
132− _ASM_EXTABLE_CPY(21b, 50b)
133− _ASM_EXTABLE_CPY(22b, 50b)
134104 SYM_FUNC_END(copy_user_generic_unrolled)
135105 EXPORT_SYMBOL(copy_user_generic_unrolled)
136106
@@ -191,7 +161,7 @@ EXPORT_SYMBOL(copy_user_generic_string) · 54 unmodified lines
191161 SYM_FUNC_START(copy_user_enhanced_fast_string)
192162 ASM_STAC
193163 /* CPUs without FSRM should avoid rep movsb for short copies */
194− ALTERNATIVE "cmpl $64, %edx; jb .L_copy_short_string", "", X86_FEATURE_FSRM
164+ ALTERNATIVE "cmpl $64, %edx; jb copy_user_short_string", "", X86_FEATURE_FSRM
195165 movl %edx,%ecx
196166 1: rep movsb
197167 xorl %eax,%eax
@@ -243,6 +213,53 @@ SYM_CODE_START_LOCAL(.Lcopy_user_handle_tail) · 45 unmodified lines
243213
244214 SYM_CODE_END(.Lcopy_user_handle_tail)
245215
216+/*
217+ * Finish memcpy of less than 64 bytes. #AC should already be set.
218+ *
219+ * Input:
220+ * rdi destination
221+ * rsi source
222+ * rdx count (< 64)
223+ *
224+ * Output:
225+ * eax uncopied bytes or 0 if successful.
226+ */
227+SYM_CODE_START_LOCAL(copy_user_short_string)
228+ movl %edx,%ecx
229+ andl $7,%edx
230+ shrl $3,%ecx
231+ jz .Lcopy_user_short_string_bytes
232+18: movq (%rsi),%r8
233+19: movq %r8,(%rdi)
234+ leaq 8(%rsi),%rsi
235+ leaq 8(%rdi),%rdi
236+ decl %ecx
237+ jnz 18b
238+.Lcopy_user_short_string_bytes:
239+ andl %edx,%edx
240+ jz 23f
241+ movl %edx,%ecx
242+21: movb (%rsi),%al
243+22: movb %al,(%rdi)
244+ incq %rsi
245+ incq %rdi
246+ decl %ecx
247+ jnz 21b
248+23: xor %eax,%eax
249+ ASM_CLAC
250+ RET
251+
252+40: leal (%rdx,%rcx,8),%edx
253+ jmp 60f
254+50: movl %ecx,%edx /* ecx is zerorest also */
255+60: jmp .Lcopy_user_handle_tail
256+
257+ _ASM_EXTABLE_CPY(18b, 40b)
258+ _ASM_EXTABLE_CPY(19b, 40b)
259+ _ASM_EXTABLE_CPY(21b, 50b)
260+ _ASM_EXTABLE_CPY(22b, 50b)
261+SYM_CODE_END(copy_user_short_string)
262+
246263 /*
247264 * copy_user_nocache - Uncached memory copy with exception handling
248265 * This will force destination out of cache for more performance.
arch/x86/lib/putuser.S+4−0
@@ -48,6 +48,7 @@ SYM_FUNC_START(__put_user_1) · 47 unmodified lines
4848 cmp %_ASM_BX,%_ASM_CX
4949 jae .Lbad_put_user
5050 SYM_INNER_LABEL(__put_user_nocheck_1, SYM_L_GLOBAL)
51+ ENDBR
5152 ASM_STAC
5253 1: movb %al,(%_ASM_CX)
5354 xor %ecx,%ecx
@@ -62,6 +63,7 @@ SYM_FUNC_START(__put_user_2) · 8 unmodified lines
6263 cmp %_ASM_BX,%_ASM_CX
6364 jae .Lbad_put_user
6465 SYM_INNER_LABEL(__put_user_nocheck_2, SYM_L_GLOBAL)
66+ ENDBR
6567 ASM_STAC
6668 2: movw %ax,(%_ASM_CX)
6769 xor %ecx,%ecx
@@ -76,6 +78,7 @@ SYM_FUNC_START(__put_user_4) · 8 unmodified lines
7678 cmp %_ASM_BX,%_ASM_CX
7779 jae .Lbad_put_user
7880 SYM_INNER_LABEL(__put_user_nocheck_4, SYM_L_GLOBAL)
81+ ENDBR
7982 ASM_STAC
8083 3: movl %eax,(%_ASM_CX)
8184 xor %ecx,%ecx
@@ -90,6 +93,7 @@ SYM_FUNC_START(__put_user_8) · 8 unmodified lines
9093 cmp %_ASM_BX,%_ASM_CX
9194 jae .Lbad_put_user
9295 SYM_INNER_LABEL(__put_user_nocheck_8, SYM_L_GLOBAL)
96+ ENDBR
9397 ASM_STAC
9498 4: mov %_ASM_AX,(%_ASM_CX)
9599 #ifdef CONFIG_X86_32
arch/x86/lib/retpoline.S+1−1
@@ -31,6 +31,7 @@ · 30 unmodified lines
3131 .align RETPOLINE_THUNK_SIZE
3232 SYM_INNER_LABEL(__x86_indirect_thunk_\reg, SYM_L_GLOBAL)
3333 UNWIND_HINT_EMPTY
34+ ANNOTATE_NOENDBR
3435
3536 ALTERNATIVE_2 __stringify(ANNOTATE_RETPOLINE_SAFE; jmp *%\reg), \
3637 __stringify(RETPOLINE \reg), X86_FEATURE_RETPOLINE, \
@@ -55,7 +56,6 @@ SYM_INNER_LABEL(__x86_indirect_thunk_\reg, SYM_L_GLOBAL) · 18 unmodified lines
5556
5657 .align RETPOLINE_THUNK_SIZE
5758 SYM_CODE_START(__x86_indirect_thunk_array)
58− ANNOTATE_NOENDBR // apply_retpolines
5959
6060 #define GEN(reg) THUNK reg
6161 #include <asm/GEN-for-each-reg.h>
arch/x86/lib/usercopy_64.c+1−1
@@ -119,7 +119,7 @@ void __memcpy_flushcache(void *_dst, const void *_src, size_t size) · 118 unmodified lines
119119
120120 /* cache copy and flush to align dest */
121121 if (!IS_ALIGNED(dest, 8)) {
122− unsigned len = min_t(unsigned, size, ALIGN(dest, 8) - dest);
122+ size_t len = min_t(size_t, size, ALIGN(dest, 8) - dest);
123123
124124 memcpy((void *) dest, (void *) source, len);
125125 clean_cache_range((void *) dest, len);
arch/x86/mm/pat/set_memory.c+0−11
@@ -638,17 +638,6 @@ pte_t *lookup_address(unsigned long address, unsigned int *level) · 637 unmodified lines
638638 }
639639 EXPORT_SYMBOL_GPL(lookup_address);
640640
641−/*
642− * Lookup the page table entry for a virtual address in a given mm. Return a
643− * pointer to the entry and the level of the mapping.
644− */
645−pte_t *lookup_address_in_mm(struct mm_struct *mm, unsigned long address,
646− unsigned int *level)
647−{
648− return lookup_address_in_pgd(pgd_offset(mm, address), address, level);
649−}
650−EXPORT_SYMBOL_GPL(lookup_address_in_mm);
651−
652641 static pte_t *_lookup_address_cpa(struct cpa_data *cpa, unsigned long address,
653642 unsigned int *level)
654643 {
arch/x86/pci/xen.c+5−1
@@ -467,7 +467,6 @@ static __init void xen_setup_pci_msi(void) · 466 unmodified lines
467467 else
468468 xen_msi_ops.setup_msi_irqs = xen_setup_msi_irqs;
469469 xen_msi_ops.teardown_msi_irqs = xen_pv_teardown_msi_irqs;
470− pci_msi_ignore_mask = 1;
471470 } else if (xen_hvm_domain()) {
472471 xen_msi_ops.setup_msi_irqs = xen_hvm_setup_msi_irqs;
473472 xen_msi_ops.teardown_msi_irqs = xen_teardown_msi_irqs;
@@ -481,6 +480,11 @@ static __init void xen_setup_pci_msi(void) · 7 unmodified lines
481480 * in allocating the native domain and never use it.
482481 */
483482 x86_init.irqs.create_pci_msi_domain = xen_create_pci_msi_domain;
483+ /*
484+ * With XEN PIRQ/Eventchannels in use PCI/MSI[-X] masking is solely
485+ * controlled by the hypervisor.
486+ */
487+ pci_msi_ignore_mask = 1;
484488 }
485489
486490 #else /* CONFIG_PCI_MSI */
arch/x86/platform/pvh/head.S+1−0
@@ -50,6 +50,7 @@ · 49 unmodified lines
5050 #define PVH_DS_SEL (PVH_GDT_ENTRY_DS * 8)
5151
5252 SYM_CODE_START_LOCAL(pvh_start_xen)
53+ UNWIND_HINT_EMPTY
5354 cld
5455
5556 lgdt (_pa(gdt))
arch/x86/power/cpu.c+9−1
@@ -25,6 +25,7 @@ · 24 unmodified lines
2525 #include <asm/cpu.h>
2626 #include <asm/mmu_context.h>
2727 #include <asm/cpu_device_id.h>
28+#include <asm/microcode.h>
2829
2930 #ifdef CONFIG_X86_32
3031 __visible unsigned long saved_context_ebx;
@@ -262,11 +263,18 @@ static void notrace __restore_processor_state(struct saved_context *ctxt) · 231 unmodified lines
262263 x86_platform.restore_sched_clock_state();
263264 mtrr_bp_restore();
264265 perf_restore_debug_store();
265− msr_restore_context(ctxt);
266266
267267 c = &cpu_data(smp_processor_id());
268268 if (cpu_has(c, X86_FEATURE_MSR_IA32_FEAT_CTL))
269269 init_ia32_feat_ctl(c);
270+
271+ microcode_bsp_resume();
272+
273+ /*
274+ * This needs to happen after the microcode has been updated upon resume
275+ * because some of the MSRs are "emulated" in microcode.
276+ */
277+ msr_restore_context(ctxt);
270278 }
271279
272280 /* Needed by apm.c */
arch/x86/xen/xen-head.S+1−0
@@ -45,6 +45,7 @@ SYM_CODE_END(hypercall_page) · 44 unmodified lines
4545 __INIT
4646 SYM_CODE_START(startup_xen)
4747 UNWIND_HINT_EMPTY
48+ ANNOTATE_NOENDBR
4849 cld
4950
5051 /* Clear .bss */
arch/xtensa/kernel/coprocessor.S+2−2
@@ -29,7 +29,7 @@ · 28 unmodified lines
2929 .if XTENSA_HAVE_COPROCESSOR(x); \
3030 .align 4; \
3131 .Lsave_cp_regs_cp##x: \
32− xchal_cp##x##_store a2 a4 a5 a6 a7; \
32+ xchal_cp##x##_store a2 a3 a4 a5 a6; \
3333 jx a0; \
3434 .endif
3535
@@ -46,7 +46,7 @@ · 10 unmodified lines
4646 .if XTENSA_HAVE_COPROCESSOR(x); \
4747 .align 4; \
4848 .Lload_cp_regs_cp##x: \
49− xchal_cp##x##_load a2 a4 a5 a6 a7; \
49+ xchal_cp##x##_load a2 a3 a4 a5 a6; \
5050 jx a0; \
5151 .endif
5252
arch/xtensa/kernel/jump_label.c+1−1
@@ -40,7 +40,7 @@ static int patch_text_stop_machine(void *data) · 39 unmodified lines
4040 {
4141 struct patch *patch = data;
4242
43− if (atomic_inc_return(&patch->cpu_count) == 1) {
43+ if (atomic_inc_return(&patch->cpu_count) == num_online_cpus()) {
4444 local_patch_text(patch->addr, patch->data, patch->sz);
4545 atomic_inc(&patch->cpu_count);
4646 } else {
arch/xtensa/platforms/iss/console.c+0−8
@@ -36,24 +36,19 @@ static void rs_poll(struct timer_list *); · 35 unmodified lines
3636 static struct tty_driver *serial_driver;
3737 static struct tty_port serial_port;
3838 static DEFINE_TIMER(serial_timer, rs_poll);
39−static DEFINE_SPINLOCK(timer_lock);
4039
4140 static int rs_open(struct tty_struct *tty, struct file * filp)
4241 {
43− spin_lock_bh(&timer_lock);
4442 if (tty->count == 1)
4543 mod_timer(&serial_timer, jiffies + SERIAL_TIMER_VALUE);
46− spin_unlock_bh(&timer_lock);
4744
4845 return 0;
4946 }
5047
5148 static void rs_close(struct tty_struct *tty, struct file * filp)
5249 {
53− spin_lock_bh(&timer_lock);
5450 if (tty->count == 1)
5551 del_timer_sync(&serial_timer);
56− spin_unlock_bh(&timer_lock);
5752 }
5853
5954
@@ -73,8 +68,6 @@ static void rs_poll(struct timer_list *unused) · 13 unmodified lines
7368 int rd = 1;
7469 unsigned char c;
7570
76− spin_lock(&timer_lock);
77−
7871 while (simc_poll(0)) {
7972 rd = simc_read(0, &c, 1);
8073 if (rd <= 0)
@@ -87,7 +80,6 @@ static void rs_poll(struct timer_list *unused) · 6 unmodified lines
8780 tty_flip_buffer_push(port);
8881 if (rd)
8982 mod_timer(&serial_timer, jiffies + SERIAL_TIMER_VALUE);
90− spin_unlock(&timer_lock);
9183 }
9284
9385
block/bfq-iosched.c+9−3
@@ -569,7 +569,7 @@ static bool bfqq_request_over_limit(struct bfq_queue *bfqq, int limit) · 568 unmodified lines
569569 struct bfq_entity *entity = &bfqq->entity;
570570 struct bfq_entity *inline_entities[BFQ_LIMIT_INLINE_DEPTH];
571571 struct bfq_entity **entities = inline_entities;
572− int depth, level;
572+ int depth, level, alloc_depth = BFQ_LIMIT_INLINE_DEPTH;
573573 int class_idx = bfqq->ioprio_class - 1;
574574 struct bfq_sched_data *sched_data;
575575 unsigned long wsum;
@@ -578,15 +578,21 @@ static bool bfqq_request_over_limit(struct bfq_queue *bfqq, int limit) · 2 unmodified lines
578578 if (!entity->on_st_or_in_serv)
579579 return false;
580580
581+retry:
582+ spin_lock_irq(&bfqd->lock);
581583 /* +1 for bfqq entity, root cgroup not included */
582584 depth = bfqg_to_blkg(bfqq_group(bfqq))->blkcg->css.cgroup->level + 1;
583− if (depth > BFQ_LIMIT_INLINE_DEPTH) {
585+ if (depth > alloc_depth) {
586+ spin_unlock_irq(&bfqd->lock);
587+ if (entities != inline_entities)
588+ kfree(entities);
584589 entities = kmalloc_array(depth, sizeof(*entities), GFP_NOIO);
585590 if (!entities)
586591 return false;
592+ alloc_depth = depth;
593+ goto retry;
587594 }
588595
589− spin_lock_irq(&bfqd->lock);
590596 sched_data = entity->sched_data;
591597 /* Gather our ancestors as we need to traverse them in reverse order */
592598 level = 0;
block/bio.c+1−1
@@ -1598,7 +1598,7 @@ EXPORT_SYMBOL(bio_split); · 1597 unmodified lines
15981598 void bio_trim(struct bio *bio, sector_t offset, sector_t size)
15991599 {
16001600 if (WARN_ON_ONCE(offset > BIO_MAX_SECTORS || size > BIO_MAX_SECTORS ||
1601− offset + size > bio->bi_iter.bi_size))
1601+ offset + size > bio_sectors(bio)))
16021602 return;
16031603
16041604 size <<= 9;
block/blk-iocost.c+11−1
@@ -2322,7 +2322,17 @@ static void ioc_timer_fn(struct timer_list *timer) · 2321 unmodified lines
23222322 iocg->hweight_donating = hwa;
23232323 iocg->hweight_after_donation = new_hwi;
23242324 list_add(&iocg->surplus_list, &surpluses);
2325− } else {
2325+ } else if (!iocg->abs_vdebt) {
2326+ /*
2327+ * @iocg doesn't have enough to donate. Reset
2328+ * its inuse to active.
2329+ *
2330+ * Don't reset debtors as their inuse's are
2331+ * owned by debt handling. This shouldn't affect
2332+ * donation calculuation in any meaningful way
2333+ * as @iocg doesn't have a meaningful amount of
2334+ * share anyway.
2335+ */
23262336 TRACE_IOCG_PATH(inuse_shortage, iocg, &now,
23272337 iocg->inuse, iocg->active,
23282338 iocg->hweight_inuse, new_hwi);
block/blk-mq.c+3−9
@@ -794,7 +794,8 @@ bool blk_update_request(struct request *req, blk_status_t error, · 793 unmodified lines
794794 #endif
795795
796796 if (unlikely(error && !blk_rq_is_passthrough(req) &&
797− !(req->rq_flags & RQF_QUIET))) {
797+ !(req->rq_flags & RQF_QUIET)) &&
798+ !test_bit(GD_DEAD, &req->q->disk->state)) {
798799 blk_print_req_error(req, error);
799800 trace_block_rq_error(req, error, nr_bytes);
800801 }
@@ -1130,14 +1131,7 @@ void blk_mq_start_request(struct request *rq) · 329 unmodified lines
11301131 trace_block_rq_issue(rq);
11311132
11321133 if (test_bit(QUEUE_FLAG_STATS, &q->queue_flags)) {
1133− u64 start_time;
1134−#ifdef CONFIG_BLK_CGROUP
1135− if (rq->bio)
1136− start_time = bio_issue_time(&rq->bio->bi_issue);
1137− else
1138−#endif
1139− start_time = ktime_get_ns();
1140− rq->io_start_time_ns = start_time;
1134+ rq->io_start_time_ns = ktime_get_ns();
11411135 rq->stats_sectors = blk_rq_sectors(rq);
11421136 rq->rq_flags |= RQF_STATS;
11431137 rq_qos_issue(q, rq);
block/ioctl.c+1−1
@@ -629,7 +629,7 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg) · 628 unmodified lines
629629 return compat_put_long(argp,
630630 (bdev->bd_disk->bdi->ra_pages * PAGE_SIZE) / 512);
631631 case BLKGETSIZE:
632− if (bdev_nr_sectors(bdev) > ~0UL)
632+ if (bdev_nr_sectors(bdev) > ~(compat_ulong_t)0)
633633 return -EFBIG;
634634 return compat_put_ulong(argp, bdev_nr_sectors(bdev));
635635
drivers/acpi/processor_idle.c+2−6
@@ -96,11 +96,6 @@ static const struct dmi_system_id processor_power_dmi_table[] = { · 95 unmodified lines
9696 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
9797 DMI_MATCH(DMI_PRODUCT_NAME,"L8400B series Notebook PC")},
9898 (void *)1},
99− /* T40 can not handle C3 idle state */
100− { set_max_cstate, "IBM ThinkPad T40", {
101− DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
102− DMI_MATCH(DMI_PRODUCT_NAME, "23737CU")},
103− (void *)2},
10499 {},
105100 };
106101
@@ -795,7 +790,8 @@ static int acpi_processor_setup_cstates(struct acpi_processor *pr) · 688 unmodified lines
795790 if (cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 ||
796791 cx->type == ACPI_STATE_C3) {
797792 state->enter_dead = acpi_idle_play_dead;
798− drv->safe_state_index = count;
793+ if (cx->type != ACPI_STATE_C3)
794+ drv->safe_state_index = count;
799795 }
800796 /*
801797 * Halt-induced C1 is not good for ->enter_s2idle, because it
drivers/android/binder.c+9−1
@@ -2295,6 +2295,7 @@ static int binder_do_deferred_txn_copies(struct binder_alloc *alloc, · 2294 unmodified lines
22952295 {
22962296 int ret = 0;
22972297 struct binder_sg_copy *sgc, *tmpsgc;
2298+ struct binder_ptr_fixup *tmppf;
22982299 struct binder_ptr_fixup *pf =
22992300 list_first_entry_or_null(pf_head, struct binder_ptr_fixup,
23002301 node);
@@ -2349,7 +2350,11 @@ static int binder_do_deferred_txn_copies(struct binder_alloc *alloc, · 48 unmodified lines
23492350 list_del(&sgc->node);
23502351 kfree(sgc);
23512352 }
2352− BUG_ON(!list_empty(pf_head));
2353+ list_for_each_entry_safe(pf, tmppf, pf_head, node) {
2354+ BUG_ON(pf->skip_size == 0);
2355+ list_del(&pf->node);
2356+ kfree(pf);
2357+ }
23532358 BUG_ON(!list_empty(sgc_head));
23542359
23552360 return ret > 0 ? -EINVAL : ret;
@@ -2486,6 +2491,9 @@ static int binder_translate_fd_array(struct list_head *pf_head, · 130 unmodified lines
24862491 struct binder_proc *proc = thread->proc;
24872492 int ret;
24882493
2494+ if (fda->num_fds == 0)
2495+ return 0;
2496+
24892497 fd_buf_size = sizeof(u32) * fda->num_fds;
24902498 if (fda->num_fds >= SIZE_MAX / sizeof(u32)) {
24912499 binder_user_error("%d:%d got transaction with invalid number of fds (%lld)\n",
drivers/ata/pata_marvell.c+2−0
@@ -77,6 +77,8 @@ static int marvell_cable_detect(struct ata_port *ap) · 76 unmodified lines
7777 switch(ap->port_no)
7878 {
7979 case 0:
80+ if (!ap->ioaddr.bmdma_addr)
81+ return ATA_CBL_PATA_UNK;
8082 if (ioread8(ap->ioaddr.bmdma_addr + 1) & 1)
8183 return ATA_CBL_PATA40;
8284 return ATA_CBL_PATA80;
drivers/base/arch_topology.c+10−1
@@ -667,6 +667,15 @@ const struct cpumask *cpu_coregroup_mask(int cpu) · 666 unmodified lines
667667 core_mask = &cpu_topology[cpu].llc_sibling;
668668 }
669669
670+ /*
671+ * For systems with no shared cpu-side LLC but with clusters defined,
672+ * extend core_mask to cluster_siblings. The sched domain builder will
673+ * then remove MC as redundant with CLS if SCHED_CLUSTER is enabled.
674+ */
675+ if (IS_ENABLED(CONFIG_SCHED_CLUSTER) &&
676+ cpumask_subset(core_mask, &cpu_topology[cpu].cluster_sibling))
677+ core_mask = &cpu_topology[cpu].cluster_sibling;
678+
670679 return core_mask;
671680 }
672681
@@ -684,7 +693,7 @@ void update_siblings_masks(unsigned int cpuid) · 11 unmodified lines
684693 for_each_online_cpu(cpu) {
685694 cpu_topo = &cpu_topology[cpu];
686695
687− if (cpuid_topo->llc_id == cpu_topo->llc_id) {
696+ if (cpu_topo->llc_id != -1 && cpuid_topo->llc_id == cpu_topo->llc_id) {
688697 cpumask_set_cpu(cpu, &cpuid_topo->llc_sibling);
689698 cpumask_set_cpu(cpuid, &cpu_topo->llc_sibling);
690699 }
drivers/base/dd.c+1−0
@@ -296,6 +296,7 @@ int driver_deferred_probe_check_state(struct device *dev) · 295 unmodified lines
296296
297297 return -EPROBE_DEFER;
298298 }
299+EXPORT_SYMBOL_GPL(driver_deferred_probe_check_state);
299300
300301 static void deferred_probe_timeout_work_func(struct work_struct *work)
301302 {
drivers/base/topology.c+10−0
@@ -152,9 +152,19 @@ static struct attribute *default_attrs[] = { · 151 unmodified lines
152152 NULL
153153 };
154154
155+static umode_t topology_is_visible(struct kobject *kobj,
156+ struct attribute *attr, int unused)
157+{
158+ if (attr == &dev_attr_ppin.attr && !topology_ppin(kobj_to_dev(kobj)->id))
159+ return 0;
160+
161+ return attr->mode;
162+}
163+
155164 static const struct attribute_group topology_attr_group = {
156165 .attrs = default_attrs,
157166 .bin_attrs = bin_attrs,
167+ .is_visible = topology_is_visible,
158168 .name = "topology"
159169 };
160170
drivers/block/Kconfig+16−0
@@ -33,6 +33,22 @@ config BLK_DEV_FD · 32 unmodified lines
3333 To compile this driver as a module, choose M here: the
3434 module will be called floppy.
3535
36+config BLK_DEV_FD_RAWCMD
37+ bool "Support for raw floppy disk commands (DEPRECATED)"
38+ depends on BLK_DEV_FD
39+ help
40+ If you want to use actual physical floppies and expect to do
41+ special low-level hardware accesses to them (access and use
42+ non-standard formats, for example), then enable this.
43+
44+ Note that the code enabled by this option is rarely used and
45+ might be unstable or insecure, and distros should not enable it.
46+
47+ Note: FDRAWCMD is deprecated and will be removed from the kernel
48+ in the near future.
49+
50+ If unsure, say N.
51+
3652 config AMIGA_FLOPPY
3753 tristate "Amiga floppy support"
3854 depends on AMIGA
drivers/block/floppy.c+32−11
@@ -2982,6 +2982,8 @@ static const char *drive_name(int type, int drive) · 2981 unmodified lines
29822982 return "(null)";
29832983 }
29842984
2985+#ifdef CONFIG_BLK_DEV_FD_RAWCMD
2986+
29852987 /* raw commands */
29862988 static void raw_cmd_done(int flag)
29872989 {
@@ -3181,6 +3183,35 @@ static int raw_cmd_ioctl(int cmd, void __user *param) · 193 unmodified lines
31813183 return ret;
31823184 }
31833185
3186+static int floppy_raw_cmd_ioctl(int type, int drive, int cmd,
3187+ void __user *param)
3188+{
3189+ int ret;
3190+
3191+ pr_warn_once("Note: FDRAWCMD is deprecated and will be removed from the kernel in the near future.\n");
3192+
3193+ if (type)
3194+ return -EINVAL;
3195+ if (lock_fdc(drive))
3196+ return -EINTR;
3197+ set_floppy(drive);
3198+ ret = raw_cmd_ioctl(cmd, param);
3199+ if (ret == -EINTR)
3200+ return -EINTR;
3201+ process_fd_request();
3202+ return ret;
3203+}
3204+
3205+#else /* CONFIG_BLK_DEV_FD_RAWCMD */
3206+
3207+static int floppy_raw_cmd_ioctl(int type, int drive, int cmd,
3208+ void __user *param)
3209+{
3210+ return -EOPNOTSUPP;
3211+}
3212+
3213+#endif
3214+
31843215 static int invalidate_drive(struct block_device *bdev)
31853216 {
31863217 /* invalidate the buffer track to force a reread */
@@ -3369,7 +3400,6 @@ static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int · 182 unmodified lines
33693400 {
33703401 int drive = (long)bdev->bd_disk->private_data;
33713402 int type = ITYPE(drive_state[drive].fd_device);
3372− int i;
33733403 int ret;
33743404 int size;
33753405 union inparam {
@@ -3520,16 +3550,7 @@ static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int · 144 unmodified lines
35203550 outparam = &write_errors[drive];
35213551 break;
35223552 case FDRAWCMD:
3523− if (type)
3524− return -EINVAL;
3525− if (lock_fdc(drive))
3526− return -EINTR;
3527− set_floppy(drive);
3528− i = raw_cmd_ioctl(cmd, (void __user *)param);
3529− if (i == -EINTR)
3530− return -EINTR;
3531− process_fd_request();
3532− return i;
3553+ return floppy_raw_cmd_ioctl(type, drive, cmd, (void __user *)param);
35333554 case FDTWADDLE:
35343555 if (lock_fdc(drive))
35353556 return -EINTR;
drivers/block/null_blk/main.c+1−1
@@ -1600,7 +1600,7 @@ static enum blk_eh_timer_return null_timeout_rq(struct request *rq, bool res) · 1599 unmodified lines
16001600 * Only fake timeouts need to execute blk_mq_complete_request() here.
16011601 */
16021602 cmd->error = BLK_STS_TIMEOUT;
1603− if (cmd->fake_timeout)
1603+ if (cmd->fake_timeout || hctx->type == HCTX_TYPE_POLL)
16041604 blk_mq_complete_request(rq);
16051605 return BLK_EH_DONE;
16061606 }
drivers/bus/fsl-mc/fsl-mc-msi.c+5−1
@@ -224,8 +224,12 @@ int fsl_mc_msi_domain_alloc_irqs(struct device *dev, unsigned int irq_count) · 223 unmodified lines
224224 if (error)
225225 return error;
226226
227+ msi_lock_descs(dev);
227228 if (msi_first_desc(dev, MSI_DESC_ALL))
228− return -EINVAL;
229+ error = -EINVAL;
230+ msi_unlock_descs(dev);
231+ if (error)
232+ return error;
229233
230234 /*
231235 * NOTE: Calling this function will trigger the invocation of the
drivers/bus/imx-weim.c+2−3
@@ -352,8 +352,7 @@ static int of_weim_notify(struct notifier_block *nb, unsigned long action, · 351 unmodified lines
352352
353353 pdev = of_find_device_by_node(rd->dn);
354354 if (!pdev) {
355− dev_err(&pdev->dev,
356− "Could not find platform device for '%pOF'\n",
355+ pr_err("Could not find platform device for '%pOF'\n",
357356 rd->dn);
358357
359358 ret = notifier_from_errno(-EINVAL);
@@ -370,7 +369,7 @@ static int of_weim_notify(struct notifier_block *nb, unsigned long action, · 10 unmodified lines
370369 return ret;
371370 }
372371
373−struct notifier_block weim_of_notifier = {
372+static struct notifier_block weim_of_notifier = {
374373 .notifier_call = of_weim_notify,
375374 };
376375 #endif /* IS_ENABLED(CONFIG_OF_DYNAMIC) */
drivers/bus/mhi/host/pci_generic.c+2−0
@@ -1060,6 +1060,7 @@ static int __maybe_unused mhi_pci_freeze(struct device *dev) · 1059 unmodified lines
10601060 * the intermediate restore kernel reinitializes MHI device with new
10611061 * context.
10621062 */
1063+ flush_work(&mhi_pdev->recovery_work);
10631064 if (test_and_clear_bit(MHI_PCI_DEV_STARTED, &mhi_pdev->status)) {
10641065 mhi_power_down(mhi_cntrl, true);
10651066 mhi_unprepare_after_power_down(mhi_cntrl);
@@ -1085,6 +1086,7 @@ static const struct dev_pm_ops mhi_pci_pm_ops = { · 19 unmodified lines
10851086 .resume = mhi_pci_resume,
10861087 .freeze = mhi_pci_freeze,
10871088 .thaw = mhi_pci_restore,
1089+ .poweroff = mhi_pci_freeze,
10881090 .restore = mhi_pci_restore,
10891091 #endif
10901092 };
drivers/bus/sunxi-rsb.c+2−0
@@ -227,6 +227,8 @@ static struct sunxi_rsb_device *sunxi_rsb_device_create(struct sunxi_rsb *rsb, · 226 unmodified lines
227227
228228 dev_dbg(&rdev->dev, "device %s registered\n", dev_name(&rdev->dev));
229229
230+ return rdev;
231+
230232 err_device_add:
231233 put_device(&rdev->dev);
232234
drivers/bus/ti-sysc.c+15−1
@@ -3232,13 +3232,27 @@ static int sysc_check_disabled_devices(struct sysc *ddata) · 3231 unmodified lines
32323232 */
32333233 static int sysc_check_active_timer(struct sysc *ddata)
32343234 {
3235+ int error;
3236+
32353237 if (ddata->cap->type != TI_SYSC_OMAP2_TIMER &&
32363238 ddata->cap->type != TI_SYSC_OMAP4_TIMER)
32373239 return 0;
32383240
3241+ /*
3242+ * Quirk for omap3 beagleboard revision A to B4 to use gpt12.
3243+ * Revision C and later are fixed with commit 23885389dbbb ("ARM:
3244+ * dts: Fix timer regression for beagleboard revision c"). This all
3245+ * can be dropped if we stop supporting old beagleboard revisions
3246+ * A to B4 at some point.
3247+ */
3248+ if (sysc_soc->soc == SOC_3430)
3249+ error = -ENXIO;
3250+ else
3251+ error = -EBUSY;
3252+
32393253 if ((ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT) &&
32403254 (ddata->cfg.quirks & SYSC_QUIRK_NO_IDLE))
3241− return -ENXIO;
3255+ return error;
32423256
32433257 return 0;
32443258 }
drivers/char/random.c+26−23
@@ -318,6 +318,13 @@ static void crng_reseed(bool force) · 317 unmodified lines
318318 * the resultant ChaCha state to the user, along with the second
319319 * half of the block containing 32 bytes of random data that may
320320 * be used; random_data_len may not be greater than 32.
321+ *
322+ * The returned ChaCha state contains within it a copy of the old
323+ * key value, at index 4, so the state should always be zeroed out
324+ * immediately after using in order to maintain forward secrecy.
325+ * If the state cannot be erased in a timely manner, then it is
326+ * safer to set the random_data parameter to &chacha_state[4] so
327+ * that this function overwrites it before returning.
321328 */
322329 static void crng_fast_key_erasure(u8 key[CHACHA_KEY_SIZE],
323330 u32 chacha_state[CHACHA_STATE_WORDS],
@@ -523,8 +530,7 @@ EXPORT_SYMBOL(get_random_bytes); · 199 unmodified lines
523530
524531 static ssize_t get_random_bytes_user(void __user *buf, size_t nbytes)
525532 {
526− ssize_t ret = 0;
527− size_t len;
533+ size_t len, left, ret = 0;
528534 u32 chacha_state[CHACHA_STATE_WORDS];
529535 u8 output[CHACHA_BLOCK_SIZE];
530536
@@ -543,37 +549,40 @@ static ssize_t get_random_bytes_user(void __user *buf, size_t nbytes) · 12 unmodified lines
543549 * the user directly.
544550 */
545551 if (nbytes <= CHACHA_KEY_SIZE) {
546− ret = copy_to_user(buf, &chacha_state[4], nbytes) ? -EFAULT : nbytes;
552+ ret = nbytes - copy_to_user(buf, &chacha_state[4], nbytes);
547553 goto out_zero_chacha;
548554 }
549555
550− do {
556+ for (;;) {
551557 chacha20_block(chacha_state, output);
552558 if (unlikely(chacha_state[12] == 0))
553559 ++chacha_state[13];
554560
555561 len = min_t(size_t, nbytes, CHACHA_BLOCK_SIZE);
556− if (copy_to_user(buf, output, len)) {
557− ret = -EFAULT;
562+ left = copy_to_user(buf, output, len);
563+ if (left) {
564+ ret += len - left;
558565 break;
559566 }
560567
561− nbytes -= len;
562568 buf += len;
563569 ret += len;
570+ nbytes -= len;
571+ if (!nbytes)
572+ break;
564573
565574 BUILD_BUG_ON(PAGE_SIZE % CHACHA_BLOCK_SIZE != 0);
566− if (!(ret % PAGE_SIZE) && nbytes) {
575+ if (ret % PAGE_SIZE == 0) {
567576 if (signal_pending(current))
568577 break;
569578 cond_resched();
570579 }
571− } while (nbytes);
580+ }
572581
573582 memzero_explicit(output, sizeof(output));
574583 out_zero_chacha:
575584 memzero_explicit(chacha_state, sizeof(chacha_state));
576− return ret;
585+ return ret ? ret : -EFAULT;
577586 }
578587
579588 /*
@@ -1016,7 +1025,7 @@ int __init rand_initialize(void) · 436 unmodified lines
10161025 */
10171026 void add_device_randomness(const void *buf, size_t size)
10181027 {
1019− cycles_t cycles = random_get_entropy();
1028+ unsigned long cycles = random_get_entropy();
10201029 unsigned long flags, now = jiffies;
10211030
10221031 if (crng_init == 0 && size)
@@ -1047,8 +1056,7 @@ struct timer_rand_state { · 24 unmodified lines
10471056 */
10481057 static void add_timer_randomness(struct timer_rand_state *state, unsigned int num)
10491058 {
1050− cycles_t cycles = random_get_entropy();
1051− unsigned long flags, now = jiffies;
1059+ unsigned long cycles = random_get_entropy(), now = jiffies, flags;
10521060 long delta, delta2, delta3;
10531061
10541062 spin_lock_irqsave(&input_pool.lock, flags);
@@ -1337,8 +1345,7 @@ static void mix_interrupt_randomness(struct work_struct *work) · 282 unmodified lines
13371345 void add_interrupt_randomness(int irq)
13381346 {
13391347 enum { MIX_INFLIGHT = 1U << 31 };
1340− cycles_t cycles = random_get_entropy();
1341− unsigned long now = jiffies;
1348+ unsigned long cycles = random_get_entropy(), now = jiffies;
13421349 struct fast_pool *fast_pool = this_cpu_ptr(&irq_randomness);
13431350 struct pt_regs *regs = get_irq_regs();
13441351 unsigned int new_count;
@@ -1351,16 +1358,12 @@ void add_interrupt_randomness(int irq) · 6 unmodified lines
13511358 if (cycles == 0)
13521359 cycles = get_reg(fast_pool, regs);
13531360
1354− if (sizeof(cycles) == 8)
1361+ if (sizeof(unsigned long) == 8) {
13551362 irq_data.u64[0] = cycles ^ rol64(now, 32) ^ irq;
1356− else {
1363+ irq_data.u64[1] = regs ? instruction_pointer(regs) : _RET_IP_;
1364+ } else {
13571365 irq_data.u32[0] = cycles ^ irq;
13581366 irq_data.u32[1] = now;
1359− }
1360−
1361− if (sizeof(unsigned long) == 8)
1362− irq_data.u64[1] = regs ? instruction_pointer(regs) : _RET_IP_;
1363− else {
13641367 irq_data.u32[2] = regs ? instruction_pointer(regs) : _RET_IP_;
13651368 irq_data.u32[3] = get_reg(fast_pool, regs);
13661369 }
@@ -1407,7 +1410,7 @@ static void entropy_timer(struct timer_list *t) · 40 unmodified lines
14071410 static void try_to_generate_entropy(void)
14081411 {
14091412 struct {
1410− cycles_t cycles;
1413+ unsigned long cycles;
14111414 struct timer_list timer;
14121415 } stack;
14131416
drivers/clk/microchip/clk-mpfs.c+164−31
@@ -11,20 +11,48 @@ · 10 unmodified lines
1111 #include <dt-bindings/clock/microchip,mpfs-clock.h>
1212
1313 /* address offset of control registers */
14+#define REG_MSSPLL_REF_CR 0x08u
15+#define REG_MSSPLL_POSTDIV_CR 0x10u
16+#define REG_MSSPLL_SSCG_2_CR 0x2Cu
1417 #define REG_CLOCK_CONFIG_CR 0x08u
18+#define REG_RTC_CLOCK_CR 0x0Cu
1519 #define REG_SUBBLK_CLOCK_CR 0x84u
1620 #define REG_SUBBLK_RESET_CR 0x88u
1721
22+#define MSSPLL_FBDIV_SHIFT 0x00u
23+#define MSSPLL_FBDIV_WIDTH 0x0Cu
24+#define MSSPLL_REFDIV_SHIFT 0x08u
25+#define MSSPLL_REFDIV_WIDTH 0x06u
26+#define MSSPLL_POSTDIV_SHIFT 0x08u
27+#define MSSPLL_POSTDIV_WIDTH 0x07u
28+#define MSSPLL_FIXED_DIV 4u
29+
1830 struct mpfs_clock_data {
1931 void __iomem *base;
32+ void __iomem *msspll_base;
2033 struct clk_hw_onecell_data hw_data;
2134 };
2235
36+struct mpfs_msspll_hw_clock {
37+ void __iomem *base;
38+ unsigned int id;
39+ u32 reg_offset;
40+ u32 shift;
41+ u32 width;
42+ u32 flags;
43+ struct clk_hw hw;
44+ struct clk_init_data init;
45+};
46+
47+#define to_mpfs_msspll_clk(_hw) container_of(_hw, struct mpfs_msspll_hw_clock, hw)
48+
2349 struct mpfs_cfg_clock {
2450 const struct clk_div_table *table;
2551 unsigned int id;
52+ u32 reg_offset;
2653 u8 shift;
2754 u8 width;
55+ u8 flags;
2856 };
2957
3058 struct mpfs_cfg_hw_clock {
@@ -55,7 +83,7 @@ struct mpfs_periph_hw_clock { · 24 unmodified lines
5583 */
5684 static DEFINE_SPINLOCK(mpfs_clk_lock);
5785
58−static const struct clk_parent_data mpfs_cfg_parent[] = {
86+static const struct clk_parent_data mpfs_ext_ref[] = {
5987 { .index = 0 },
6088 };
6189
@@ -69,6 +97,86 @@ static const struct clk_div_table mpfs_div_ahb_table[] = { · 7 unmodified lines
6997 { 0, 0 }
7098 };
7199
100+/*
101+ * The only two supported reference clock frequencies for the PolarFire SoC are
102+ * 100 and 125 MHz, as the rtc reference is required to be 1 MHz.
103+ * It therefore only needs to have divider table entries corresponding to
104+ * divide by 100 and 125.
105+ */
106+static const struct clk_div_table mpfs_div_rtcref_table[] = {
107+ { 100, 100 }, { 125, 125 },
108+ { 0, 0 }
109+};
110+
111+static unsigned long mpfs_clk_msspll_recalc_rate(struct clk_hw *hw, unsigned long prate)
112+{
113+ struct mpfs_msspll_hw_clock *msspll_hw = to_mpfs_msspll_clk(hw);
114+ void __iomem *mult_addr = msspll_hw->base + msspll_hw->reg_offset;
115+ void __iomem *ref_div_addr = msspll_hw->base + REG_MSSPLL_REF_CR;
116+ void __iomem *postdiv_addr = msspll_hw->base + REG_MSSPLL_POSTDIV_CR;
117+ u32 mult, ref_div, postdiv;
118+
119+ mult = readl_relaxed(mult_addr) >> MSSPLL_FBDIV_SHIFT;
120+ mult &= clk_div_mask(MSSPLL_FBDIV_WIDTH);
121+ ref_div = readl_relaxed(ref_div_addr) >> MSSPLL_REFDIV_SHIFT;
122+ ref_div &= clk_div_mask(MSSPLL_REFDIV_WIDTH);
123+ postdiv = readl_relaxed(postdiv_addr) >> MSSPLL_POSTDIV_SHIFT;
124+ postdiv &= clk_div_mask(MSSPLL_POSTDIV_WIDTH);
125+
126+ return prate * mult / (ref_div * MSSPLL_FIXED_DIV * postdiv);
127+}
128+
129+static const struct clk_ops mpfs_clk_msspll_ops = {
130+ .recalc_rate = mpfs_clk_msspll_recalc_rate,
131+};
132+
133+#define CLK_PLL(_id, _name, _parent, _shift, _width, _flags, _offset) { \
134+ .id = _id, \
135+ .shift = _shift, \
136+ .width = _width, \
137+ .reg_offset = _offset, \
138+ .flags = _flags, \
139+ .hw.init = CLK_HW_INIT_PARENTS_DATA(_name, _parent, &mpfs_clk_msspll_ops, 0), \
140+}
141+
142+static struct mpfs_msspll_hw_clock mpfs_msspll_clks[] = {
143+ CLK_PLL(CLK_MSSPLL, "clk_msspll", mpfs_ext_ref, MSSPLL_FBDIV_SHIFT,
144+ MSSPLL_FBDIV_WIDTH, 0, REG_MSSPLL_SSCG_2_CR),
145+};
146+
147+static int mpfs_clk_register_msspll(struct device *dev, struct mpfs_msspll_hw_clock *msspll_hw,
148+ void __iomem *base)
149+{
150+ msspll_hw->base = base;
151+
152+ return devm_clk_hw_register(dev, &msspll_hw->hw);
153+}
154+
155+static int mpfs_clk_register_mssplls(struct device *dev, struct mpfs_msspll_hw_clock *msspll_hws,
156+ unsigned int num_clks, struct mpfs_clock_data *data)
157+{
158+ void __iomem *base = data->msspll_base;
159+ unsigned int i;
160+ int ret;
161+
162+ for (i = 0; i < num_clks; i++) {
163+ struct mpfs_msspll_hw_clock *msspll_hw = &msspll_hws[i];
164+
165+ ret = mpfs_clk_register_msspll(dev, msspll_hw, base);
166+ if (ret)
167+ return dev_err_probe(dev, ret, "failed to register msspll id: %d\n",
168+ CLK_MSSPLL);
169+
170+ data->hw_data.hws[msspll_hw->id] = &msspll_hw->hw;
171+ }
172+
173+ return 0;
174+}
175+
176+/*
177+ * "CFG" clocks
178+ */
179+
72180 static unsigned long mpfs_cfg_clk_recalc_rate(struct clk_hw *hw, unsigned long prate)
73181 {
74182 struct mpfs_cfg_hw_clock *cfg_hw = to_mpfs_cfg_clk(hw);
@@ -76,10 +184,10 @@ static unsigned long mpfs_cfg_clk_recalc_rate(struct clk_hw *hw, unsigned long p · 1 unmodified line
76184 void __iomem *base_addr = cfg_hw->sys_base;
77185 u32 val;
78186
79− val = readl_relaxed(base_addr + REG_CLOCK_CONFIG_CR) >> cfg->shift;
187+ val = readl_relaxed(base_addr + cfg->reg_offset) >> cfg->shift;
80188 val &= clk_div_mask(cfg->width);
81189
82− return prate / (1u << val);
190+ return divider_recalc_rate(hw, prate, val, cfg->table, cfg->flags, cfg->width);
83191 }
84192
85193 static long mpfs_cfg_clk_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate)
@@ -105,11 +213,10 @@ static int mpfs_cfg_clk_set_rate(struct clk_hw *hw, unsigned long rate, unsigned · 19 unmodified lines
105213 return divider_setting;
106214
107215 spin_lock_irqsave(&mpfs_clk_lock, flags);
108−
109− val = readl_relaxed(base_addr + REG_CLOCK_CONFIG_CR);
216+ val = readl_relaxed(base_addr + cfg->reg_offset);
110217 val &= ~(clk_div_mask(cfg->width) << cfg_hw->cfg.shift);
111218 val |= divider_setting << cfg->shift;
112− writel_relaxed(val, base_addr + REG_CLOCK_CONFIG_CR);
219+ writel_relaxed(val, base_addr + cfg->reg_offset);
113220
114221 spin_unlock_irqrestore(&mpfs_clk_lock, flags);
115222
@@ -122,19 +229,33 @@ static const struct clk_ops mpfs_clk_cfg_ops = { · 6 unmodified lines
122229 .set_rate = mpfs_cfg_clk_set_rate,
123230 };
124231
125−#define CLK_CFG(_id, _name, _parent, _shift, _width, _table, _flags) { \
126− .cfg.id = _id, \
127− .cfg.shift = _shift, \
128− .cfg.width = _width, \
129− .cfg.table = _table, \
130− .hw.init = CLK_HW_INIT_PARENTS_DATA(_name, _parent, &mpfs_clk_cfg_ops, \
131− _flags), \
232+#define CLK_CFG(_id, _name, _parent, _shift, _width, _table, _flags, _offset) { \
233+ .cfg.id = _id, \
234+ .cfg.shift = _shift, \
235+ .cfg.width = _width, \
236+ .cfg.table = _table, \
237+ .cfg.reg_offset = _offset, \
238+ .cfg.flags = _flags, \
239+ .hw.init = CLK_HW_INIT(_name, _parent, &mpfs_clk_cfg_ops, 0), \
132240 }
133241
134242 static struct mpfs_cfg_hw_clock mpfs_cfg_clks[] = {
135− CLK_CFG(CLK_CPU, "clk_cpu", mpfs_cfg_parent, 0, 2, mpfs_div_cpu_axi_table, 0),
136− CLK_CFG(CLK_AXI, "clk_axi", mpfs_cfg_parent, 2, 2, mpfs_div_cpu_axi_table, 0),
137− CLK_CFG(CLK_AHB, "clk_ahb", mpfs_cfg_parent, 4, 2, mpfs_div_ahb_table, 0),
243+ CLK_CFG(CLK_CPU, "clk_cpu", "clk_msspll", 0, 2, mpfs_div_cpu_axi_table, 0,
244+ REG_CLOCK_CONFIG_CR),
245+ CLK_CFG(CLK_AXI, "clk_axi", "clk_msspll", 2, 2, mpfs_div_cpu_axi_table, 0,
246+ REG_CLOCK_CONFIG_CR),
247+ CLK_CFG(CLK_AHB, "clk_ahb", "clk_msspll", 4, 2, mpfs_div_ahb_table, 0,
248+ REG_CLOCK_CONFIG_CR),
249+ {
250+ .cfg.id = CLK_RTCREF,
251+ .cfg.shift = 0,
252+ .cfg.width = 12,
253+ .cfg.table = mpfs_div_rtcref_table,
254+ .cfg.reg_offset = REG_RTC_CLOCK_CR,
255+ .cfg.flags = CLK_DIVIDER_ONE_BASED,
256+ .hw.init =
257+ CLK_HW_INIT_PARENTS_DATA("clk_rtcref", mpfs_ext_ref, &mpfs_clk_cfg_ops, 0),
258+ }
138259 };
139260
140261 static int mpfs_clk_register_cfg(struct device *dev, struct mpfs_cfg_hw_clock *cfg_hw,
@@ -160,13 +281,17 @@ static int mpfs_clk_register_cfgs(struct device *dev, struct mpfs_cfg_hw_clock * · 19 unmodified lines
160281 return dev_err_probe(dev, ret, "failed to register clock id: %d\n",
161282 cfg_hw->cfg.id);
162283
163− id = cfg_hws[i].cfg.id;
284+ id = cfg_hw->cfg.id;
164285 data->hw_data.hws[id] = &cfg_hw->hw;
165286 }
166287
167288 return 0;
168289 }
169290
291+/*
292+ * peripheral clocks - devices connected to axi or ahb buses.
293+ */
294+
170295 static int mpfs_periph_clk_enable(struct clk_hw *hw)
171296 {
172297 struct mpfs_periph_hw_clock *periph_hw = to_mpfs_periph_clk(hw);
@@ -200,10 +325,6 @@ static void mpfs_periph_clk_disable(struct clk_hw *hw) · 27 unmodified lines
200325
201326 spin_lock_irqsave(&mpfs_clk_lock, flags);
202327
203− reg = readl_relaxed(base_addr + REG_SUBBLK_RESET_CR);
204− val = reg | (1u << periph->shift);
205− writel_relaxed(val, base_addr + REG_SUBBLK_RESET_CR);
206−
207328 reg = readl_relaxed(base_addr + REG_SUBBLK_CLOCK_CR);
208329 val = reg & ~(1u << periph->shift);
209330 writel_relaxed(val, base_addr + REG_SUBBLK_CLOCK_CR);
@@ -249,8 +370,10 @@ static const struct clk_ops mpfs_periph_clk_ops = { · 39 unmodified lines
249370 * trap handler
250371 * - CLK_MMUART0: reserved by the hss
251372 * - CLK_DDRC: provides clock to the ddr subsystem
252− * - CLK_FICx: these provide clocks for sections of the fpga fabric, disabling them would
253− * cause the fabric to go into reset
373+ * - CLK_FICx: these provide the processor side clocks to the "FIC" (Fabric InterConnect)
374+ * clock domain crossers which provide the interface to the FPGA fabric. Disabling them
375+ * causes the FPGA fabric to go into reset.
376+ * - CLK_ATHENA: The athena clock is FIC4, which is reserved for the Athena TeraFire.
254377 */
255378
256379 static struct mpfs_periph_hw_clock mpfs_periph_clks[] = {
@@ -258,7 +381,7 @@ static struct mpfs_periph_hw_clock mpfs_periph_clks[] = { · 1 unmodified line
258381 CLK_PERIPH(CLK_MAC0, "clk_periph_mac0", PARENT_CLK(AHB), 1, 0),
259382 CLK_PERIPH(CLK_MAC1, "clk_periph_mac1", PARENT_CLK(AHB), 2, 0),
260383 CLK_PERIPH(CLK_MMC, "clk_periph_mmc", PARENT_CLK(AHB), 3, 0),
261− CLK_PERIPH(CLK_TIMER, "clk_periph_timer", PARENT_CLK(AHB), 4, 0),
384+ CLK_PERIPH(CLK_TIMER, "clk_periph_timer", PARENT_CLK(RTCREF), 4, 0),
262385 CLK_PERIPH(CLK_MMUART0, "clk_periph_mmuart0", PARENT_CLK(AHB), 5, CLK_IS_CRITICAL),
263386 CLK_PERIPH(CLK_MMUART1, "clk_periph_mmuart1", PARENT_CLK(AHB), 6, 0),
264387 CLK_PERIPH(CLK_MMUART2, "clk_periph_mmuart2", PARENT_CLK(AHB), 7, 0),
@@ -277,11 +400,11 @@ static struct mpfs_periph_hw_clock mpfs_periph_clks[] = { · 12 unmodified lines
277400 CLK_PERIPH(CLK_GPIO1, "clk_periph_gpio1", PARENT_CLK(AHB), 21, 0),
278401 CLK_PERIPH(CLK_GPIO2, "clk_periph_gpio2", PARENT_CLK(AHB), 22, 0),
279402 CLK_PERIPH(CLK_DDRC, "clk_periph_ddrc", PARENT_CLK(AHB), 23, CLK_IS_CRITICAL),
280− CLK_PERIPH(CLK_FIC0, "clk_periph_fic0", PARENT_CLK(AHB), 24, CLK_IS_CRITICAL),
281− CLK_PERIPH(CLK_FIC1, "clk_periph_fic1", PARENT_CLK(AHB), 25, CLK_IS_CRITICAL),
282− CLK_PERIPH(CLK_FIC2, "clk_periph_fic2", PARENT_CLK(AHB), 26, CLK_IS_CRITICAL),
283− CLK_PERIPH(CLK_FIC3, "clk_periph_fic3", PARENT_CLK(AHB), 27, CLK_IS_CRITICAL),
284− CLK_PERIPH(CLK_ATHENA, "clk_periph_athena", PARENT_CLK(AHB), 28, 0),
403+ CLK_PERIPH(CLK_FIC0, "clk_periph_fic0", PARENT_CLK(AXI), 24, CLK_IS_CRITICAL),
404+ CLK_PERIPH(CLK_FIC1, "clk_periph_fic1", PARENT_CLK(AXI), 25, CLK_IS_CRITICAL),
405+ CLK_PERIPH(CLK_FIC2, "clk_periph_fic2", PARENT_CLK(AXI), 26, CLK_IS_CRITICAL),
406+ CLK_PERIPH(CLK_FIC3, "clk_periph_fic3", PARENT_CLK(AXI), 27, CLK_IS_CRITICAL),
407+ CLK_PERIPH(CLK_ATHENA, "clk_periph_athena", PARENT_CLK(AXI), 28, CLK_IS_CRITICAL),
285408 CLK_PERIPH(CLK_CFM, "clk_periph_cfm", PARENT_CLK(AHB), 29, 0),
286409 };
287410
@@ -322,8 +445,9 @@ static int mpfs_clk_probe(struct platform_device *pdev) · 34 unmodified lines
322445 unsigned int num_clks;
323446 int ret;
324447
325− /* CLK_RESERVED is not part of cfg_clks nor periph_clks, so add 1 */
326− num_clks = ARRAY_SIZE(mpfs_cfg_clks) + ARRAY_SIZE(mpfs_periph_clks) + 1;
448+ /* CLK_RESERVED is not part of clock arrays, so add 1 */
449+ num_clks = ARRAY_SIZE(mpfs_msspll_clks) + ARRAY_SIZE(mpfs_cfg_clks)
450+ + ARRAY_SIZE(mpfs_periph_clks) + 1;
327451
328452 clk_data = devm_kzalloc(dev, struct_size(clk_data, hw_data.hws, num_clks), GFP_KERNEL);
329453 if (!clk_data)
@@ -333,8 +457,17 @@ static int mpfs_clk_probe(struct platform_device *pdev) · 3 unmodified lines
333457 if (IS_ERR(clk_data->base))
334458 return PTR_ERR(clk_data->base);
335459
460+ clk_data->msspll_base = devm_platform_ioremap_resource(pdev, 1);
461+ if (IS_ERR(clk_data->msspll_base))
462+ return PTR_ERR(clk_data->msspll_base);
463+
336464 clk_data->hw_data.num = num_clks;
337465
466+ ret = mpfs_clk_register_mssplls(dev, mpfs_msspll_clks, ARRAY_SIZE(mpfs_msspll_clks),
467+ clk_data);
468+ if (ret)
469+ return ret;
470+
338471 ret = mpfs_clk_register_cfgs(dev, mpfs_cfg_clks, ARRAY_SIZE(mpfs_cfg_clks), clk_data);
339472 if (ret)
340473 return ret;
drivers/clk/qcom/clk-rcg2.c+1−1
@@ -818,7 +818,7 @@ EXPORT_SYMBOL_GPL(clk_pixel_ops); · 817 unmodified lines
818818 static int clk_gfx3d_determine_rate(struct clk_hw *hw,
819819 struct clk_rate_request *req)
820820 {
821− struct clk_rate_request parent_req = { };
821+ struct clk_rate_request parent_req = { .min_rate = 0, .max_rate = ULONG_MAX };
822822 struct clk_rcg2_gfx3d *cgfx = to_clk_rcg2_gfx3d(hw);
823823 struct clk_hw *xo, *p0, *p1, *p2;
824824 unsigned long p0_rate;
drivers/clk/sunxi-ng/ccu-sun6i-rtc.c+2−0
@@ -241,6 +241,7 @@ static struct clk_init_data rtc_32k_init_data = { · 240 unmodified lines
241241 .ops = &ccu_mux_ops,
242242 .parent_hws = rtc_32k_parents,
243243 .num_parents = ARRAY_SIZE(rtc_32k_parents), /* updated during probe */
244+ .flags = CLK_IS_CRITICAL,
244245 };
245246
246247 static struct ccu_mux rtc_32k_clk = {
@@ -346,6 +347,7 @@ static const struct of_device_id sun6i_rtc_ccu_match[] = { · 99 unmodified lines
346347 .compatible = "allwinner,sun50i-r329-rtc",
347348 .data = &sun50i_r329_rtc_ccu_data,
348349 },
350+ {},
349351 };
350352
351353 int sun6i_rtc_ccu_probe(struct device *dev, void __iomem *reg)
drivers/clk/sunxi/clk-sun9i-mmc.c+2−0
@@ -109,6 +109,8 @@ static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev) · 108 unmodified lines
109109 spin_lock_init(&data->lock);
110110
111111 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
112+ if (!r)
113+ return -EINVAL;
112114 /* one clock/reset pair per word */
113115 count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
114116 data->membase = devm_ioremap_resource(&pdev->dev, r);
drivers/cpufreq/qcom-cpufreq-hw.c+57−13
@@ -24,13 +24,17 @@ · 23 unmodified lines
2424 #define CLK_HW_DIV 2
2525 #define LUT_TURBO_IND 1
2626
27+#define GT_IRQ_STATUS BIT(2)
28+
2729 #define HZ_PER_KHZ 1000
2830
2931 struct qcom_cpufreq_soc_data {
3032 u32 reg_enable;
33+ u32 reg_domain_state;
3134 u32 reg_dcvs_ctrl;
3235 u32 reg_freq_lut;
3336 u32 reg_volt_lut;
37+ u32 reg_intr_clr;
3438 u32 reg_current_vote;
3539 u32 reg_perf_state;
3640 u8 lut_row_size;
@@ -280,37 +284,46 @@ static void qcom_get_related_cpus(int index, struct cpumask *m) · 243 unmodified lines
280284 }
281285 }
282286
283−static unsigned int qcom_lmh_get_throttle_freq(struct qcom_cpufreq_data *data)
287+static unsigned long qcom_lmh_get_throttle_freq(struct qcom_cpufreq_data *data)
284288 {
285− unsigned int val = readl_relaxed(data->base + data->soc_data->reg_current_vote);
289+ unsigned int lval;
290+
291+ if (data->soc_data->reg_current_vote)
292+ lval = readl_relaxed(data->base + data->soc_data->reg_current_vote) & 0x3ff;
293+ else
294+ lval = readl_relaxed(data->base + data->soc_data->reg_domain_state) & 0xff;
286295
287− return (val & 0x3FF) * 19200;
296+ return lval * xo_rate;
288297 }
289298
290299 static void qcom_lmh_dcvs_notify(struct qcom_cpufreq_data *data)
291300 {
292301 struct cpufreq_policy *policy = data->policy;
293− int cpu = cpumask_first(policy->cpus);
302+ int cpu = cpumask_first(policy->related_cpus);
294303 struct device *dev = get_cpu_device(cpu);
295304 unsigned long freq_hz, throttled_freq;
296305 struct dev_pm_opp *opp;
297− unsigned int freq;
298306
299307 /*
300308 * Get the h/w throttled frequency, normalize it using the
301309 * registered opp table and use it to calculate thermal pressure.
302310 */
303− freq = qcom_lmh_get_throttle_freq(data);
304− freq_hz = freq * HZ_PER_KHZ;
311+ freq_hz = qcom_lmh_get_throttle_freq(data);
305312
306313 opp = dev_pm_opp_find_freq_floor(dev, &freq_hz);
307314 if (IS_ERR(opp) && PTR_ERR(opp) == -ERANGE)
308− dev_pm_opp_find_freq_ceil(dev, &freq_hz);
315+ opp = dev_pm_opp_find_freq_ceil(dev, &freq_hz);
316+
317+ if (IS_ERR(opp)) {
318+ dev_warn(dev, "Can't find the OPP for throttling: %pe!\n", opp);
319+ } else {
320+ throttled_freq = freq_hz / HZ_PER_KHZ;
309321
310− throttled_freq = freq_hz / HZ_PER_KHZ;
322+ /* Update thermal pressure (the boost frequencies are accepted) */
323+ arch_update_thermal_pressure(policy->related_cpus, throttled_freq);
311324
312− /* Update thermal pressure (the boost frequencies are accepted) */
313− arch_update_thermal_pressure(policy->related_cpus, throttled_freq);
325+ dev_pm_opp_put(opp);
326+ }
314327
315328 /*
316329 * In the unlikely case policy is unregistered do not enable
@@ -350,6 +363,10 @@ static irqreturn_t qcom_lmh_dcvs_handle_irq(int irq, void *data) · 33 unmodified lines
350363 disable_irq_nosync(c_data->throttle_irq);
351364 schedule_delayed_work(&c_data->throttle_work, 0);
352365
366+ if (c_data->soc_data->reg_intr_clr)
367+ writel_relaxed(GT_IRQ_STATUS,
368+ c_data->base + c_data->soc_data->reg_intr_clr);
369+
353370 return IRQ_HANDLED;
354371 }
355372
@@ -365,9 +382,11 @@ static const struct qcom_cpufreq_soc_data qcom_soc_data = { · 9 unmodified lines
365382
366383 static const struct qcom_cpufreq_soc_data epss_soc_data = {
367384 .reg_enable = 0x0,
385+ .reg_domain_state = 0x20,
368386 .reg_dcvs_ctrl = 0xb0,
369387 .reg_freq_lut = 0x100,
370388 .reg_volt_lut = 0x200,
389+ .reg_intr_clr = 0x308,
371390 .reg_perf_state = 0x320,
372391 .lut_row_size = 4,
373392 };
@@ -417,16 +436,39 @@ static int qcom_cpufreq_hw_lmh_init(struct cpufreq_policy *policy, int index) · 43 unmodified lines
417436 return 0;
418437 }
419438
420−static void qcom_cpufreq_hw_lmh_exit(struct qcom_cpufreq_data *data)
439+static int qcom_cpufreq_hw_cpu_online(struct cpufreq_policy *policy)
440+{
441+ struct qcom_cpufreq_data *data = policy->driver_data;
442+ struct platform_device *pdev = cpufreq_get_driver_data();
443+ int ret;
444+
445+ ret = irq_set_affinity_hint(data->throttle_irq, policy->cpus);
446+ if (ret)
447+ dev_err(&pdev->dev, "Failed to set CPU affinity of %s[%d]\n",
448+ data->irq_name, data->throttle_irq);
449+
450+ return ret;
451+}
452+
453+static int qcom_cpufreq_hw_cpu_offline(struct cpufreq_policy *policy)
421454 {
455+ struct qcom_cpufreq_data *data = policy->driver_data;
456+
422457 if (data->throttle_irq <= 0)
423− return;
458+ return 0;
424459
425460 mutex_lock(&data->throttle_lock);
426461 data->cancel_throttle = true;
427462 mutex_unlock(&data->throttle_lock);
428463
429464 cancel_delayed_work_sync(&data->throttle_work);
465+ irq_set_affinity_hint(data->throttle_irq, NULL);
466+
467+ return 0;
468+}
469+
470+static void qcom_cpufreq_hw_lmh_exit(struct qcom_cpufreq_data *data)
471+{
430472 free_irq(data->throttle_irq, data);
431473 }
432474
@@ -583,6 +625,8 @@ static struct cpufreq_driver cpufreq_qcom_hw_driver = { · 150 unmodified lines
583625 .get = qcom_cpufreq_hw_get,
584626 .init = qcom_cpufreq_hw_cpu_init,
585627 .exit = qcom_cpufreq_hw_cpu_exit,
628+ .online = qcom_cpufreq_hw_cpu_online,
629+ .offline = qcom_cpufreq_hw_cpu_offline,
586630 .register_em = cpufreq_register_em_with_opp,
587631 .fast_switch = qcom_cpufreq_hw_fast_switch,
588632 .name = "qcom-cpufreq-hw",
drivers/cpufreq/sun50i-cpufreq-nvmem.c+3−1
@@ -98,8 +98,10 @@ static int sun50i_cpufreq_nvmem_probe(struct platform_device *pdev) · 97 unmodified lines
9898 return -ENOMEM;
9999
100100 ret = sun50i_cpufreq_get_efuse(&speed);
101− if (ret)
101+ if (ret) {
102+ kfree(opp_tables);
102103 return ret;
104+ }
103105
104106 snprintf(name, MAX_NAME_LEN, "speed%d", speed);
105107
drivers/cpuidle/cpuidle-riscv-sbi.c+1−0
@@ -22,6 +22,7 @@ · 21 unmodified lines
2222 #include <linux/pm_runtime.h>
2323 #include <asm/cpuidle.h>
2424 #include <asm/sbi.h>
25+#include <asm/smp.h>
2526 #include <asm/suspend.h>
2627
2728 #include "dt_idle_states.h"
drivers/dma/at_xdmac.c+7−5
@@ -1453,7 +1453,7 @@ at_xdmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie, · 1452 unmodified lines
14531453 {
14541454 struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan);
14551455 struct at_xdmac *atxdmac = to_at_xdmac(atchan->chan.device);
1456− struct at_xdmac_desc *desc, *_desc;
1456+ struct at_xdmac_desc *desc, *_desc, *iter;
14571457 struct list_head *descs_list;
14581458 enum dma_status ret;
14591459 int residue, retry;
@@ -1568,11 +1568,13 @@ at_xdmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie, · 108 unmodified lines
15681568 * microblock.
15691569 */
15701570 descs_list = &desc->descs_list;
1571− list_for_each_entry_safe(desc, _desc, descs_list, desc_node) {
1572− dwidth = at_xdmac_get_dwidth(desc->lld.mbr_cfg);
1573− residue -= (desc->lld.mbr_ubc & 0xffffff) << dwidth;
1574− if ((desc->lld.mbr_nda & 0xfffffffc) == cur_nda)
1571+ list_for_each_entry_safe(iter, _desc, descs_list, desc_node) {
1572+ dwidth = at_xdmac_get_dwidth(iter->lld.mbr_cfg);
1573+ residue -= (iter->lld.mbr_ubc & 0xffffff) << dwidth;
1574+ if ((iter->lld.mbr_nda & 0xfffffffc) == cur_nda) {
1575+ desc = iter;
15751576 break;
1577+ }
15761578 }
15771579 residue += cur_ubc << dwidth;
15781580
drivers/dma/dw-edma/dw-edma-v0-core.c+10−6
@@ -414,14 +414,18 @@ void dw_edma_v0_core_start(struct dw_edma_chunk *chunk, bool first) · 413 unmodified lines
414414 SET_CH_32(dw, chan->dir, chan->id, ch_control1,
415415 (DW_EDMA_V0_CCS | DW_EDMA_V0_LLE));
416416 /* Linked list */
417+
417418 #ifdef CONFIG_64BIT
418− SET_CH_64(dw, chan->dir, chan->id, llp.reg,
419− chunk->ll_region.paddr);
419+ /* llp is not aligned on 64bit -> keep 32bit accesses */
420+ SET_CH_32(dw, chan->dir, chan->id, llp.lsb,
421+ lower_32_bits(chunk->ll_region.paddr));
422+ SET_CH_32(dw, chan->dir, chan->id, llp.msb,
423+ upper_32_bits(chunk->ll_region.paddr));
420424 #else /* CONFIG_64BIT */
421− SET_CH_32(dw, chan->dir, chan->id, llp.lsb,
422− lower_32_bits(chunk->ll_region.paddr));
423− SET_CH_32(dw, chan->dir, chan->id, llp.msb,
424− upper_32_bits(chunk->ll_region.paddr));
425+ SET_CH_32(dw, chan->dir, chan->id, llp.lsb,
426+ lower_32_bits(chunk->ll_region.paddr));
427+ SET_CH_32(dw, chan->dir, chan->id, llp.msb,
428+ upper_32_bits(chunk->ll_region.paddr));
425429 #endif /* CONFIG_64BIT */
426430 }
427431 /* Doorbell */
drivers/dma/idxd/device.c+4−2
@@ -373,7 +373,6 @@ static void idxd_wq_device_reset_cleanup(struct idxd_wq *wq) · 372 unmodified lines
373373 {
374374 lockdep_assert_held(&wq->wq_lock);
375375
376− idxd_wq_disable_cleanup(wq);
377376 wq->size = 0;
378377 wq->group = NULL;
379378 }
@@ -701,14 +700,17 @@ static void idxd_device_wqs_clear_state(struct idxd_device *idxd) · 321 unmodified lines
701700
702701 if (wq->state == IDXD_WQ_ENABLED) {
703702 idxd_wq_disable_cleanup(wq);
704− idxd_wq_device_reset_cleanup(wq);
705703 wq->state = IDXD_WQ_DISABLED;
706704 }
705+ idxd_wq_device_reset_cleanup(wq);
707706 }
708707 }
709708
710709 void idxd_device_clear_state(struct idxd_device *idxd)
711710 {
711+ if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
712+ return;
713+
712714 idxd_groups_clear_state(idxd);
713715 idxd_engines_clear_state(idxd);
714716 idxd_device_wqs_clear_state(idxd);
drivers/dma/idxd/submit.c+3−2
@@ -150,14 +150,15 @@ static void llist_abort_desc(struct idxd_wq *wq, struct idxd_irq_entry *ie, · 149 unmodified lines
150150 */
151151 int idxd_enqcmds(struct idxd_wq *wq, void __iomem *portal, const void *desc)
152152 {
153− int rc, retries = 0;
153+ unsigned int retries = wq->enqcmds_retries;
154+ int rc;
154155
155156 do {
156157 rc = enqcmds(portal, desc);
157158 if (rc == 0)
158159 break;
159160 cpu_relax();
160− } while (retries++ < wq->enqcmds_retries);
161+ } while (retries--);
161162
162163 return rc;
163164 }
drivers/dma/idxd/sysfs.c+6−0
@@ -905,6 +905,9 @@ static ssize_t wq_max_transfer_size_store(struct device *dev, struct device_attr · 904 unmodified lines
905905 u64 xfer_size;
906906 int rc;
907907
908+ if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
909+ return -EPERM;
910+
908911 if (wq->state != IDXD_WQ_DISABLED)
909912 return -EPERM;
910913
@@ -939,6 +942,9 @@ static ssize_t wq_max_batch_size_store(struct device *dev, struct device_attribu · 28 unmodified lines
939942 u64 batch_size;
940943 int rc;
941944
945+ if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
946+ return -EPERM;
947+
942948 if (wq->state != IDXD_WQ_DISABLED)
943949 return -EPERM;
944950
drivers/dma/imx-sdma.c+16−16
@@ -198,12 +198,12 @@ struct sdma_script_start_addrs { · 197 unmodified lines
198198 s32 per_2_firi_addr;
199199 s32 mcu_2_firi_addr;
200200 s32 uart_2_per_addr;
201− s32 uart_2_mcu_ram_addr;
201+ s32 uart_2_mcu_addr;
202202 s32 per_2_app_addr;
203203 s32 mcu_2_app_addr;
204204 s32 per_2_per_addr;
205205 s32 uartsh_2_per_addr;
206− s32 uartsh_2_mcu_ram_addr;
206+ s32 uartsh_2_mcu_addr;
207207 s32 per_2_shp_addr;
208208 s32 mcu_2_shp_addr;
209209 s32 ata_2_mcu_addr;
@@ -232,8 +232,8 @@ struct sdma_script_start_addrs { · 22 unmodified lines
232232 s32 mcu_2_ecspi_addr;
233233 s32 mcu_2_sai_addr;
234234 s32 sai_2_mcu_addr;
235− s32 uart_2_mcu_addr;
236− s32 uartsh_2_mcu_addr;
235+ s32 uart_2_mcu_rom_addr;
236+ s32 uartsh_2_mcu_rom_addr;
237237 /* End of v3 array */
238238 s32 mcu_2_zqspi_addr;
239239 /* End of v4 array */
@@ -1796,17 +1796,17 @@ static void sdma_add_scripts(struct sdma_engine *sdma, · 1556 unmodified lines
17961796 saddr_arr[i] = addr_arr[i];
17971797
17981798 /*
1799− * get uart_2_mcu_addr/uartsh_2_mcu_addr rom script specially because
1800− * they are now replaced by uart_2_mcu_ram_addr/uartsh_2_mcu_ram_addr
1801− * to be compatible with legacy freescale/nxp sdma firmware, and they
1802− * are located in the bottom part of sdma_script_start_addrs which are
1803− * beyond the SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1.
1799+ * For compatibility with NXP internal legacy kernel before 4.19 which
1800+ * is based on uart ram script and mainline kernel based on uart rom
1801+ * script, both uart ram/rom scripts are present in newer sdma
1802+ * firmware. Use the rom versions if they are present (V3 or newer).
18041803 */
1805− if (addr->uart_2_mcu_addr)
1806− sdma->script_addrs->uart_2_mcu_addr = addr->uart_2_mcu_addr;
1807− if (addr->uartsh_2_mcu_addr)
1808− sdma->script_addrs->uartsh_2_mcu_addr = addr->uartsh_2_mcu_addr;
1809−
1804+ if (sdma->script_number >= SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V3) {
1805+ if (addr->uart_2_mcu_rom_addr)
1806+ sdma->script_addrs->uart_2_mcu_addr = addr->uart_2_mcu_rom_addr;
1807+ if (addr->uartsh_2_mcu_rom_addr)
1808+ sdma->script_addrs->uartsh_2_mcu_addr = addr->uartsh_2_mcu_rom_addr;
1809+ }
18101810 }
18111811
18121812 static void sdma_load_firmware(const struct firmware *fw, void *context)
@@ -1885,7 +1885,7 @@ static int sdma_event_remap(struct sdma_engine *sdma) · 72 unmodified lines
18851885 u32 reg, val, shift, num_map, i;
18861886 int ret = 0;
18871887
1888− if (IS_ERR(np) || IS_ERR(gpr_np))
1888+ if (IS_ERR(np) || !gpr_np)
18891889 goto out;
18901890
18911891 event_remap = of_find_property(np, propname, NULL);
@@ -1933,7 +1933,7 @@ static int sdma_event_remap(struct sdma_engine *sdma) · 41 unmodified lines
19331933 }
19341934
19351935 out:
1936− if (!IS_ERR(gpr_np))
1936+ if (gpr_np)
19371937 of_node_put(gpr_np);
19381938
19391939 return ret;
drivers/dma/mediatek/mtk-uart-apdma.c+6−3
@@ -274,7 +274,7 @@ static int mtk_uart_apdma_alloc_chan_resources(struct dma_chan *chan) · 273 unmodified lines
274274 unsigned int status;
275275 int ret;
276276
277− ret = pm_runtime_get_sync(mtkd->ddev.dev);
277+ ret = pm_runtime_resume_and_get(mtkd->ddev.dev);
278278 if (ret < 0) {
279279 pm_runtime_put_noidle(chan->device->dev);
280280 return ret;
@@ -288,18 +288,21 @@ static int mtk_uart_apdma_alloc_chan_resources(struct dma_chan *chan) · 7 unmodified lines
288288 ret = readx_poll_timeout(readl, c->base + VFF_EN,
289289 status, !status, 10, 100);
290290 if (ret)
291− return ret;
291+ goto err_pm;
292292
293293 ret = request_irq(c->irq, mtk_uart_apdma_irq_handler,
294294 IRQF_TRIGGER_NONE, KBUILD_MODNAME, chan);
295295 if (ret < 0) {
296296 dev_err(chan->device->dev, "Can't request dma IRQ\n");
297− return -EINVAL;
297+ ret = -EINVAL;
298+ goto err_pm;
298299 }
299300
300301 if (mtkd->support_33bits)
301302 mtk_uart_apdma_write(c, VFF_4G_SUPPORT, VFF_4G_SUPPORT_CLR_B);
302303
304+err_pm:
305+ pm_runtime_put_noidle(mtkd->ddev.dev);
303306 return ret;
304307 }
305308
drivers/edac/synopsys_edac.c+11−5
@@ -164,6 +164,11 @@ · 163 unmodified lines
164164 #define ECC_STAT_CECNT_SHIFT 8
165165 #define ECC_STAT_BITNUM_MASK 0x7F
166166
167+/* ECC error count register definitions */
168+#define ECC_ERRCNT_UECNT_MASK 0xFFFF0000
169+#define ECC_ERRCNT_UECNT_SHIFT 16
170+#define ECC_ERRCNT_CECNT_MASK 0xFFFF
171+
167172 /* DDR QOS Interrupt register definitions */
168173 #define DDR_QOS_IRQ_STAT_OFST 0x20200
169174 #define DDR_QOSUE_MASK 0x4
@@ -423,15 +428,16 @@ static int zynqmp_get_error_info(struct synps_edac_priv *priv) · 253 unmodified lines
423428 base = priv->baseaddr;
424429 p = &priv->stat;
425430
431+ regval = readl(base + ECC_ERRCNT_OFST);
432+ p->ce_cnt = regval & ECC_ERRCNT_CECNT_MASK;
433+ p->ue_cnt = (regval & ECC_ERRCNT_UECNT_MASK) >> ECC_ERRCNT_UECNT_SHIFT;
434+ if (!p->ce_cnt)
435+ goto ue_err;
436+
426437 regval = readl(base + ECC_STAT_OFST);
427438 if (!regval)
428439 return 1;
429440
430− p->ce_cnt = (regval & ECC_STAT_CECNT_MASK) >> ECC_STAT_CECNT_SHIFT;
431− p->ue_cnt = (regval & ECC_STAT_UECNT_MASK) >> ECC_STAT_UECNT_SHIFT;
432− if (!p->ce_cnt)
433− goto ue_err;
434−
435441 p->ceinfo.bitpos = (regval & ECC_STAT_BITNUM_MASK);
436442
437443 regval = readl(base + ECC_CEADDR0_OFST);
drivers/firmware/arm_scmi/clock.c+3−2
@@ -49,7 +49,7 @@ struct scmi_msg_resp_clock_describe_rates { · 48 unmodified lines
4949 struct {
5050 __le32 value_low;
5151 __le32 value_high;
52− } rate[0];
52+ } rate[];
5353 #define RATE_TO_U64(X) \
5454 ({ \
5555 typeof(X) x = (X); \
@@ -210,7 +210,8 @@ scmi_clock_describe_rates_get(const struct scmi_protocol_handle *ph, u32 clk_id, · 154 unmodified lines
210210
211211 if (rate_discrete && rate) {
212212 clk->list.num_rates = tot_rate_cnt;
213− sort(rate, tot_rate_cnt, sizeof(*rate), rate_cmp_func, NULL);
213+ sort(clk->list.rates, tot_rate_cnt, sizeof(*rate),
214+ rate_cmp_func, NULL);
214215 }
215216
216217 clk->rate_discrete = rate_discrete;
drivers/firmware/arm_scmi/driver.c+2−1
@@ -679,7 +679,8 @@ static void scmi_handle_response(struct scmi_chan_info *cinfo, · 678 unmodified lines
679679
680680 xfer = scmi_xfer_command_acquire(cinfo, msg_hdr);
681681 if (IS_ERR(xfer)) {
682− scmi_clear_channel(info, cinfo);
682+ if (MSG_XTRACT_TYPE(msg_hdr) == MSG_TYPE_DELAYED_RESP)
683+ scmi_clear_channel(info, cinfo);
683684 return;
684685 }
685686
drivers/firmware/arm_scmi/optee.c+4−4
@@ -405,8 +405,8 @@ static int scmi_optee_chan_free(int id, void *p, void *data) · 404 unmodified lines
405405 return 0;
406406 }
407407
408−static struct scmi_shared_mem *get_channel_shm(struct scmi_optee_channel *chan,
409− struct scmi_xfer *xfer)
408+static struct scmi_shared_mem __iomem *
409+get_channel_shm(struct scmi_optee_channel *chan, struct scmi_xfer *xfer)
410410 {
411411 if (!chan)
412412 return NULL;
@@ -419,7 +419,7 @@ static int scmi_optee_send_message(struct scmi_chan_info *cinfo, · 6 unmodified lines
419419 struct scmi_xfer *xfer)
420420 {
421421 struct scmi_optee_channel *channel = cinfo->transport_info;
422− struct scmi_shared_mem *shmem = get_channel_shm(channel, xfer);
422+ struct scmi_shared_mem __iomem *shmem = get_channel_shm(channel, xfer);
423423 int ret;
424424
425425 mutex_lock(&channel->mu);
@@ -436,7 +436,7 @@ static void scmi_optee_fetch_response(struct scmi_chan_info *cinfo, · 10 unmodified lines
436436 struct scmi_xfer *xfer)
437437 {
438438 struct scmi_optee_channel *channel = cinfo->transport_info;
439− struct scmi_shared_mem *shmem = get_channel_shm(channel, xfer);
439+ struct scmi_shared_mem __iomem *shmem = get_channel_shm(channel, xfer);
440440
441441 shmem_fetch_response(shmem, xfer);
442442 }
drivers/firmware/cirrus/cs_dsp.c+1−2
@@ -955,8 +955,7 @@ static int cs_dsp_create_control(struct cs_dsp *dsp, · 954 unmodified lines
955955 ctl->alg_region = *alg_region;
956956 if (subname && dsp->fw_ver >= 2) {
957957 ctl->subname_len = subname_len;
958− ctl->subname = kmemdup(subname,
959− strlen(subname) + 1, GFP_KERNEL);
958+ ctl->subname = kasprintf(GFP_KERNEL, "%.*s", subname_len, subname);
960959 if (!ctl->subname) {
961960 ret = -ENOMEM;
962961 goto err_ctl;
drivers/gpio/gpio-sim.c+2−2
@@ -134,7 +134,7 @@ static int gpio_sim_get_multiple(struct gpio_chip *gc, · 133 unmodified lines
134134 struct gpio_sim_chip *chip = gpiochip_get_data(gc);
135135
136136 mutex_lock(&chip->lock);
137− bitmap_copy(bits, chip->value_map, gc->ngpio);
137+ bitmap_replace(bits, bits, chip->value_map, mask, gc->ngpio);
138138 mutex_unlock(&chip->lock);
139139
140140 return 0;
@@ -146,7 +146,7 @@ static void gpio_sim_set_multiple(struct gpio_chip *gc, · 5 unmodified lines
146146 struct gpio_sim_chip *chip = gpiochip_get_data(gc);
147147
148148 mutex_lock(&chip->lock);
149− bitmap_copy(chip->value_map, bits, gc->ngpio);
149+ bitmap_replace(chip->value_map, chip->value_map, bits, mask, gc->ngpio);
150150 mutex_unlock(&chip->lock);
151151 }
152152
drivers/gpio/gpiolib-acpi.c+12−10
@@ -108,7 +108,7 @@ static int acpi_gpiochip_find(struct gpio_chip *gc, void *data) · 107 unmodified lines
108108 * controller does not have GPIO chip registered at the moment. This is to
109109 * support probe deferral.
110110 */
111−static struct gpio_desc *acpi_get_gpiod(char *path, int pin)
111+static struct gpio_desc *acpi_get_gpiod(char *path, unsigned int pin)
112112 {
113113 struct gpio_chip *chip;
114114 acpi_handle handle;
@@ -136,7 +136,7 @@ static struct gpio_desc *acpi_get_gpiod(char *path, int pin) · 21 unmodified lines
136136 * as it is intended for use outside of the GPIO layer (in a similar fashion to
137137 * gpiod_get_index() for example) it also holds a reference to the GPIO device.
138138 */
139−struct gpio_desc *acpi_get_and_request_gpiod(char *path, int pin, char *label)
139+struct gpio_desc *acpi_get_and_request_gpiod(char *path, unsigned int pin, char *label)
140140 {
141141 struct gpio_desc *gpio;
142142 int ret;
@@ -317,11 +317,12 @@ static struct gpio_desc *acpi_request_own_gpiod(struct gpio_chip *chip, · 174 unmodified lines
317317 return desc;
318318 }
319319
320−static bool acpi_gpio_in_ignore_list(const char *controller_in, int pin_in)
320+static bool acpi_gpio_in_ignore_list(const char *controller_in, unsigned int pin_in)
321321 {
322322 const char *controller, *pin_str;
323− int len, pin;
323+ unsigned int pin;
324324 char *endp;
325+ int len;
325326
326327 controller = ignore_wake;
327328 while (controller) {
@@ -354,13 +355,13 @@ err: · 26 unmodified lines
354355 static bool acpi_gpio_irq_is_wake(struct device *parent,
355356 struct acpi_resource_gpio *agpio)
356357 {
357− int pin = agpio->pin_table[0];
358+ unsigned int pin = agpio->pin_table[0];
358359
359360 if (agpio->wake_capable != ACPI_WAKE_CAPABLE)
360361 return false;
361362
362363 if (acpi_gpio_in_ignore_list(dev_name(parent), pin)) {
363− dev_info(parent, "Ignoring wakeup on pin %d\n", pin);
364+ dev_info(parent, "Ignoring wakeup on pin %u\n", pin);
364365 return false;
365366 }
366367
@@ -378,7 +379,8 @@ static acpi_status acpi_gpiochip_alloc_event(struct acpi_resource *ares, · 11 unmodified lines
378379 struct acpi_gpio_event *event;
379380 irq_handler_t handler = NULL;
380381 struct gpio_desc *desc;
381− int ret, pin, irq;
382+ unsigned int pin;
383+ int ret, irq;
382384
383385 if (!acpi_gpio_get_irq_resource(ares, &agpio))
384386 return AE_OK;
@@ -387,8 +389,8 @@ static acpi_status acpi_gpiochip_alloc_event(struct acpi_resource *ares, · 2 unmodified lines
387389 pin = agpio->pin_table[0];
388390
389391 if (pin <= 255) {
390− char ev_name[5];
391− sprintf(ev_name, "_%c%02hhX",
392+ char ev_name[8];
393+ sprintf(ev_name, "_%c%02X",
392394 agpio->triggering == ACPI_EDGE_SENSITIVE ? 'E' : 'L',
393395 pin);
394396 if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle)))
@@ -1098,7 +1100,7 @@ acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address, · 703 unmodified lines
10981100
10991101 length = min_t(u16, agpio->pin_table_length, pin_index + bits);
11001102 for (i = pin_index; i < length; ++i) {
1101− int pin = agpio->pin_table[i];
1103+ unsigned int pin = agpio->pin_table[i];
11021104 struct acpi_gpio_connection *conn;
11031105 struct gpio_desc *desc;
11041106 bool found;
drivers/gpio/gpiolib.c+2−2
@@ -1601,8 +1601,6 @@ static int gpiochip_add_irqchip(struct gpio_chip *gc, · 1600 unmodified lines
16011601
16021602 gpiochip_set_irq_hooks(gc);
16031603
1604− acpi_gpiochip_request_interrupts(gc);
1605−
16061604 /*
16071605 * Using barrier() here to prevent compiler from reordering
16081606 * gc->irq.initialized before initialization of above
@@ -1612,6 +1610,8 @@ static int gpiochip_add_irqchip(struct gpio_chip *gc, · 3 unmodified lines
16121610
16131611 gc->irq.initialized = true;
16141612
1613+ acpi_gpiochip_request_interrupts(gc);
1614+
16151615 return 0;
16161616 }
16171617
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c+15−6
@@ -128,6 +128,8 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, union drm_amdgpu_cs · 127 unmodified lines
128128 goto free_chunk;
129129 }
130130
131+ mutex_lock(&p->ctx->lock);
132+
131133 /* skip guilty context job */
132134 if (atomic_read(&p->ctx->guilty) == 1) {
133135 ret = -ECANCELED;
@@ -709,6 +711,7 @@ static void amdgpu_cs_parser_fini(struct amdgpu_cs_parser *parser, int error, · 575 unmodified lines
709711 dma_fence_put(parser->fence);
710712
711713 if (parser->ctx) {
714+ mutex_unlock(&parser->ctx->lock);
712715 amdgpu_ctx_put(parser->ctx);
713716 }
714717 if (parser->bo_list)
@@ -1157,6 +1160,9 @@ static int amdgpu_cs_dependencies(struct amdgpu_device *adev, · 442 unmodified lines
11571160 {
11581161 int i, r;
11591162
1163+ /* TODO: Investigate why we still need the context lock */
1164+ mutex_unlock(&p->ctx->lock);
1165+
11601166 for (i = 0; i < p->nchunks; ++i) {
11611167 struct amdgpu_cs_chunk *chunk;
11621168
@@ -1167,32 +1173,34 @@ static int amdgpu_cs_dependencies(struct amdgpu_device *adev, · 4 unmodified lines
11671173 case AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES:
11681174 r = amdgpu_cs_process_fence_dep(p, chunk);
11691175 if (r)
1170− return r;
1176+ goto out;
11711177 break;
11721178 case AMDGPU_CHUNK_ID_SYNCOBJ_IN:
11731179 r = amdgpu_cs_process_syncobj_in_dep(p, chunk);
11741180 if (r)
1175− return r;
1181+ goto out;
11761182 break;
11771183 case AMDGPU_CHUNK_ID_SYNCOBJ_OUT:
11781184 r = amdgpu_cs_process_syncobj_out_dep(p, chunk);
11791185 if (r)
1180− return r;
1186+ goto out;
11811187 break;
11821188 case AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_WAIT:
11831189 r = amdgpu_cs_process_syncobj_timeline_in_dep(p, chunk);
11841190 if (r)
1185− return r;
1191+ goto out;
11861192 break;
11871193 case AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_SIGNAL:
11881194 r = amdgpu_cs_process_syncobj_timeline_out_dep(p, chunk);
11891195 if (r)
1190− return r;
1196+ goto out;
11911197 break;
11921198 }
11931199 }
11941200
1195− return 0;
1201+out:
1202+ mutex_lock(&p->ctx->lock);
1203+ return r;
11961204 }
11971205
11981206 static void amdgpu_cs_post_dependencies(struct amdgpu_cs_parser *p)
@@ -1368,6 +1376,7 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) · 169 unmodified lines
13681376 goto out;
13691377
13701378 r = amdgpu_cs_submit(&parser, cs);
1379+
13711380 out:
13721381 amdgpu_cs_parser_fini(&parser, r, reserved_buffers);
13731382
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c+2−0
@@ -237,6 +237,7 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev, · 236 unmodified lines
237237
238238 kref_init(&ctx->refcount);
239239 spin_lock_init(&ctx->ring_lock);
240+ mutex_init(&ctx->lock);
240241
241242 ctx->reset_counter = atomic_read(&adev->gpu_reset_counter);
242243 ctx->reset_counter_query = ctx->reset_counter;
@@ -357,6 +358,7 @@ static void amdgpu_ctx_fini(struct kref *ref) · 114 unmodified lines
357358 drm_dev_exit(idx);
358359 }
359360
361+ mutex_destroy(&ctx->lock);
360362 kfree(ctx);
361363 }
362364
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h+1−0
@@ -49,6 +49,7 @@ struct amdgpu_ctx { · 48 unmodified lines
4949 bool preamble_presented;
5050 int32_t init_priority;
5151 int32_t override_priority;
52+ struct mutex lock;
5253 atomic_t guilty;
5354 unsigned long ras_counter_ce;
5455 unsigned long ras_counter_ue;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c+82−41
@@ -2323,18 +2323,23 @@ static int amdgpu_pmops_suspend(struct device *dev) · 2322 unmodified lines
23232323 {
23242324 struct drm_device *drm_dev = dev_get_drvdata(dev);
23252325 struct amdgpu_device *adev = drm_to_adev(drm_dev);
2326− int r;
23272326
23282327 if (amdgpu_acpi_is_s0ix_active(adev))
23292328 adev->in_s0ix = true;
23302329 else
23312330 adev->in_s3 = true;
2332− r = amdgpu_device_suspend(drm_dev, true);
2333− if (r)
2334− return r;
2331+ return amdgpu_device_suspend(drm_dev, true);
2332+}
2333+
2334+static int amdgpu_pmops_suspend_noirq(struct device *dev)
2335+{
2336+ struct drm_device *drm_dev = dev_get_drvdata(dev);
2337+ struct amdgpu_device *adev = drm_to_adev(drm_dev);
2338+
23352339 if (!adev->in_s0ix)
2336− r = amdgpu_asic_reset(adev);
2337− return r;
2340+ return amdgpu_asic_reset(adev);
2341+
2342+ return 0;
23382343 }
23392344
23402345 static int amdgpu_pmops_resume(struct device *dev)
@@ -2390,6 +2395,71 @@ static int amdgpu_pmops_restore(struct device *dev) · 49 unmodified lines
23902395 return amdgpu_device_resume(drm_dev, true);
23912396 }
23922397
2398+static int amdgpu_runtime_idle_check_display(struct device *dev)
2399+{
2400+ struct pci_dev *pdev = to_pci_dev(dev);
2401+ struct drm_device *drm_dev = pci_get_drvdata(pdev);
2402+ struct amdgpu_device *adev = drm_to_adev(drm_dev);
2403+
2404+ if (adev->mode_info.num_crtc) {
2405+ struct drm_connector *list_connector;
2406+ struct drm_connector_list_iter iter;
2407+ int ret = 0;
2408+
2409+ /* XXX: Return busy if any displays are connected to avoid
2410+ * possible display wakeups after runtime resume due to
2411+ * hotplug events in case any displays were connected while
2412+ * the GPU was in suspend. Remove this once that is fixed.
2413+ */
2414+ mutex_lock(&drm_dev->mode_config.mutex);
2415+ drm_connector_list_iter_begin(drm_dev, &iter);
2416+ drm_for_each_connector_iter(list_connector, &iter) {
2417+ if (list_connector->status == connector_status_connected) {
2418+ ret = -EBUSY;
2419+ break;
2420+ }
2421+ }
2422+ drm_connector_list_iter_end(&iter);
2423+ mutex_unlock(&drm_dev->mode_config.mutex);
2424+
2425+ if (ret)
2426+ return ret;
2427+
2428+ if (amdgpu_device_has_dc_support(adev)) {
2429+ struct drm_crtc *crtc;
2430+
2431+ drm_for_each_crtc(crtc, drm_dev) {
2432+ drm_modeset_lock(&crtc->mutex, NULL);
2433+ if (crtc->state->active)
2434+ ret = -EBUSY;
2435+ drm_modeset_unlock(&crtc->mutex);
2436+ if (ret < 0)
2437+ break;
2438+ }
2439+ } else {
2440+ mutex_lock(&drm_dev->mode_config.mutex);
2441+ drm_modeset_lock(&drm_dev->mode_config.connection_mutex, NULL);
2442+
2443+ drm_connector_list_iter_begin(drm_dev, &iter);
2444+ drm_for_each_connector_iter(list_connector, &iter) {
2445+ if (list_connector->dpms == DRM_MODE_DPMS_ON) {
2446+ ret = -EBUSY;
2447+ break;
2448+ }
2449+ }
2450+
2451+ drm_connector_list_iter_end(&iter);
2452+
2453+ drm_modeset_unlock(&drm_dev->mode_config.connection_mutex);
2454+ mutex_unlock(&drm_dev->mode_config.mutex);
2455+ }
2456+ if (ret)
2457+ return ret;
2458+ }
2459+
2460+ return 0;
2461+}
2462+
23932463 static int amdgpu_pmops_runtime_suspend(struct device *dev)
23942464 {
23952465 struct pci_dev *pdev = to_pci_dev(dev);
@@ -2402,6 +2472,10 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev) · 6 unmodified lines
24022472 return -EBUSY;
24032473 }
24042474
2475+ ret = amdgpu_runtime_idle_check_display(dev);
2476+ if (ret)
2477+ return ret;
2478+
24052479 /* wait for all rings to drain before suspending */
24062480 for (i = 0; i < AMDGPU_MAX_RINGS; i++) {
24072481 struct amdgpu_ring *ring = adev->rings[i];
@@ -2511,41 +2585,7 @@ static int amdgpu_pmops_runtime_idle(struct device *dev) · 103 unmodified lines
25112585 return -EBUSY;
25122586 }
25132587
2514− if (amdgpu_device_has_dc_support(adev)) {
2515− struct drm_crtc *crtc;
2516−
2517− drm_for_each_crtc(crtc, drm_dev) {
2518− drm_modeset_lock(&crtc->mutex, NULL);
2519− if (crtc->state->active)
2520− ret = -EBUSY;
2521− drm_modeset_unlock(&crtc->mutex);
2522− if (ret < 0)
2523− break;
2524− }
2525−
2526− } else {
2527− struct drm_connector *list_connector;
2528− struct drm_connector_list_iter iter;
2529−
2530− mutex_lock(&drm_dev->mode_config.mutex);
2531− drm_modeset_lock(&drm_dev->mode_config.connection_mutex, NULL);
2532−
2533− drm_connector_list_iter_begin(drm_dev, &iter);
2534− drm_for_each_connector_iter(list_connector, &iter) {
2535− if (list_connector->dpms == DRM_MODE_DPMS_ON) {
2536− ret = -EBUSY;
2537− break;
2538− }
2539− }
2540−
2541− drm_connector_list_iter_end(&iter);
2542−
2543− drm_modeset_unlock(&drm_dev->mode_config.connection_mutex);
2544− mutex_unlock(&drm_dev->mode_config.mutex);
2545− }
2546−
2547− if (ret == -EBUSY)
2548− DRM_DEBUG_DRIVER("failing to power off - crtc active\n");
2588+ ret = amdgpu_runtime_idle_check_display(dev);
25492589
25502590 pm_runtime_mark_last_busy(dev);
25512591 pm_runtime_autosuspend(dev);
@@ -2575,6 +2615,7 @@ static const struct dev_pm_ops amdgpu_pm_ops = { · 23 unmodified lines
25752615 .prepare = amdgpu_pmops_prepare,
25762616 .complete = amdgpu_pmops_complete,
25772617 .suspend = amdgpu_pmops_suspend,
2618+ .suspend_noirq = amdgpu_pmops_suspend_noirq,
25782619 .resume = amdgpu_pmops_resume,
25792620 .freeze = amdgpu_pmops_freeze,
25802621 .thaw = amdgpu_pmops_thaw,
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c+1−1
@@ -52,7 +52,7 @@ · 51 unmodified lines
5252 #define FIRMWARE_ALDEBARAN "amdgpu/aldebaran_vcn.bin"
5353 #define FIRMWARE_BEIGE_GOBY "amdgpu/beige_goby_vcn.bin"
5454 #define FIRMWARE_YELLOW_CARP "amdgpu/yellow_carp_vcn.bin"
55−#define FIRMWARE_VCN_3_1_2 "amdgpu/vcn_3_1_2_vcn.bin"
55+#define FIRMWARE_VCN_3_1_2 "amdgpu/vcn_3_1_2.bin"
5656
5757 MODULE_FIRMWARE(FIRMWARE_RAVEN);
5858 MODULE_FIRMWARE(FIRMWARE_PICASSO);
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c+2−0
@@ -1205,6 +1205,8 @@ static const struct amdgpu_gfxoff_quirk amdgpu_gfxoff_quirk_list[] = { · 1204 unmodified lines
12051205 { 0x1002, 0x15dd, 0x103c, 0x83e7, 0xd3 },
12061206 /* GFXOFF is unstable on C6 parts with a VBIOS 113-RAVEN-114 */
12071207 { 0x1002, 0x15dd, 0x1002, 0x15dd, 0xc6 },
1208+ /* Apple MacBook Pro (15-inch, 2019) Radeon Pro Vega 20 4 GB */
1209+ { 0x1002, 0x69af, 0x106b, 0x019a, 0xc0 },
12081210 { 0, 0, 0, 0, 0 },
12091211 };
12101212
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c+10−0
@@ -1151,6 +1151,16 @@ static int gmc_v10_0_set_clockgating_state(void *handle, · 1150 unmodified lines
11511151 int r;
11521152 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
11531153
1154+ /*
1155+ * The issue mmhub can't disconnect from DF with MMHUB clock gating being disabled
1156+ * is a new problem observed at DF 3.0.3, however with the same suspend sequence not
1157+ * seen any issue on the DF 3.0.2 series platform.
1158+ */
1159+ if (adev->in_s0ix && adev->ip_versions[DF_HWIP][0] > IP_VERSION(3, 0, 2)) {
1160+ dev_dbg(adev->dev, "keep mmhub clock gating being enabled for s0ix\n");
1161+ return 0;
1162+ }
1163+
11541164 r = adev->mmhub.funcs->set_clockgating(adev, state);
11551165 if (r)
11561166 return r;
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c+37−46
@@ -130,19 +130,33 @@ void program_sh_mem_settings(struct device_queue_manager *dqm, · 129 unmodified lines
130130 }
131131
132132 static void increment_queue_count(struct device_queue_manager *dqm,
133− enum kfd_queue_type type)
133+ struct qcm_process_device *qpd,
134+ struct queue *q)
134135 {
135136 dqm->active_queue_count++;
136− if (type == KFD_QUEUE_TYPE_COMPUTE || type == KFD_QUEUE_TYPE_DIQ)
137+ if (q->properties.type == KFD_QUEUE_TYPE_COMPUTE ||
138+ q->properties.type == KFD_QUEUE_TYPE_DIQ)
137139 dqm->active_cp_queue_count++;
140+
141+ if (q->properties.is_gws) {
142+ dqm->gws_queue_count++;
143+ qpd->mapped_gws_queue = true;
144+ }
138145 }
139146
140147 static void decrement_queue_count(struct device_queue_manager *dqm,
141− enum kfd_queue_type type)
148+ struct qcm_process_device *qpd,
149+ struct queue *q)
142150 {
143151 dqm->active_queue_count--;
144− if (type == KFD_QUEUE_TYPE_COMPUTE || type == KFD_QUEUE_TYPE_DIQ)
152+ if (q->properties.type == KFD_QUEUE_TYPE_COMPUTE ||
153+ q->properties.type == KFD_QUEUE_TYPE_DIQ)
145154 dqm->active_cp_queue_count--;
155+
156+ if (q->properties.is_gws) {
157+ dqm->gws_queue_count--;
158+ qpd->mapped_gws_queue = false;
159+ }
146160 }
147161
148162 /*
@@ -412,7 +426,7 @@ add_queue_to_list: · 263 unmodified lines
412426 list_add(&q->list, &qpd->queues_list);
413427 qpd->queue_count++;
414428 if (q->properties.is_active)
415− increment_queue_count(dqm, q->properties.type);
429+ increment_queue_count(dqm, qpd, q);
416430
417431 /*
418432 * Unconditionally increment this counter, regardless of the queue's
@@ -601,13 +615,8 @@ static int destroy_queue_nocpsch_locked(struct device_queue_manager *dqm, · 182 unmodified lines
601615 deallocate_vmid(dqm, qpd, q);
602616 }
603617 qpd->queue_count--;
604− if (q->properties.is_active) {
605− decrement_queue_count(dqm, q->properties.type);
606− if (q->properties.is_gws) {
607− dqm->gws_queue_count--;
608− qpd->mapped_gws_queue = false;
609− }
610− }
618+ if (q->properties.is_active)
619+ decrement_queue_count(dqm, qpd, q);
611620
612621 return retval;
613622 }
@@ -700,12 +709,11 @@ static int update_queue(struct device_queue_manager *dqm, struct queue *q, · 86 unmodified lines
700709 * dqm->active_queue_count to determine whether a new runlist must be
701710 * uploaded.
702711 */
703− if (q->properties.is_active && !prev_active)
704− increment_queue_count(dqm, q->properties.type);
705− else if (!q->properties.is_active && prev_active)
706− decrement_queue_count(dqm, q->properties.type);
707−
708− if (q->gws && !q->properties.is_gws) {
712+ if (q->properties.is_active && !prev_active) {
713+ increment_queue_count(dqm, &pdd->qpd, q);
714+ } else if (!q->properties.is_active && prev_active) {
715+ decrement_queue_count(dqm, &pdd->qpd, q);
716+ } else if (q->gws && !q->properties.is_gws) {
709717 if (q->properties.is_active) {
710718 dqm->gws_queue_count++;
711719 pdd->qpd.mapped_gws_queue = true;
@@ -767,11 +775,7 @@ static int evict_process_queues_nocpsch(struct device_queue_manager *dqm, · 55 unmodified lines
767775 mqd_mgr = dqm->mqd_mgrs[get_mqd_type_from_queue_type(
768776 q->properties.type)];
769777 q->properties.is_active = false;
770− decrement_queue_count(dqm, q->properties.type);
771− if (q->properties.is_gws) {
772− dqm->gws_queue_count--;
773− qpd->mapped_gws_queue = false;
774− }
778+ decrement_queue_count(dqm, qpd, q);
775779
776780 if (WARN_ONCE(!dqm->sched_running, "Evict when stopped\n"))
777781 continue;
@@ -817,7 +821,7 @@ static int evict_process_queues_cpsch(struct device_queue_manager *dqm, · 39 unmodified lines
817821 continue;
818822
819823 q->properties.is_active = false;
820− decrement_queue_count(dqm, q->properties.type);
824+ decrement_queue_count(dqm, qpd, q);
821825 }
822826 pdd->last_evict_timestamp = get_jiffies_64();
823827 retval = execute_queues_cpsch(dqm,
@@ -888,11 +892,7 @@ static int restore_process_queues_nocpsch(struct device_queue_manager *dqm, · 64 unmodified lines
888892 mqd_mgr = dqm->mqd_mgrs[get_mqd_type_from_queue_type(
889893 q->properties.type)];
890894 q->properties.is_active = true;
891− increment_queue_count(dqm, q->properties.type);
892− if (q->properties.is_gws) {
893− dqm->gws_queue_count++;
894− qpd->mapped_gws_queue = true;
895− }
895+ increment_queue_count(dqm, qpd, q);
896896
897897 if (WARN_ONCE(!dqm->sched_running, "Restore when stopped\n"))
898898 continue;
@@ -950,7 +950,7 @@ static int restore_process_queues_cpsch(struct device_queue_manager *dqm, · 51 unmodified lines
950950 continue;
951951
952952 q->properties.is_active = true;
953− increment_queue_count(dqm, q->properties.type);
953+ increment_queue_count(dqm, &pdd->qpd, q);
954954 }
955955 retval = execute_queues_cpsch(dqm,
956956 KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
@@ -1378,7 +1378,7 @@ static int create_kernel_queue_cpsch(struct device_queue_manager *dqm, · 421 unmodified lines
13781378 dqm->total_queue_count);
13791379
13801380 list_add(&kq->list, &qpd->priv_queue_list);
1381− increment_queue_count(dqm, kq->queue->properties.type);
1381+ increment_queue_count(dqm, qpd, kq->queue);
13821382 qpd->is_debug = true;
13831383 execute_queues_cpsch(dqm, KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
13841384 dqm_unlock(dqm);
@@ -1392,7 +1392,7 @@ static void destroy_kernel_queue_cpsch(struct device_queue_manager *dqm, · 7 unmodified lines
13921392 {
13931393 dqm_lock(dqm);
13941394 list_del(&kq->list);
1395− decrement_queue_count(dqm, kq->queue->properties.type);
1395+ decrement_queue_count(dqm, qpd, kq->queue);
13961396 qpd->is_debug = false;
13971397 execute_queues_cpsch(dqm, KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES, 0);
13981398 /*
@@ -1467,7 +1467,7 @@ static int create_queue_cpsch(struct device_queue_manager *dqm, struct queue *q, · 68 unmodified lines
14671467 qpd->queue_count++;
14681468
14691469 if (q->properties.is_active) {
1470− increment_queue_count(dqm, q->properties.type);
1470+ increment_queue_count(dqm, qpd, q);
14711471
14721472 execute_queues_cpsch(dqm,
14731473 KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
@@ -1683,15 +1683,11 @@ static int destroy_queue_cpsch(struct device_queue_manager *dqm, · 209 unmodified lines
16831683 list_del(&q->list);
16841684 qpd->queue_count--;
16851685 if (q->properties.is_active) {
1686− decrement_queue_count(dqm, q->properties.type);
1686+ decrement_queue_count(dqm, qpd, q);
16871687 retval = execute_queues_cpsch(dqm,
16881688 KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
16891689 if (retval == -ETIME)
16901690 qpd->reset_wavefronts = true;
1691− if (q->properties.is_gws) {
1692− dqm->gws_queue_count--;
1693− qpd->mapped_gws_queue = false;
1694− }
16951691 }
16961692
16971693 /*
@@ -1932,7 +1928,7 @@ static int process_termination_cpsch(struct device_queue_manager *dqm, · 234 unmodified lines
19321928 /* Clean all kernel queues */
19331929 list_for_each_entry_safe(kq, kq_next, &qpd->priv_queue_list, list) {
19341930 list_del(&kq->list);
1935− decrement_queue_count(dqm, kq->queue->properties.type);
1931+ decrement_queue_count(dqm, qpd, kq->queue);
19361932 qpd->is_debug = false;
19371933 dqm->total_queue_count--;
19381934 filter = KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES;
@@ -1945,13 +1941,8 @@ static int process_termination_cpsch(struct device_queue_manager *dqm, · 6 unmodified lines
19451941 else if (q->properties.type == KFD_QUEUE_TYPE_SDMA_XGMI)
19461942 deallocate_sdma_queue(dqm, q);
19471943
1948− if (q->properties.is_active) {
1949− decrement_queue_count(dqm, q->properties.type);
1950− if (q->properties.is_gws) {
1951− dqm->gws_queue_count--;
1952− qpd->mapped_gws_queue = false;
1953− }
1954− }
1944+ if (q->properties.is_active)
1945+ decrement_queue_count(dqm, qpd, q);
19551946
19561947 dqm->total_queue_count--;
19571948 }
drivers/gpu/drm/amd/amdkfd/kfd_priv.h+1−1
@@ -1103,7 +1103,7 @@ struct kfd_criu_queue_priv_data { · 1102 unmodified lines
11031103 uint32_t priority;
11041104 uint32_t q_percent;
11051105 uint32_t doorbell_id;
1106− uint32_t is_gws;
1106+ uint32_t gws;
11071107 uint32_t sdma_id;
11081108 uint32_t eop_ring_buffer_size;
11091109 uint32_t ctx_save_restore_area_size;
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c+7−3
@@ -636,6 +636,8 @@ static int criu_checkpoint_queue(struct kfd_process_device *pdd, · 635 unmodified lines
636636 q_data->ctx_save_restore_area_size =
637637 q->properties.ctx_save_restore_area_size;
638638
639+ q_data->gws = !!q->gws;
640+
639641 ret = pqm_checkpoint_mqd(&pdd->process->pqm, q->properties.queue_id, mqd, ctl_stack);
640642 if (ret) {
641643 pr_err("Failed checkpoint queue_mqd (%d)\n", ret);
@@ -743,7 +745,6 @@ static void set_queue_properties_from_criu(struct queue_properties *qp, · 101 unmodified lines
743745 struct kfd_criu_queue_priv_data *q_data)
744746 {
745747 qp->is_interop = false;
746− qp->is_gws = q_data->is_gws;
747748 qp->queue_percent = q_data->q_percent;
748749 qp->priority = q_data->priority;
749750 qp->queue_address = q_data->q_address;
@@ -826,12 +827,15 @@ int kfd_criu_restore_queue(struct kfd_process *p, · 76 unmodified lines
826827 NULL);
827828 if (ret) {
828829 pr_err("Failed to create new queue err:%d\n", ret);
829− ret = -EINVAL;
830+ goto exit;
830831 }
831832
833+ if (q_data->gws)
834+ ret = pqm_set_gws(&p->pqm, q_data->q_id, pdd->dev->gws);
835+
832836 exit:
833837 if (ret)
834− pr_err("Failed to create queue (%d)\n", ret);
838+ pr_err("Failed to restore queue (%d)\n", ret);
835839 else
836840 pr_debug("Queue id %d was restored successfully\n", queue_id);
837841
drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c+1−1
@@ -374,7 +374,7 @@ void dce_clock_read_ss_info(struct clk_mgr_internal *clk_mgr_dce) · 373 unmodified lines
374374 clk_mgr_dce->dprefclk_ss_percentage =
375375 info.spread_spectrum_percentage;
376376 }
377− if (clk_mgr_dce->base.ctx->dc->debug.ignore_dpref_ss)
377+ if (clk_mgr_dce->base.ctx->dc->config.ignore_dpref_ss)
378378 clk_mgr_dce->dprefclk_ss_percentage = 0;
379379 }
380380 }
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c+2−2
@@ -686,8 +686,8 @@ void dcn316_clk_mgr_construct( · 685 unmodified lines
686686 clk_mgr->base.base.dprefclk_khz = dcn316_smu_get_dpref_clk(&clk_mgr->base);
687687 clk_mgr->base.dccg->ref_dtbclk_khz = clk_mgr->base.base.dprefclk_khz;
688688 dce_clock_read_ss_info(&clk_mgr->base);
689− clk_mgr->base.dccg->ref_dtbclk_khz =
690− dce_adjust_dp_ref_freq_for_ss(&clk_mgr->base, clk_mgr->base.base.dprefclk_khz);
689+ /*clk_mgr->base.dccg->ref_dtbclk_khz =
690+ dce_adjust_dp_ref_freq_for_ss(&clk_mgr->base, clk_mgr->base.base.dprefclk_khz);*/
691691
692692 clk_mgr->base.base.bw_params = &dcn316_bw_params;
693693
drivers/gpu/drm/amd/display/dc/dc.h+1−1
@@ -340,6 +340,7 @@ struct dc_config { · 339 unmodified lines
340340 bool is_asymmetric_memory;
341341 bool is_single_rank_dimm;
342342 bool use_pipe_ctx_sync_logic;
343+ bool ignore_dpref_ss;
343344 };
344345
345346 enum visual_confirm {
@@ -729,7 +730,6 @@ struct dc_debug_options { · 383 unmodified lines
729730 bool apply_vendor_specific_lttpr_wa;
730731 bool extended_blank_optimization;
731732 union aux_wake_wa_options aux_wake_wa;
732− bool ignore_dpref_ss;
733733 uint8_t psr_power_use_phy_fsm;
734734 };
735735
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c+9−5
@@ -2522,14 +2522,18 @@ void dcn10_update_mpcc(struct dc *dc, struct pipe_ctx *pipe_ctx) · 2521 unmodified lines
25222522 struct mpc *mpc = dc->res_pool->mpc;
25232523 struct mpc_tree *mpc_tree_params = &(pipe_ctx->stream_res.opp->mpc_tree_params);
25242524
2525− if (per_pixel_alpha)
2526− blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA;
2527− else
2528− blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_GLOBAL_ALPHA;
2529−
25302525 blnd_cfg.overlap_only = false;
25312526 blnd_cfg.global_gain = 0xff;
25322527
2528+ if (per_pixel_alpha && pipe_ctx->plane_state->global_alpha) {
2529+ blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA_COMBINED_GLOBAL_GAIN;
2530+ blnd_cfg.global_gain = pipe_ctx->plane_state->global_alpha_value;
2531+ } else if (per_pixel_alpha) {
2532+ blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA;
2533+ } else {
2534+ blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_GLOBAL_ALPHA;
2535+ }
2536+
25332537 if (pipe_ctx->plane_state->global_alpha)
25342538 blnd_cfg.global_alpha = pipe_ctx->plane_state->global_alpha_value;
25352539 else
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c+9−5
@@ -2344,14 +2344,18 @@ void dcn20_update_mpcc(struct dc *dc, struct pipe_ctx *pipe_ctx) · 2343 unmodified lines
23442344 struct mpc *mpc = dc->res_pool->mpc;
23452345 struct mpc_tree *mpc_tree_params = &(pipe_ctx->stream_res.opp->mpc_tree_params);
23462346
2347− if (per_pixel_alpha)
2348− blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA;
2349− else
2350− blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_GLOBAL_ALPHA;
2351−
23522347 blnd_cfg.overlap_only = false;
23532348 blnd_cfg.global_gain = 0xff;
23542349
2350+ if (per_pixel_alpha && pipe_ctx->plane_state->global_alpha) {
2351+ blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA_COMBINED_GLOBAL_GAIN;
2352+ blnd_cfg.global_gain = pipe_ctx->plane_state->global_alpha_value;
2353+ } else if (per_pixel_alpha) {
2354+ blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA;
2355+ } else {
2356+ blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_GLOBAL_ALPHA;
2357+ }
2358+
23552359 if (pipe_ctx->plane_state->global_alpha)
23562360 blnd_cfg.global_alpha = pipe_ctx->plane_state->global_alpha_value;
23572361 else
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c+1−0
@@ -997,6 +997,7 @@ static struct clock_source *dcn21_clock_source_create( · 996 unmodified lines
997997 return &clk_src->base;
998998 }
999999
1000+ kfree(clk_src);
10001001 BREAK_TO_DEBUGGER();
10011002 return NULL;
10021003 }
drivers/gpu/drm/amd/pm/amdgpu_dpm.c+39−0
@@ -427,6 +427,7 @@ int amdgpu_dpm_read_sensor(struct amdgpu_device *adev, enum amd_pp_sensors senso · 426 unmodified lines
427427 void amdgpu_dpm_compute_clocks(struct amdgpu_device *adev)
428428 {
429429 const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
430+ int i;
430431
431432 if (!adev->pm.dpm_enabled)
432433 return;
@@ -434,6 +435,15 @@ void amdgpu_dpm_compute_clocks(struct amdgpu_device *adev) · 1 unmodified line
434435 if (!pp_funcs->pm_compute_clocks)
435436 return;
436437
438+ if (adev->mode_info.num_crtc)
439+ amdgpu_display_bandwidth_update(adev);
440+
441+ for (i = 0; i < AMDGPU_MAX_RINGS; i++) {
442+ struct amdgpu_ring *ring = adev->rings[i];
443+ if (ring && ring->sched.ready)
444+ amdgpu_fence_wait_empty(ring);
445+ }
446+
437447 mutex_lock(&adev->pm.mutex);
438448 pp_funcs->pm_compute_clocks(adev->powerplay.pp_handle);
439449 mutex_unlock(&adev->pm.mutex);
@@ -443,6 +453,20 @@ void amdgpu_dpm_enable_uvd(struct amdgpu_device *adev, bool enable) · 3 unmodified lines
443453 {
444454 int ret = 0;
445455
456+ if (adev->family == AMDGPU_FAMILY_SI) {
457+ mutex_lock(&adev->pm.mutex);
458+ if (enable) {
459+ adev->pm.dpm.uvd_active = true;
460+ adev->pm.dpm.state = POWER_STATE_TYPE_INTERNAL_UVD;
461+ } else {
462+ adev->pm.dpm.uvd_active = false;
463+ }
464+ mutex_unlock(&adev->pm.mutex);
465+
466+ amdgpu_dpm_compute_clocks(adev);
467+ return;
468+ }
469+
446470 ret = amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_UVD, !enable);
447471 if (ret)
448472 DRM_ERROR("Dpm %s uvd failed, ret = %d. \n",
@@ -453,6 +477,21 @@ void amdgpu_dpm_enable_vce(struct amdgpu_device *adev, bool enable) · 4 unmodified lines
453477 {
454478 int ret = 0;
455479
480+ if (adev->family == AMDGPU_FAMILY_SI) {
481+ mutex_lock(&adev->pm.mutex);
482+ if (enable) {
483+ adev->pm.dpm.vce_active = true;
484+ /* XXX select vce level based on ring/task */
485+ adev->pm.dpm.vce_level = AMD_VCE_LEVEL_AC_ALL;
486+ } else {
487+ adev->pm.dpm.vce_active = false;
488+ }
489+ mutex_unlock(&adev->pm.mutex);
490+
491+ amdgpu_dpm_compute_clocks(adev);
492+ return;
493+ }
494+
456495 ret = amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_VCE, !enable);
457496 if (ret)
458497 DRM_ERROR("Dpm %s vce failed, ret = %d. \n",
drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c+0−10
@@ -1028,16 +1028,6 @@ static int amdgpu_dpm_change_power_state_locked(struct amdgpu_device *adev) · 1027 unmodified lines
10281028 void amdgpu_legacy_dpm_compute_clocks(void *handle)
10291029 {
10301030 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
1031− int i = 0;
1032−
1033− if (adev->mode_info.num_crtc)
1034− amdgpu_display_bandwidth_update(adev);
1035−
1036− for (i = 0; i < AMDGPU_MAX_RINGS; i++) {
1037− struct amdgpu_ring *ring = adev->rings[i];
1038− if (ring && ring->sched.ready)
1039− amdgpu_fence_wait_empty(ring);
1040− }
10411031
10421032 amdgpu_dpm_get_active_displays(adev);
10431033
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c+0−35
@@ -3892,40 +3892,6 @@ static int si_set_boot_state(struct amdgpu_device *adev) · 3891 unmodified lines
38923892 }
38933893 #endif
38943894
3895−static int si_set_powergating_by_smu(void *handle,
3896− uint32_t block_type,
3897− bool gate)
3898−{
3899− struct amdgpu_device *adev = (struct amdgpu_device *)handle;
3900−
3901− switch (block_type) {
3902− case AMD_IP_BLOCK_TYPE_UVD:
3903− if (!gate) {
3904− adev->pm.dpm.uvd_active = true;
3905− adev->pm.dpm.state = POWER_STATE_TYPE_INTERNAL_UVD;
3906− } else {
3907− adev->pm.dpm.uvd_active = false;
3908− }
3909−
3910− amdgpu_legacy_dpm_compute_clocks(handle);
3911− break;
3912− case AMD_IP_BLOCK_TYPE_VCE:
3913− if (!gate) {
3914− adev->pm.dpm.vce_active = true;
3915− /* XXX select vce level based on ring/task */
3916− adev->pm.dpm.vce_level = AMD_VCE_LEVEL_AC_ALL;
3917− } else {
3918− adev->pm.dpm.vce_active = false;
3919− }
3920−
3921− amdgpu_legacy_dpm_compute_clocks(handle);
3922− break;
3923− default:
3924− break;
3925− }
3926− return 0;
3927−}
3928−
39293895 static int si_set_sw_state(struct amdgpu_device *adev)
39303896 {
39313897 return (amdgpu_si_send_msg_to_smc(adev, PPSMC_MSG_SwitchToSwState) == PPSMC_Result_OK) ?
@@ -8125,7 +8091,6 @@ static const struct amd_pm_funcs si_dpm_funcs = { · 4193 unmodified lines
81258091 .print_power_state = &si_dpm_print_power_state,
81268092 .debugfs_print_current_performance_level = &si_dpm_debugfs_print_current_performance_level,
81278093 .force_performance_level = &si_dpm_force_performance_level,
8128− .set_powergating_by_smu = &si_set_powergating_by_smu,
81298094 .vblank_too_short = &si_dpm_vblank_too_short,
81308095 .set_fan_control_mode = &si_dpm_set_fan_control_mode,
81318096 .get_fan_control_mode = &si_dpm_get_fan_control_mode,
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c+0−10
@@ -1487,16 +1487,6 @@ static void pp_pm_compute_clocks(void *handle) · 1486 unmodified lines
14871487 {
14881488 struct pp_hwmgr *hwmgr = handle;
14891489 struct amdgpu_device *adev = hwmgr->adev;
1490− int i = 0;
1491−
1492− if (adev->mode_info.num_crtc)
1493− amdgpu_display_bandwidth_update(adev);
1494−
1495− for (i = 0; i < AMDGPU_MAX_RINGS; i++) {
1496− struct amdgpu_ring *ring = adev->rings[i];
1497− if (ring && ring->sched.ready)
1498− amdgpu_fence_wait_empty(ring);
1499− }
15001490
15011491 if (!amdgpu_device_has_dc_support(adev)) {
15021492 amdgpu_dpm_get_active_displays(adev);
drivers/gpu/drm/drm_of.c+33−51
@@ -214,29 +214,6 @@ int drm_of_encoder_active_endpoint(struct device_node *node, · 213 unmodified lines
214214 }
215215 EXPORT_SYMBOL_GPL(drm_of_encoder_active_endpoint);
216216
217−static int find_panel_or_bridge(struct device_node *node,
218− struct drm_panel **panel,
219− struct drm_bridge **bridge)
220−{
221− if (panel) {
222− *panel = of_drm_find_panel(node);
223− if (!IS_ERR(*panel))
224− return 0;
225−
226− /* Clear the panel pointer in case of error. */
227− *panel = NULL;
228− }
229−
230− /* No panel found yet, check for a bridge next. */
231− if (bridge) {
232− *bridge = of_drm_find_bridge(node);
233− if (*bridge)
234− return 0;
235− }
236−
237− return -EPROBE_DEFER;
238−}
239−
240217 /**
241218 * drm_of_find_panel_or_bridge - return connected panel or bridge device
242219 * @np: device tree node containing encoder output ports
@@ -259,44 +236,49 @@ int drm_of_find_panel_or_bridge(const struct device_node *np, · 16 unmodified lines
259236 struct drm_panel **panel,
260237 struct drm_bridge **bridge)
261238 {
262− struct device_node *node;
263− int ret;
239+ int ret = -EPROBE_DEFER;
240+ struct device_node *remote;
264241
265242 if (!panel && !bridge)
266243 return -EINVAL;
267−
268244 if (panel)
269245 *panel = NULL;
270− if (bridge)
271− *bridge = NULL;
272−
273− /* Check for a graph on the device node first. */
274− if (of_graph_is_present(np)) {
275− node = of_graph_get_remote_node(np, port, endpoint);
276− if (node) {
277− ret = find_panel_or_bridge(node, panel, bridge);
278− of_node_put(node);
279−
280− if (!ret)
281− return 0;
282− }
283− }
284246
285− /* Otherwise check for any child node other than port/ports. */
286− for_each_available_child_of_node(np, node) {
287− if (of_node_name_eq(node, "port") ||
288− of_node_name_eq(node, "ports"))
289− continue;
247+ /*
248+ * of_graph_get_remote_node() produces a noisy error message if port
249+ * node isn't found and the absence of the port is a legit case here,
250+ * so at first we silently check whether graph presents in the
251+ * device-tree node.
252+ */
253+ if (!of_graph_is_present(np))
254+ return -ENODEV;
290255
291− ret = find_panel_or_bridge(node, panel, bridge);
292− of_node_put(node);
256+ remote = of_graph_get_remote_node(np, port, endpoint);
257+ if (!remote)
258+ return -ENODEV;
259+
260+ if (panel) {
261+ *panel = of_drm_find_panel(remote);
262+ if (!IS_ERR(*panel))
263+ ret = 0;
264+ else
265+ *panel = NULL;
266+ }
267+
268+ /* No panel found yet, check for a bridge next. */
269+ if (bridge) {
270+ if (ret) {
271+ *bridge = of_drm_find_bridge(remote);
272+ if (*bridge)
273+ ret = 0;
274+ } else {
275+ *bridge = NULL;
276+ }
293277
294− /* Stop at the first found occurrence. */
295− if (!ret)
296− return 0;
297278 }
298279
299− return -EPROBE_DEFER;
280+ of_node_put(remote);
281+ return ret;
300282 }
301283 EXPORT_SYMBOL_GPL(drm_of_find_panel_or_bridge);
302284
drivers/gpu/drm/i915/display/intel_dp.c+11−6
@@ -4383,13 +4383,20 @@ intel_dp_update_420(struct intel_dp *intel_dp) · 4382 unmodified lines
43834383 static void
43844384 intel_dp_set_edid(struct intel_dp *intel_dp)
43854385 {
4386+ struct drm_i915_private *i915 = dp_to_i915(intel_dp);
43864387 struct intel_connector *connector = intel_dp->attached_connector;
43874388 struct edid *edid;
4389+ bool vrr_capable;
43884390
43894391 intel_dp_unset_edid(intel_dp);
43904392 edid = intel_dp_get_edid(intel_dp);
43914393 connector->detect_edid = edid;
43924394
4395+ vrr_capable = intel_vrr_is_capable(&connector->base);
4396+ drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] VRR capable: %s\n",
4397+ connector->base.base.id, connector->base.name, str_yes_no(vrr_capable));
4398+ drm_connector_set_vrr_capable_property(&connector->base, vrr_capable);
4399+
43934400 intel_dp_update_dfp(intel_dp, edid);
43944401 intel_dp_update_420(intel_dp);
43954402
@@ -4422,6 +4429,9 @@ intel_dp_unset_edid(struct intel_dp *intel_dp) · 26 unmodified lines
44224429
44234430 intel_dp->dfp.ycbcr_444_to_420 = false;
44244431 connector->base.ycbcr_420_allowed = false;
4432+
4433+ drm_connector_set_vrr_capable_property(&connector->base,
4434+ false);
44254435 }
44264436
44274437 static int
@@ -4572,14 +4582,9 @@ static int intel_dp_get_modes(struct drm_connector *connector) · 144 unmodified lines
45724582 int num_modes = 0;
45734583
45744584 edid = intel_connector->detect_edid;
4575− if (edid) {
4585+ if (edid)
45764586 num_modes = intel_connector_update_modes(connector, edid);
45774587
4578− if (intel_vrr_is_capable(connector))
4579− drm_connector_set_vrr_capable_property(connector,
4580− true);
4581− }
4582−
45834588 /* Also add fixed mode, which may or may not be present in EDID */
45844589 if (intel_dp_is_edp(intel_attached_dp(intel_connector)) &&
45854590 intel_connector->panel.fixed_mode) {
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c+26−8
@@ -97,6 +97,14 @@ · 96 unmodified lines
9797
9898 #define INTEL_EDP_BRIGHTNESS_OPTIMIZATION_1 0x359
9999
100+enum intel_dp_aux_backlight_modparam {
101+ INTEL_DP_AUX_BACKLIGHT_AUTO = -1,
102+ INTEL_DP_AUX_BACKLIGHT_OFF = 0,
103+ INTEL_DP_AUX_BACKLIGHT_ON = 1,
104+ INTEL_DP_AUX_BACKLIGHT_FORCE_VESA = 2,
105+ INTEL_DP_AUX_BACKLIGHT_FORCE_INTEL = 3,
106+};
107+
100108 /* Intel EDP backlight callbacks */
101109 static bool
102110 intel_dp_aux_supports_hdr_backlight(struct intel_connector *connector)
@@ -126,6 +134,24 @@ intel_dp_aux_supports_hdr_backlight(struct intel_connector *connector) · 23 unmodified lines
126134 return false;
127135 }
128136
137+ /*
138+ * If we don't have HDR static metadata there is no way to
139+ * runtime detect used range for nits based control. For now
140+ * do not use Intel proprietary eDP backlight control if we
141+ * don't have this data in panel EDID. In case we find panel
142+ * which supports only nits based control, but doesn't provide
143+ * HDR static metadata we need to start maintaining table of
144+ * ranges for such panels.
145+ */
146+ if (i915->params.enable_dpcd_backlight != INTEL_DP_AUX_BACKLIGHT_FORCE_INTEL &&
147+ !(connector->base.hdr_sink_metadata.hdmi_type1.metadata_type &
148+ BIT(HDMI_STATIC_METADATA_TYPE1))) {
149+ drm_info(&i915->drm,
150+ "Panel is missing HDR static metadata. Possible support for Intel HDR backlight interface is not used. If your backlight controls don't work try booting with i915.enable_dpcd_backlight=%d. needs this, please file a _new_ bug report on drm/i915, see " FDO_BUG_URL " for details.\n",
151+ INTEL_DP_AUX_BACKLIGHT_FORCE_INTEL);
152+ return false;
153+ }
154+
129155 panel->backlight.edp.intel.sdr_uses_aux =
130156 tcon_cap[2] & INTEL_EDP_SDR_TCON_BRIGHTNESS_AUX_CAP;
131157
@@ -413,14 +439,6 @@ static const struct intel_panel_bl_funcs intel_dp_vesa_bl_funcs = { · 281 unmodified lines
413439 .get = intel_dp_aux_vesa_get_backlight,
414440 };
415441
416−enum intel_dp_aux_backlight_modparam {
417− INTEL_DP_AUX_BACKLIGHT_AUTO = -1,
418− INTEL_DP_AUX_BACKLIGHT_OFF = 0,
419− INTEL_DP_AUX_BACKLIGHT_ON = 1,
420− INTEL_DP_AUX_BACKLIGHT_FORCE_VESA = 2,
421− INTEL_DP_AUX_BACKLIGHT_FORCE_INTEL = 3,
422−};
423−
424442 int intel_dp_aux_init_backlight_funcs(struct intel_connector *connector)
425443 {
426444 struct drm_device *dev = connector->base.dev;
drivers/gpu/drm/i915/display/intel_fbc.c+1−1
@@ -1037,7 +1037,7 @@ static int intel_fbc_check_plane(struct intel_atomic_state *state, · 1036 unmodified lines
10371037 struct intel_plane_state *plane_state =
10381038 intel_atomic_get_new_plane_state(state, plane);
10391039 const struct drm_framebuffer *fb = plane_state->hw.fb;
1040− struct intel_crtc *crtc = to_intel_crtc(plane_state->uapi.crtc);
1040+ struct intel_crtc *crtc = to_intel_crtc(plane_state->hw.crtc);
10411041 const struct intel_crtc_state *crtc_state;
10421042 struct intel_fbc *fbc = plane->fbc;
10431043
drivers/gpu/drm/i915/display/intel_psr.c+21−17
@@ -887,6 +887,20 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp, · 886 unmodified lines
887887 return false;
888888 }
889889
890+ /* Wa_16011303918:adl-p */
891+ if (crtc_state->vrr.enable &&
892+ IS_ADLP_DISPLAY_STEP(dev_priv, STEP_A0, STEP_B0)) {
893+ drm_dbg_kms(&dev_priv->drm,
894+ "PSR2 not enabled, not compatible with HW stepping + VRR\n");
895+ return false;
896+ }
897+
898+ if (!_compute_psr2_sdp_prior_scanline_indication(intel_dp, crtc_state)) {
899+ drm_dbg_kms(&dev_priv->drm,
900+ "PSR2 not enabled, PSR2 SDP indication do not fit in hblank\n");
901+ return false;
902+ }
903+
890904 if (HAS_PSR2_SEL_FETCH(dev_priv)) {
891905 if (!intel_psr2_sel_fetch_config_valid(intel_dp, crtc_state) &&
892906 !HAS_PSR_HW_TRACKING(dev_priv)) {
@@ -900,12 +914,12 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp, · 7 unmodified lines
900914 if (!crtc_state->enable_psr2_sel_fetch &&
901915 IS_TGL_DISPLAY_STEP(dev_priv, STEP_A0, STEP_C0)) {
902916 drm_dbg_kms(&dev_priv->drm, "PSR2 HW tracking is not supported this Display stepping\n");
903− return false;
917+ goto unsupported;
904918 }
905919
906920 if (!psr2_granularity_check(intel_dp, crtc_state)) {
907921 drm_dbg_kms(&dev_priv->drm, "PSR2 not enabled, SU granularity not compatible\n");
908− return false;
922+ goto unsupported;
909923 }
910924
911925 if (!crtc_state->enable_psr2_sel_fetch &&
@@ -914,25 +928,15 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp, · 2 unmodified lines
914928 "PSR2 not enabled, resolution %dx%d > max supported %dx%d\n",
915929 crtc_hdisplay, crtc_vdisplay,
916930 psr_max_h, psr_max_v);
917− return false;
918− }
919−
920− if (!_compute_psr2_sdp_prior_scanline_indication(intel_dp, crtc_state)) {
921− drm_dbg_kms(&dev_priv->drm,
922− "PSR2 not enabled, PSR2 SDP indication do not fit in hblank\n");
923− return false;
924− }
925−
926− /* Wa_16011303918:adl-p */
927− if (crtc_state->vrr.enable &&
928− IS_ADLP_DISPLAY_STEP(dev_priv, STEP_A0, STEP_B0)) {
929− drm_dbg_kms(&dev_priv->drm,
930− "PSR2 not enabled, not compatible with HW stepping + VRR\n");
931− return false;
931+ goto unsupported;
932932 }
933933
934934 tgl_dc3co_exitline_compute_config(intel_dp, crtc_state);
935935 return true;
936+
937+unsupported:
938+ crtc_state->enable_psr2_sel_fetch = false;
939+ return false;
936940 }
937941
938942 void intel_psr_compute_config(struct intel_dp *intel_dp,
drivers/gpu/drm/i915/gem/i915_gem_mman.c+1−1
@@ -70,7 +70,7 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data, · 69 unmodified lines
7070 * mmap ioctl is disallowed for all discrete platforms,
7171 * and for all platforms with GRAPHICS_VER > 12.
7272 */
73− if (IS_DGFX(i915) || GRAPHICS_VER(i915) > 12)
73+ if (IS_DGFX(i915) || GRAPHICS_VER_FULL(i915) > IP_VER(12, 0))
7474 return -EOPNOTSUPP;
7575
7676 if (args->flags & ~(I915_MMAP_WC))
drivers/gpu/drm/i915/i915_reg.h+3−3
@@ -4345,12 +4345,12 @@ · 4344 unmodified lines
43454345 #define _DSPAADDR 0x70184
43464346 #define _DSPASTRIDE 0x70188
43474347 #define _DSPAPOS 0x7018C /* reserved */
4348−#define DISP_POS_Y_MASK REG_GENMASK(31, 0)
4348+#define DISP_POS_Y_MASK REG_GENMASK(31, 16)
43494349 #define DISP_POS_Y(y) REG_FIELD_PREP(DISP_POS_Y_MASK, (y))
43504350 #define DISP_POS_X_MASK REG_GENMASK(15, 0)
43514351 #define DISP_POS_X(x) REG_FIELD_PREP(DISP_POS_X_MASK, (x))
43524352 #define _DSPASIZE 0x70190
4353−#define DISP_HEIGHT_MASK REG_GENMASK(31, 0)
4353+#define DISP_HEIGHT_MASK REG_GENMASK(31, 16)
43544354 #define DISP_HEIGHT(h) REG_FIELD_PREP(DISP_HEIGHT_MASK, (h))
43554355 #define DISP_WIDTH_MASK REG_GENMASK(15, 0)
43564356 #define DISP_WIDTH(w) REG_FIELD_PREP(DISP_WIDTH_MASK, (w))
@@ -5152,7 +5152,7 @@ · 795 unmodified lines
51525152 #define _SEL_FETCH_PLANE_BASE_6_A 0x70940
51535153 #define _SEL_FETCH_PLANE_BASE_7_A 0x70960
51545154 #define _SEL_FETCH_PLANE_BASE_CUR_A 0x70880
5155−#define _SEL_FETCH_PLANE_BASE_1_B 0x70990
5155+#define _SEL_FETCH_PLANE_BASE_1_B 0x71890
51565156
51575157 #define _SEL_FETCH_PLANE_BASE_A(plane) _PICK(plane, \
51585158 _SEL_FETCH_PLANE_BASE_1_A, \
drivers/gpu/drm/msm/adreno/a6xx_gpu.c+1−1
@@ -1742,7 +1742,7 @@ a6xx_create_private_address_space(struct msm_gpu *gpu) · 1741 unmodified lines
17421742 return ERR_CAST(mmu);
17431743
17441744 return msm_gem_address_space_create(mmu,
1745− "gpu", 0x100000000ULL, 0x1ffffffffULL);
1745+ "gpu", 0x100000000ULL, SZ_4G);
17461746 }
17471747
17481748 static uint32_t a6xx_get_rptr(struct msm_gpu *gpu, struct msm_ringbuffer *ring)
drivers/gpu/drm/msm/adreno/adreno_device.c+64−16
@@ -599,43 +599,91 @@ static const struct of_device_id dt_match[] = { · 598 unmodified lines
599599 {}
600600 };
601601
602−#ifdef CONFIG_PM
603−static int adreno_resume(struct device *dev)
602+static int adreno_runtime_resume(struct device *dev)
604603 {
605604 struct msm_gpu *gpu = dev_to_gpu(dev);
606605
607606 return gpu->funcs->pm_resume(gpu);
608607 }
609608
610−static int active_submits(struct msm_gpu *gpu)
609+static int adreno_runtime_suspend(struct device *dev)
611610 {
612− int active_submits;
613− mutex_lock(&gpu->active_lock);
614− active_submits = gpu->active_submits;
615− mutex_unlock(&gpu->active_lock);
616− return active_submits;
611+ struct msm_gpu *gpu = dev_to_gpu(dev);
612+
613+ /*
614+ * We should be holding a runpm ref, which will prevent
615+ * runtime suspend. In the system suspend path, we've
616+ * already waited for active jobs to complete.
617+ */
618+ WARN_ON_ONCE(gpu->active_submits);
619+
620+ return gpu->funcs->pm_suspend(gpu);
621+}
622+
623+static void suspend_scheduler(struct msm_gpu *gpu)
624+{
625+ int i;
626+
627+ /*
628+ * Shut down the scheduler before we force suspend, so that
629+ * suspend isn't racing with scheduler kthread feeding us
630+ * more work.
631+ *
632+ * Note, we just want to park the thread, and let any jobs
633+ * that are already on the hw queue complete normally, as
634+ * opposed to the drm_sched_stop() path used for handling
635+ * faulting/timed-out jobs. We can't really cancel any jobs
636+ * already on the hw queue without racing with the GPU.
637+ */
638+ for (i = 0; i < gpu->nr_rings; i++) {
639+ struct drm_gpu_scheduler *sched = &gpu->rb[i]->sched;
640+ kthread_park(sched->thread);
641+ }
617642 }
618643
619−static int adreno_suspend(struct device *dev)
644+static void resume_scheduler(struct msm_gpu *gpu)
645+{
646+ int i;
647+
648+ for (i = 0; i < gpu->nr_rings; i++) {
649+ struct drm_gpu_scheduler *sched = &gpu->rb[i]->sched;
650+ kthread_unpark(sched->thread);
651+ }
652+}
653+
654+static int adreno_system_suspend(struct device *dev)
620655 {
621656 struct msm_gpu *gpu = dev_to_gpu(dev);
622− int remaining;
657+ int remaining, ret;
658+
659+ suspend_scheduler(gpu);
623660
624661 remaining = wait_event_timeout(gpu->retire_event,
625− active_submits(gpu) == 0,
662+ gpu->active_submits == 0,
626663 msecs_to_jiffies(1000));
627664 if (remaining == 0) {
628665 dev_err(dev, "Timeout waiting for GPU to suspend\n");
629− return -EBUSY;
666+ ret = -EBUSY;
667+ goto out;
630668 }
631669
632− return gpu->funcs->pm_suspend(gpu);
670+ ret = pm_runtime_force_suspend(dev);
671+out:
672+ if (ret)
673+ resume_scheduler(gpu);
674+
675+ return ret;
676+}
677+
678+static int adreno_system_resume(struct device *dev)
679+{
680+ resume_scheduler(dev_to_gpu(dev));
681+ return pm_runtime_force_resume(dev);
633682 }
634−#endif
635683
636684 static const struct dev_pm_ops adreno_pm_ops = {
637− SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
638− SET_RUNTIME_PM_OPS(adreno_suspend, adreno_resume, NULL)
685+ SYSTEM_SLEEP_PM_OPS(adreno_system_suspend, adreno_system_resume)
686+ RUNTIME_PM_OPS(adreno_runtime_suspend, adreno_runtime_resume, NULL)
639687 };
640688
641689 static struct platform_driver adreno_driver = {
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c+17−17
@@ -54,87 +54,87 @@ struct dpu_intr_reg { · 53 unmodified lines
5454 * When making changes be sure to sync with dpu_hw_intr_reg
5555 */
5656 static const struct dpu_intr_reg dpu_intr_set[] = {
57− {
57+ [MDP_SSPP_TOP0_INTR] = {
5858 MDP_SSPP_TOP0_OFF+INTR_CLEAR,
5959 MDP_SSPP_TOP0_OFF+INTR_EN,
6060 MDP_SSPP_TOP0_OFF+INTR_STATUS
6161 },
62− {
62+ [MDP_SSPP_TOP0_INTR2] = {
6363 MDP_SSPP_TOP0_OFF+INTR2_CLEAR,
6464 MDP_SSPP_TOP0_OFF+INTR2_EN,
6565 MDP_SSPP_TOP0_OFF+INTR2_STATUS
6666 },
67− {
67+ [MDP_SSPP_TOP0_HIST_INTR] = {
6868 MDP_SSPP_TOP0_OFF+HIST_INTR_CLEAR,
6969 MDP_SSPP_TOP0_OFF+HIST_INTR_EN,
7070 MDP_SSPP_TOP0_OFF+HIST_INTR_STATUS
7171 },
72− {
72+ [MDP_INTF0_INTR] = {
7373 MDP_INTF_0_OFF+INTF_INTR_CLEAR,
7474 MDP_INTF_0_OFF+INTF_INTR_EN,
7575 MDP_INTF_0_OFF+INTF_INTR_STATUS
7676 },
77− {
77+ [MDP_INTF1_INTR] = {
7878 MDP_INTF_1_OFF+INTF_INTR_CLEAR,
7979 MDP_INTF_1_OFF+INTF_INTR_EN,
8080 MDP_INTF_1_OFF+INTF_INTR_STATUS
8181 },
82− {
82+ [MDP_INTF2_INTR] = {
8383 MDP_INTF_2_OFF+INTF_INTR_CLEAR,
8484 MDP_INTF_2_OFF+INTF_INTR_EN,
8585 MDP_INTF_2_OFF+INTF_INTR_STATUS
8686 },
87− {
87+ [MDP_INTF3_INTR] = {
8888 MDP_INTF_3_OFF+INTF_INTR_CLEAR,
8989 MDP_INTF_3_OFF+INTF_INTR_EN,
9090 MDP_INTF_3_OFF+INTF_INTR_STATUS
9191 },
92− {
92+ [MDP_INTF4_INTR] = {
9393 MDP_INTF_4_OFF+INTF_INTR_CLEAR,
9494 MDP_INTF_4_OFF+INTF_INTR_EN,
9595 MDP_INTF_4_OFF+INTF_INTR_STATUS
9696 },
97− {
97+ [MDP_INTF5_INTR] = {
9898 MDP_INTF_5_OFF+INTF_INTR_CLEAR,
9999 MDP_INTF_5_OFF+INTF_INTR_EN,
100100 MDP_INTF_5_OFF+INTF_INTR_STATUS
101101 },
102− {
102+ [MDP_AD4_0_INTR] = {
103103 MDP_AD4_0_OFF + MDP_AD4_INTR_CLEAR_OFF,
104104 MDP_AD4_0_OFF + MDP_AD4_INTR_EN_OFF,
105105 MDP_AD4_0_OFF + MDP_AD4_INTR_STATUS_OFF,
106106 },
107− {
107+ [MDP_AD4_1_INTR] = {
108108 MDP_AD4_1_OFF + MDP_AD4_INTR_CLEAR_OFF,
109109 MDP_AD4_1_OFF + MDP_AD4_INTR_EN_OFF,
110110 MDP_AD4_1_OFF + MDP_AD4_INTR_STATUS_OFF,
111111 },
112− {
112+ [MDP_INTF0_7xxx_INTR] = {
113113 MDP_INTF_0_OFF_REV_7xxx+INTF_INTR_CLEAR,
114114 MDP_INTF_0_OFF_REV_7xxx+INTF_INTR_EN,
115115 MDP_INTF_0_OFF_REV_7xxx+INTF_INTR_STATUS
116116 },
117− {
117+ [MDP_INTF1_7xxx_INTR] = {
118118 MDP_INTF_1_OFF_REV_7xxx+INTF_INTR_CLEAR,
119119 MDP_INTF_1_OFF_REV_7xxx+INTF_INTR_EN,
120120 MDP_INTF_1_OFF_REV_7xxx+INTF_INTR_STATUS
121121 },
122− {
122+ [MDP_INTF2_7xxx_INTR] = {
123123 MDP_INTF_2_OFF_REV_7xxx+INTF_INTR_CLEAR,
124124 MDP_INTF_2_OFF_REV_7xxx+INTF_INTR_EN,
125125 MDP_INTF_2_OFF_REV_7xxx+INTF_INTR_STATUS
126126 },
127− {
127+ [MDP_INTF3_7xxx_INTR] = {
128128 MDP_INTF_3_OFF_REV_7xxx+INTF_INTR_CLEAR,
129129 MDP_INTF_3_OFF_REV_7xxx+INTF_INTR_EN,
130130 MDP_INTF_3_OFF_REV_7xxx+INTF_INTR_STATUS
131131 },
132− {
132+ [MDP_INTF4_7xxx_INTR] = {
133133 MDP_INTF_4_OFF_REV_7xxx+INTF_INTR_CLEAR,
134134 MDP_INTF_4_OFF_REV_7xxx+INTF_INTR_EN,
135135 MDP_INTF_4_OFF_REV_7xxx+INTF_INTR_STATUS
136136 },
137− {
137+ [MDP_INTF5_7xxx_INTR] = {
138138 MDP_INTF_5_OFF_REV_7xxx+INTF_INTR_CLEAR,
139139 MDP_INTF_5_OFF_REV_7xxx+INTF_INTR_EN,
140140 MDP_INTF_5_OFF_REV_7xxx+INTF_INTR_STATUS
drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c+3−0
@@ -98,7 +98,10 @@ static void mdp5_plane_reset(struct drm_plane *plane) · 97 unmodified lines
9898 __drm_atomic_helper_plane_destroy_state(plane->state);
9999
100100 kfree(to_mdp5_plane_state(plane->state));
101+ plane->state = NULL;
101102 mdp5_state = kzalloc(sizeof(*mdp5_state), GFP_KERNEL);
103+ if (!mdp5_state)
104+ return;
102105 __drm_atomic_helper_plane_reset(plane, &mdp5_state->base);
103106 }
104107
drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c+2−0
@@ -176,6 +176,8 @@ void msm_disp_snapshot_add_block(struct msm_disp_state *disp_state, u32 len, · 175 unmodified lines
176176 va_list va;
177177
178178 new_blk = kzalloc(sizeof(struct msm_disp_state_block), GFP_KERNEL);
179+ if (!new_blk)
180+ return;
179181
180182 va_start(va, fmt);
181183
drivers/gpu/drm/msm/dp/dp_display.c+6−0
@@ -580,6 +580,12 @@ static int dp_hpd_plug_handle(struct dp_display_private *dp, u32 data) · 579 unmodified lines
580580 dp->dp_display.connector_type, state);
581581 mutex_unlock(&dp->event_mutex);
582582
583+ /*
584+ * add fail safe mode outside event_mutex scope
585+ * to avoid potiential circular lock with drm thread
586+ */
587+ dp_panel_add_fail_safe_mode(dp->dp_display.connector);
588+
583589 /* uevent will complete connection part */
584590 return 0;
585591 };
drivers/gpu/drm/msm/dp/dp_panel.c+10−10
@@ -151,6 +151,15 @@ static int dp_panel_update_modes(struct drm_connector *connector, · 150 unmodified lines
151151 return rc;
152152 }
153153
154+void dp_panel_add_fail_safe_mode(struct drm_connector *connector)
155+{
156+ /* fail safe edid */
157+ mutex_lock(&connector->dev->mode_config.mutex);
158+ if (drm_add_modes_noedid(connector, 640, 480))
159+ drm_set_preferred_mode(connector, 640, 480);
160+ mutex_unlock(&connector->dev->mode_config.mutex);
161+}
162+
154163 int dp_panel_read_sink_caps(struct dp_panel *dp_panel,
155164 struct drm_connector *connector)
156165 {
@@ -207,16 +216,7 @@ int dp_panel_read_sink_caps(struct dp_panel *dp_panel, · 50 unmodified lines
207216 goto end;
208217 }
209218
210− /* fail safe edid */
211− mutex_lock(&connector->dev->mode_config.mutex);
212− if (drm_add_modes_noedid(connector, 640, 480))
213− drm_set_preferred_mode(connector, 640, 480);
214− mutex_unlock(&connector->dev->mode_config.mutex);
215− } else {
216− /* always add fail-safe mode as backup mode */
217− mutex_lock(&connector->dev->mode_config.mutex);
218− drm_add_modes_noedid(connector, 640, 480);
219− mutex_unlock(&connector->dev->mode_config.mutex);
219+ dp_panel_add_fail_safe_mode(connector);
220220 }
221221
222222 if (panel->aux_cfg_update_done) {
drivers/gpu/drm/msm/dp/dp_panel.h+1−0
@@ -59,6 +59,7 @@ int dp_panel_init_panel_info(struct dp_panel *dp_panel); · 58 unmodified lines
5959 int dp_panel_deinit(struct dp_panel *dp_panel);
6060 int dp_panel_timing_cfg(struct dp_panel *dp_panel);
6161 void dp_panel_dump_regs(struct dp_panel *dp_panel);
62+void dp_panel_add_fail_safe_mode(struct drm_connector *connector);
6263 int dp_panel_read_sink_caps(struct dp_panel *dp_panel,
6364 struct drm_connector *connector);
6465 u32 dp_panel_get_mode_bpp(struct dp_panel *dp_panel, u32 mode_max_bpp,
drivers/gpu/drm/msm/dsi/dsi_manager.c+1−1
@@ -638,7 +638,7 @@ struct drm_connector *msm_dsi_manager_connector_init(u8 id) · 637 unmodified lines
638638 return connector;
639639
640640 fail:
641− connector->funcs->destroy(msm_dsi->connector);
641+ connector->funcs->destroy(connector);
642642 return ERR_PTR(ret);
643643 }
644644
drivers/gpu/drm/msm/msm_gem.c+1−0
@@ -926,6 +926,7 @@ void msm_gem_describe(struct drm_gem_object *obj, struct seq_file *m, · 925 unmodified lines
926926 get_pid_task(aspace->pid, PIDTYPE_PID);
927927 if (task) {
928928 comm = kstrdup(task->comm, GFP_KERNEL);
929+ put_task_struct(task);
929930 } else {
930931 comm = NULL;
931932 }
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c+10−3
@@ -229,7 +229,7 @@ static void rpi_touchscreen_i2c_write(struct rpi_touchscreen *ts, · 228 unmodified lines
229229
230230 ret = i2c_smbus_write_byte_data(ts->i2c, reg, val);
231231 if (ret)
232− dev_err(&ts->dsi->dev, "I2C write failed: %d\n", ret);
232+ dev_err(&ts->i2c->dev, "I2C write failed: %d\n", ret);
233233 }
234234
235235 static int rpi_touchscreen_write(struct rpi_touchscreen *ts, u16 reg, u32 val)
@@ -265,7 +265,7 @@ static int rpi_touchscreen_noop(struct drm_panel *panel) · 29 unmodified lines
265265 return 0;
266266 }
267267
268−static int rpi_touchscreen_enable(struct drm_panel *panel)
268+static int rpi_touchscreen_prepare(struct drm_panel *panel)
269269 {
270270 struct rpi_touchscreen *ts = panel_to_ts(panel);
271271 int i;
@@ -295,6 +295,13 @@ static int rpi_touchscreen_enable(struct drm_panel *panel) · 23 unmodified lines
295295 rpi_touchscreen_write(ts, DSI_STARTDSI, 0x01);
296296 msleep(100);
297297
298+ return 0;
299+}
300+
301+static int rpi_touchscreen_enable(struct drm_panel *panel)
302+{
303+ struct rpi_touchscreen *ts = panel_to_ts(panel);
304+
298305 /* Turn on the backlight. */
299306 rpi_touchscreen_i2c_write(ts, REG_PWM, 255);
300307
@@ -349,7 +356,7 @@ static int rpi_touchscreen_get_modes(struct drm_panel *panel, · 48 unmodified lines
349356 static const struct drm_panel_funcs rpi_touchscreen_funcs = {
350357 .disable = rpi_touchscreen_disable,
351358 .unprepare = rpi_touchscreen_noop,
352− .prepare = rpi_touchscreen_noop,
359+ .prepare = rpi_touchscreen_prepare,
353360 .enable = rpi_touchscreen_enable,
354361 .get_modes = rpi_touchscreen_get_modes,
355362 };
drivers/gpu/drm/radeon/radeon_sync.c+1−1
@@ -96,7 +96,7 @@ int radeon_sync_resv(struct radeon_device *rdev, · 95 unmodified lines
9696 struct dma_fence *f;
9797 int r = 0;
9898
99− dma_resv_for_each_fence(&cursor, resv, shared, f) {
99+ dma_resv_for_each_fence(&cursor, resv, !shared, f) {
100100 fence = to_radeon_fence(f);
101101 if (fence && fence->rdev == rdev)
102102 radeon_sync_fence(sync, fence);
drivers/gpu/drm/sun4i/sun4i_frontend.c+0−3
@@ -222,13 +222,11 @@ void sun4i_frontend_update_buffer(struct sun4i_frontend *frontend, · 221 unmodified lines
222222
223223 /* Set the physical address of the buffer in memory */
224224 paddr = drm_fb_cma_get_gem_addr(fb, state, 0);
225− paddr -= PHYS_OFFSET;
226225 DRM_DEBUG_DRIVER("Setting buffer #0 address to %pad\n", &paddr);
227226 regmap_write(frontend->regs, SUN4I_FRONTEND_BUF_ADDR0_REG, paddr);
228227
229228 if (fb->format->num_planes > 1) {
230229 paddr = drm_fb_cma_get_gem_addr(fb, state, swap ? 2 : 1);
231− paddr -= PHYS_OFFSET;
232230 DRM_DEBUG_DRIVER("Setting buffer #1 address to %pad\n", &paddr);
233231 regmap_write(frontend->regs, SUN4I_FRONTEND_BUF_ADDR1_REG,
234232 paddr);
@@ -236,7 +234,6 @@ void sun4i_frontend_update_buffer(struct sun4i_frontend *frontend, · 1 unmodified line
236234
237235 if (fb->format->num_planes > 2) {
238236 paddr = drm_fb_cma_get_gem_addr(fb, state, swap ? 1 : 2);
239− paddr -= PHYS_OFFSET;
240237 DRM_DEBUG_DRIVER("Setting buffer #2 address to %pad\n", &paddr);
241238 regmap_write(frontend->regs, SUN4I_FRONTEND_BUF_ADDR2_REG,
242239 paddr);
drivers/gpu/drm/vc4/Kconfig+3−0
@@ -2,6 +2,9 @@ · 1 unmodified line
22 config DRM_VC4
33 tristate "Broadcom VC4 Graphics"
44 depends on ARCH_BCM || ARCH_BCM2835 || COMPILE_TEST
5+ # Make sure not 'y' when RASPBERRYPI_FIRMWARE is 'm'. This can only
6+ # happen when COMPILE_TEST=y, hence the added !RASPBERRYPI_FIRMWARE.
7+ depends on RASPBERRYPI_FIRMWARE || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE)
58 depends on DRM
69 depends on SND && SND_SOC
710 depends on COMMON_CLK
drivers/gpu/drm/vc4/vc4_dsi.c+1−1
@@ -846,7 +846,7 @@ static void vc4_dsi_encoder_enable(struct drm_encoder *encoder) · 845 unmodified lines
846846 unsigned long phy_clock;
847847 int ret;
848848
849− ret = pm_runtime_get_sync(dev);
849+ ret = pm_runtime_resume_and_get(dev);
850850 if (ret) {
851851 DRM_ERROR("Failed to runtime PM enable on DSI%d\n", dsi->variant->port);
852852 return;
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c+20−23
@@ -46,6 +46,21 @@ vmw_buffer_object(struct ttm_buffer_object *bo) · 45 unmodified lines
4646 return container_of(bo, struct vmw_buffer_object, base);
4747 }
4848
49+/**
50+ * bo_is_vmw - check if the buffer object is a &vmw_buffer_object
51+ * @bo: ttm buffer object to be checked
52+ *
53+ * Uses destroy function associated with the object to determine if this is
54+ * a &vmw_buffer_object.
55+ *
56+ * Returns:
57+ * true if the object is of &vmw_buffer_object type, false if not.
58+ */
59+static bool bo_is_vmw(struct ttm_buffer_object *bo)
60+{
61+ return bo->destroy == &vmw_bo_bo_free ||
62+ bo->destroy == &vmw_gem_destroy;
63+}
4964
5065 /**
5166 * vmw_bo_pin_in_placement - Validate a buffer to placement.
@@ -615,8 +630,9 @@ int vmw_user_bo_synccpu_ioctl(struct drm_device *dev, void *data, · 563 unmodified lines
615630
616631 ret = vmw_user_bo_synccpu_grab(vbo, arg->flags);
617632 vmw_bo_unreference(&vbo);
618− if (unlikely(ret != 0 && ret != -ERESTARTSYS &&
619− ret != -EBUSY)) {
633+ if (unlikely(ret != 0)) {
634+ if (ret == -ERESTARTSYS || ret == -EBUSY)
635+ return -EBUSY;
620636 DRM_ERROR("Failed synccpu grab on handle 0x%08x.\n",
621637 (unsigned int) arg->handle);
622638 return ret;
@@ -798,7 +814,7 @@ int vmw_dumb_create(struct drm_file *file_priv, · 175 unmodified lines
798814 void vmw_bo_swap_notify(struct ttm_buffer_object *bo)
799815 {
800816 /* Is @bo embedded in a struct vmw_buffer_object? */
801− if (vmw_bo_is_vmw_bo(bo))
817+ if (!bo_is_vmw(bo))
802818 return;
803819
804820 /* Kill any cached kernel maps before swapout */
@@ -822,7 +838,7 @@ void vmw_bo_move_notify(struct ttm_buffer_object *bo, · 17 unmodified lines
822838 struct vmw_buffer_object *vbo;
823839
824840 /* Make sure @bo is embedded in a struct vmw_buffer_object? */
825− if (vmw_bo_is_vmw_bo(bo))
841+ if (!bo_is_vmw(bo))
826842 return;
827843
828844 vbo = container_of(bo, struct vmw_buffer_object, base);
@@ -843,22 +859,3 @@ void vmw_bo_move_notify(struct ttm_buffer_object *bo, · 14 unmodified lines
843859 if (mem->mem_type != VMW_PL_MOB && bo->resource->mem_type == VMW_PL_MOB)
844860 vmw_resource_unbind_list(vbo);
845861 }
846−
847−/**
848− * vmw_bo_is_vmw_bo - check if the buffer object is a &vmw_buffer_object
849− * @bo: buffer object to be checked
850− *
851− * Uses destroy function associated with the object to determine if this is
852− * a &vmw_buffer_object.
853− *
854− * Returns:
855− * true if the object is of &vmw_buffer_object type, false if not.
856− */
857−bool vmw_bo_is_vmw_bo(struct ttm_buffer_object *bo)
858−{
859− if (bo->destroy == &vmw_bo_bo_free ||
860− bo->destroy == &vmw_gem_destroy)
861− return true;
862−
863− return false;
864−}
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c+2−6
@@ -998,13 +998,10 @@ static int vmw_driver_load(struct vmw_private *dev_priv, u32 pci_id) · 997 unmodified lines
998998 goto out_no_fman;
999999 }
10001000
1001− drm_vma_offset_manager_init(&dev_priv->vma_manager,
1002− DRM_FILE_PAGE_OFFSET_START,
1003− DRM_FILE_PAGE_OFFSET_SIZE);
10041001 ret = ttm_device_init(&dev_priv->bdev, &vmw_bo_driver,
10051002 dev_priv->drm.dev,
10061003 dev_priv->drm.anon_inode->i_mapping,
1007− &dev_priv->vma_manager,
1004+ dev_priv->drm.vma_offset_manager,
10081005 dev_priv->map_mode == vmw_dma_alloc_coherent,
10091006 false);
10101007 if (unlikely(ret != 0)) {
@@ -1174,7 +1171,6 @@ static void vmw_driver_unload(struct drm_device *dev) · 163 unmodified lines
11741171 vmw_devcaps_destroy(dev_priv);
11751172 vmw_vram_manager_fini(dev_priv);
11761173 ttm_device_fini(&dev_priv->bdev);
1177− drm_vma_offset_manager_destroy(&dev_priv->vma_manager);
11781174 vmw_release_device_late(dev_priv);
11791175 vmw_fence_manager_takedown(dev_priv->fman);
11801176 if (dev_priv->capabilities & SVGA_CAP_IRQMASK)
@@ -1398,7 +1394,7 @@ vmw_get_unmapped_area(struct file *file, unsigned long uaddr, · 217 unmodified lines
13981394 struct vmw_private *dev_priv = vmw_priv(file_priv->minor->dev);
13991395
14001396 return drm_get_unmapped_area(file, uaddr, len, pgoff, flags,
1401− &dev_priv->vma_manager);
1397+ dev_priv->drm.vma_offset_manager);
14021398 }
14031399
14041400 static int vmwgfx_pm_notifier(struct notifier_block *nb, unsigned long val,
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c+6−1
@@ -683,6 +683,9 @@ static void vmw_user_surface_base_release(struct ttm_base_object **p_base) · 682 unmodified lines
683683 container_of(base, struct vmw_user_surface, prime.base);
684684 struct vmw_resource *res = &user_srf->srf.res;
685685
686+ if (base->shareable && res && res->backup)
687+ drm_gem_object_put(&res->backup->base.base);
688+
686689 *p_base = NULL;
687690 vmw_resource_unreference(&res);
688691 }
@@ -857,6 +860,7 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data, · 168 unmodified lines
857860 goto out_unlock;
858861 }
859862 vmw_bo_reference(res->backup);
863+ drm_gem_object_get(&res->backup->base.base);
860864 }
861865
862866 tmp = vmw_resource_reference(&srf->res);
@@ -1513,7 +1517,6 @@ vmw_gb_surface_define_internal(struct drm_device *dev, · 650 unmodified lines
15131517 &res->backup);
15141518 if (ret == 0)
15151519 vmw_bo_reference(res->backup);
1516−
15171520 }
15181521
15191522 if (unlikely(ret != 0)) {
@@ -1561,6 +1564,8 @@ vmw_gb_surface_define_internal(struct drm_device *dev, · 41 unmodified lines
15611564 drm_vma_node_offset_addr(&res->backup->base.base.vma_node);
15621565 rep->buffer_size = res->backup->base.base.size;
15631566 rep->buffer_handle = backup_handle;
1567+ if (user_srf->prime.base.shareable)
1568+ drm_gem_object_get(&res->backup->base.base);
15641569 } else {
15651570 rep->buffer_map_handle = 0;
15661571 rep->buffer_size = 0;
drivers/i2c/busses/i2c-imx.c+33−0
@@ -179,6 +179,12 @@ struct imx_i2c_hwdata { · 178 unmodified lines
179179 unsigned int ndivs;
180180 unsigned int i2sr_clr_opcode;
181181 unsigned int i2cr_ien_opcode;
182+ /*
183+ * Errata ERR007805 or e7805:
184+ * I2C: When the I2C clock speed is configured for 400 kHz,
185+ * the SCL low period violates the I2C spec of 1.3 uS min.
186+ */
187+ bool has_err007805;
182188 };
183189
184190 struct imx_i2c_dma {
@@ -240,6 +246,16 @@ static const struct imx_i2c_hwdata imx21_i2c_hwdata = { · 55 unmodified lines
240246
241247 };
242248
249+static const struct imx_i2c_hwdata imx6_i2c_hwdata = {
250+ .devtype = IMX21_I2C,
251+ .regshift = IMX_I2C_REGSHIFT,
252+ .clk_div = imx_i2c_clk_div,
253+ .ndivs = ARRAY_SIZE(imx_i2c_clk_div),
254+ .i2sr_clr_opcode = I2SR_CLR_OPCODE_W0C,
255+ .i2cr_ien_opcode = I2CR_IEN_OPCODE_1,
256+ .has_err007805 = true,
257+};
258+
243259 static struct imx_i2c_hwdata vf610_i2c_hwdata = {
244260 .devtype = VF610_I2C,
245261 .regshift = VF610_I2C_REGSHIFT,
@@ -266,6 +282,16 @@ MODULE_DEVICE_TABLE(platform, imx_i2c_devtype); · 20 unmodified lines
266282 static const struct of_device_id i2c_imx_dt_ids[] = {
267283 { .compatible = "fsl,imx1-i2c", .data = &imx1_i2c_hwdata, },
268284 { .compatible = "fsl,imx21-i2c", .data = &imx21_i2c_hwdata, },
285+ { .compatible = "fsl,imx6q-i2c", .data = &imx6_i2c_hwdata, },
286+ { .compatible = "fsl,imx6sl-i2c", .data = &imx6_i2c_hwdata, },
287+ { .compatible = "fsl,imx6sll-i2c", .data = &imx6_i2c_hwdata, },
288+ { .compatible = "fsl,imx6sx-i2c", .data = &imx6_i2c_hwdata, },
289+ { .compatible = "fsl,imx6ul-i2c", .data = &imx6_i2c_hwdata, },
290+ { .compatible = "fsl,imx7s-i2c", .data = &imx6_i2c_hwdata, },
291+ { .compatible = "fsl,imx8mm-i2c", .data = &imx6_i2c_hwdata, },
292+ { .compatible = "fsl,imx8mn-i2c", .data = &imx6_i2c_hwdata, },
293+ { .compatible = "fsl,imx8mp-i2c", .data = &imx6_i2c_hwdata, },
294+ { .compatible = "fsl,imx8mq-i2c", .data = &imx6_i2c_hwdata, },
269295 { .compatible = "fsl,vf610-i2c", .data = &vf610_i2c_hwdata, },
270296 { /* sentinel */ }
271297 };
@@ -551,6 +577,13 @@ static void i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx, · 279 unmodified lines
551577 unsigned int div;
552578 int i;
553579
580+ if (i2c_imx->hwdata->has_err007805 && i2c_imx->bitrate > 384000) {
581+ dev_dbg(&i2c_imx->adapter.dev,
582+ "SoC errata ERR007805 or e7805 applies, bus frequency limited from %d Hz to 384000 Hz.\n",
583+ i2c_imx->bitrate);
584+ i2c_imx->bitrate = 384000;
585+ }
586+
554587 /* Divider value calculation */
555588 if (i2c_imx->cur_clk == i2c_clk_rate)
556589 return;
drivers/i2c/busses/i2c-ismt.c+2−2
@@ -145,8 +145,8 @@ · 144 unmodified lines
145145 #define ISMT_SPGT_SPD_MASK 0xc0000000 /* SMBus Speed mask */
146146 #define ISMT_SPGT_SPD_80K 0x00 /* 80 kHz */
147147 #define ISMT_SPGT_SPD_100K (0x1 << 30) /* 100 kHz */
148−#define ISMT_SPGT_SPD_400K (0x2 << 30) /* 400 kHz */
149−#define ISMT_SPGT_SPD_1M (0x3 << 30) /* 1 MHz */
148+#define ISMT_SPGT_SPD_400K (0x2U << 30) /* 400 kHz */
149+#define ISMT_SPGT_SPD_1M (0x3U << 30) /* 1 MHz */
150150
151151
152152 /* MSI Control Register (MSICTL) bit definitions */
drivers/i2c/busses/i2c-pasemi-core.c+6−0
@@ -137,6 +137,12 @@ static int pasemi_i2c_xfer_msg(struct i2c_adapter *adapter, · 136 unmodified lines
137137
138138 TXFIFO_WR(smbus, msg->buf[msg->len-1] |
139139 (stop ? MTXFIFO_STOP : 0));
140+
141+ if (stop) {
142+ err = pasemi_smb_waitready(smbus);
143+ if (err)
144+ goto reset_out;
145+ }
140146 }
141147
142148 return 0;
drivers/i2c/busses/i2c-qcom-geni.c+2−4
@@ -843,10 +843,8 @@ static int geni_i2c_probe(struct platform_device *pdev) · 842 unmodified lines
843843 /* FIFO is disabled, so we can only use GPI DMA */
844844 gi2c->gpi_mode = true;
845845 ret = setup_gpi_dma(gi2c);
846− if (ret) {
847− dev_err(dev, "Failed to setup GPI DMA mode:%d ret\n", ret);
848− return ret;
849− }
846+ if (ret)
847+ return dev_err_probe(dev, ret, "Failed to setup GPI DMA mode\n");
850848
851849 dev_dbg(dev, "Using GPI DMA mode for I2C\n");
852850 } else {
drivers/i2c/i2c-dev.c+11−6
@@ -557,7 +557,7 @@ static long compat_i2cdev_ioctl(struct file *file, unsigned int cmd, unsigned lo · 556 unmodified lines
557557 .addr = umsg.addr,
558558 .flags = umsg.flags,
559559 .len = umsg.len,
560− .buf = compat_ptr(umsg.buf)
560+ .buf = (__force __u8 *)compat_ptr(umsg.buf),
561561 };
562562 }
563563
@@ -668,16 +668,21 @@ static int i2cdev_attach_adapter(struct device *dev, void *dummy) · 104 unmodified lines
668668 i2c_dev->dev.class = i2c_dev_class;
669669 i2c_dev->dev.parent = &adap->dev;
670670 i2c_dev->dev.release = i2cdev_dev_release;
671− dev_set_name(&i2c_dev->dev, "i2c-%d", adap->nr);
671+
672+ res = dev_set_name(&i2c_dev->dev, "i2c-%d", adap->nr);
673+ if (res)
674+ goto err_put_i2c_dev;
672675
673676 res = cdev_device_add(&i2c_dev->cdev, &i2c_dev->dev);
674− if (res) {
675− put_i2c_dev(i2c_dev, false);
676− return res;
677− }
677+ if (res)
678+ goto err_put_i2c_dev;
678679
679680 pr_debug("adapter [%s] registered as minor %d\n", adap->name, adap->nr);
680681 return 0;
682+
683+err_put_i2c_dev:
684+ put_i2c_dev(i2c_dev, false);
685+ return res;
681686 }
682687
683688 static int i2cdev_detach_adapter(struct device *dev, void *dummy)
drivers/idle/intel_idle.c+15−12
@@ -69,7 +69,12 @@ static unsigned int preferred_states_mask; · 68 unmodified lines
6969 static struct cpuidle_device __percpu *intel_idle_cpuidle_devices;
7070
7171 static unsigned long auto_demotion_disable_flags;
72−static bool disable_promotion_to_c1e;
72+
73+static enum {
74+ C1E_PROMOTION_PRESERVE,
75+ C1E_PROMOTION_ENABLE,
76+ C1E_PROMOTION_DISABLE
77+} c1e_promotion = C1E_PROMOTION_PRESERVE;
7378
7479 struct idle_cpu {
7580 struct cpuidle_state *state_table;
@@ -1398,8 +1403,6 @@ static inline void intel_idle_init_cstates_acpi(struct cpuidle_driver *drv) { } · 1322 unmodified lines
13981403 static inline bool intel_idle_off_by_default(u32 mwait_hint) { return false; }
13991404 #endif /* !CONFIG_ACPI_PROCESSOR_CSTATE */
14001405
1401−static void c1e_promotion_enable(void);
1402−
14031406 /**
14041407 * ivt_idle_state_table_update - Tune the idle states table for Ivy Town.
14051408 *
@@ -1578,17 +1581,14 @@ static void __init spr_idle_state_table_update(void) · 172 unmodified lines
15781581 unsigned long long msr;
15791582
15801583 /* Check if user prefers C1E over C1. */
1581− if (preferred_states_mask & BIT(2)) {
1582− if (preferred_states_mask & BIT(1))
1583− /* Both can't be enabled, stick to the defaults. */
1584− return;
1585−
1584+ if ((preferred_states_mask & BIT(2)) &&
1585+ !(preferred_states_mask & BIT(1))) {
1586+ /* Disable C1 and enable C1E. */
15861587 spr_cstates[0].flags |= CPUIDLE_FLAG_UNUSABLE;
15871588 spr_cstates[1].flags &= ~CPUIDLE_FLAG_UNUSABLE;
15881589
15891590 /* Enable C1E using the "C1E promotion" bit. */
1590− c1e_promotion_enable();
1591− disable_promotion_to_c1e = false;
1591+ c1e_promotion = C1E_PROMOTION_ENABLE;
15921592 }
15931593
15941594 /*
@@ -1754,7 +1754,9 @@ static int intel_idle_cpu_init(unsigned int cpu) · 159 unmodified lines
17541754 if (auto_demotion_disable_flags)
17551755 auto_demotion_disable();
17561756
1757− if (disable_promotion_to_c1e)
1757+ if (c1e_promotion == C1E_PROMOTION_ENABLE)
1758+ c1e_promotion_enable();
1759+ else if (c1e_promotion == C1E_PROMOTION_DISABLE)
17581760 c1e_promotion_disable();
17591761
17601762 return 0;
@@ -1833,7 +1835,8 @@ static int __init intel_idle_init(void) · 72 unmodified lines
18331835 if (icpu) {
18341836 cpuidle_state_table = icpu->state_table;
18351837 auto_demotion_disable_flags = icpu->auto_demotion_disable_flags;
1836− disable_promotion_to_c1e = icpu->disable_promotion_to_c1e;
1838+ if (icpu->disable_promotion_to_c1e)
1839+ c1e_promotion = C1E_PROMOTION_DISABLE;
18371840 if (icpu->use_acpi || force_use_acpi)
18381841 intel_idle_acpi_cst_extract();
18391842 } else if (!intel_idle_acpi_cst_extract()) {
drivers/iio/adc/ad7280a.c+6−6
@@ -745,7 +745,7 @@ static int ad7280a_write_thresh(struct iio_dev *indio_dev, · 744 unmodified lines
745745 case IIO_EV_DIR_RISING:
746746 addr = AD7280A_CELL_OVERVOLTAGE_REG;
747747 ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
748− 1, val);
748+ 1, value);
749749 if (ret)
750750 break;
751751 st->cell_threshhigh = value;
@@ -753,7 +753,7 @@ static int ad7280a_write_thresh(struct iio_dev *indio_dev, · 1 unmodified line
753753 case IIO_EV_DIR_FALLING:
754754 addr = AD7280A_CELL_UNDERVOLTAGE_REG;
755755 ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
756− 1, val);
756+ 1, value);
757757 if (ret)
758758 break;
759759 st->cell_threshlow = value;
@@ -770,18 +770,18 @@ static int ad7280a_write_thresh(struct iio_dev *indio_dev, · 10 unmodified lines
770770 case IIO_EV_DIR_RISING:
771771 addr = AD7280A_AUX_ADC_OVERVOLTAGE_REG;
772772 ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
773− 1, val);
773+ 1, value);
774774 if (ret)
775775 break;
776− st->aux_threshhigh = val;
776+ st->aux_threshhigh = value;
777777 break;
778778 case IIO_EV_DIR_FALLING:
779779 addr = AD7280A_AUX_ADC_UNDERVOLTAGE_REG;
780780 ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
781− 1, val);
781+ 1, value);
782782 if (ret)
783783 break;
784− st->aux_threshlow = val;
784+ st->aux_threshlow = value;
785785 break;
786786 default:
787787 ret = -EINVAL;
drivers/iio/chemical/scd4x.c+4−1
@@ -471,12 +471,15 @@ static ssize_t calibration_forced_value_store(struct device *dev, · 470 unmodified lines
471471 ret = scd4x_write_and_fetch(state, CMD_FRC, arg, &val, sizeof(val));
472472 mutex_unlock(&state->lock);
473473
474+ if (ret)
475+ return ret;
476+
474477 if (val == 0xff) {
475478 dev_err(dev, "forced calibration has failed");
476479 return -EINVAL;
477480 }
478481
479− return ret ?: len;
482+ return len;
480483 }
481484
482485 static IIO_DEVICE_ATTR_RW(calibration_auto_enable, 0);
drivers/iio/dac/ad3552r.c+3−3
@@ -656,7 +656,7 @@ static int ad3552r_reset(struct ad3552r_desc *dac) · 655 unmodified lines
656656 {
657657 struct reg_addr_pool addr;
658658 int ret;
659− u16 val;
659+ int val;
660660
661661 dac->gpio_reset = devm_gpiod_get_optional(&dac->spi->dev, "reset",
662662 GPIOD_OUT_LOW);
@@ -809,10 +809,10 @@ static int ad3552r_configure_custom_gain(struct ad3552r_desc *dac, · 146 unmodified lines
809809
810810 gain_child = fwnode_get_named_child_node(child,
811811 "custom-output-range-config");
812− if (IS_ERR(gain_child)) {
812+ if (!gain_child) {
813813 dev_err(dev,
814814 "mandatory custom-output-range-config property missing\n");
815− return PTR_ERR(gain_child);
815+ return -EINVAL;
816816 }
817817
818818 dac->ch_data[ch].range_override = 1;
drivers/iio/dac/ad5446.c+1−1
@@ -178,7 +178,7 @@ static int ad5446_read_raw(struct iio_dev *indio_dev, · 177 unmodified lines
178178
179179 switch (m) {
180180 case IIO_CHAN_INFO_RAW:
181− *val = st->cached_val;
181+ *val = st->cached_val >> chan->scan_type.shift;
182182 return IIO_VAL_INT;
183183 case IIO_CHAN_INFO_SCALE:
184184 *val = st->vref_mv;
drivers/iio/dac/ad5592r-base.c+1−1
@@ -522,7 +522,7 @@ static int ad5592r_alloc_channels(struct iio_dev *iio_dev) · 521 unmodified lines
522522 if (!ret)
523523 st->channel_modes[reg] = tmp;
524524
525− fwnode_property_read_u32(child, "adi,off-state", &tmp);
525+ ret = fwnode_property_read_u32(child, "adi,off-state", &tmp);
526526 if (!ret)
527527 st->channel_offstate[reg] = tmp;
528528 }
drivers/iio/dac/ltc2688.c+1−1
@@ -298,7 +298,7 @@ static int ltc2688_read_raw(struct iio_dev *indio_dev, · 297 unmodified lines
298298 if (ret)
299299 return ret;
300300
301− *val = 16;
301+ *val2 = 16;
302302 return IIO_VAL_FRACTIONAL_LOG2;
303303 case IIO_CHAN_INFO_CALIBBIAS:
304304 ret = regmap_read(st->regmap,
drivers/iio/dac/ti-dac5571.c+18−10
@@ -19,6 +19,7 @@ · 18 unmodified lines
1919 #include <linux/i2c.h>
2020 #include <linux/module.h>
2121 #include <linux/mod_devicetable.h>
22+#include <linux/property.h>
2223 #include <linux/regulator/consumer.h>
2324
2425 enum chip_id {
@@ -311,6 +312,7 @@ static int dac5571_probe(struct i2c_client *client, · 286 unmodified lines
311312 const struct dac5571_spec *spec;
312313 struct dac5571_data *data;
313314 struct iio_dev *indio_dev;
315+ enum chip_id chip_id;
314316 int ret, i;
315317
316318 indio_dev = devm_iio_device_alloc(dev, sizeof(*data));
@@ -326,7 +328,13 @@ static int dac5571_probe(struct i2c_client *client, · 9 unmodified lines
326328 indio_dev->modes = INDIO_DIRECT_MODE;
327329 indio_dev->channels = dac5571_channels;
328330
329− spec = &dac5571_spec[id->driver_data];
331+ if (dev_fwnode(dev))
332+ chip_id = (uintptr_t)device_get_match_data(dev);
333+ else
334+ chip_id = id->driver_data;
335+
336+ spec = &dac5571_spec[chip_id];
337+
330338 indio_dev->num_channels = spec->num_channels;
331339 data->spec = spec;
332340
@@ -385,15 +393,15 @@ static int dac5571_remove(struct i2c_client *i2c) · 52 unmodified lines
385393 }
386394
387395 static const struct of_device_id dac5571_of_id[] = {
388− {.compatible = "ti,dac5571"},
389− {.compatible = "ti,dac6571"},
390− {.compatible = "ti,dac7571"},
391− {.compatible = "ti,dac5574"},
392− {.compatible = "ti,dac6574"},
393− {.compatible = "ti,dac7574"},
394− {.compatible = "ti,dac5573"},
395− {.compatible = "ti,dac6573"},
396− {.compatible = "ti,dac7573"},
396+ {.compatible = "ti,dac5571", .data = (void *)single_8bit},
397+ {.compatible = "ti,dac6571", .data = (void *)single_10bit},
398+ {.compatible = "ti,dac7571", .data = (void *)single_12bit},
399+ {.compatible = "ti,dac5574", .data = (void *)quad_8bit},
400+ {.compatible = "ti,dac6574", .data = (void *)quad_10bit},
401+ {.compatible = "ti,dac7574", .data = (void *)quad_12bit},
402+ {.compatible = "ti,dac5573", .data = (void *)quad_8bit},
403+ {.compatible = "ti,dac6573", .data = (void *)quad_10bit},
404+ {.compatible = "ti,dac7573", .data = (void *)quad_12bit},
397405 {}
398406 };
399407 MODULE_DEVICE_TABLE(of, dac5571_of_id);
drivers/iio/filter/Kconfig+1−0
@@ -8,6 +8,7 @@ menu "Filters" · 7 unmodified lines
88 config ADMV8818
99 tristate "Analog Devices ADMV8818 High-Pass and Low-Pass Filter"
1010 depends on SPI && COMMON_CLK && 64BIT
11+ select REGMAP_SPI
1112 help
1213 Say yes here to build support for Analog Devices ADMV8818
1314 2 GHz to 18 GHz, Digitally Tunable, High-Pass and Low-Pass Filter.
drivers/iio/imu/bmi160/bmi160_core.c+14−6
@@ -730,7 +730,7 @@ static int bmi160_chip_init(struct bmi160_data *data, bool use_spi) · 729 unmodified lines
730730
731731 ret = regmap_write(data->regmap, BMI160_REG_CMD, BMI160_CMD_SOFTRESET);
732732 if (ret)
733− return ret;
733+ goto disable_regulator;
734734
735735 usleep_range(BMI160_SOFTRESET_USLEEP, BMI160_SOFTRESET_USLEEP + 1);
736736
@@ -741,29 +741,37 @@ static int bmi160_chip_init(struct bmi160_data *data, bool use_spi) · 4 unmodified lines
741741 if (use_spi) {
742742 ret = regmap_read(data->regmap, BMI160_REG_DUMMY, &val);
743743 if (ret)
744− return ret;
744+ goto disable_regulator;
745745 }
746746
747747 ret = regmap_read(data->regmap, BMI160_REG_CHIP_ID, &val);
748748 if (ret) {
749749 dev_err(dev, "Error reading chip id\n");
750− return ret;
750+ goto disable_regulator;
751751 }
752752 if (val != BMI160_CHIP_ID_VAL) {
753753 dev_err(dev, "Wrong chip id, got %x expected %x\n",
754754 val, BMI160_CHIP_ID_VAL);
755− return -ENODEV;
755+ ret = -ENODEV;
756+ goto disable_regulator;
756757 }
757758
758759 ret = bmi160_set_mode(data, BMI160_ACCEL, true);
759760 if (ret)
760− return ret;
761+ goto disable_regulator;
761762
762763 ret = bmi160_set_mode(data, BMI160_GYRO, true);
763764 if (ret)
764− return ret;
765+ goto disable_accel;
765766
766767 return 0;
768+
769+disable_accel:
770+ bmi160_set_mode(data, BMI160_ACCEL, false);
771+
772+disable_regulator:
773+ regulator_bulk_disable(ARRAY_SIZE(data->supplies), data->supplies);
774+ return ret;
767775 }
768776
769777 static int bmi160_data_rdy_trigger_set_state(struct iio_trigger *trig,
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c+9−6
@@ -18,12 +18,15 @@ static int inv_icm42600_i2c_bus_setup(struct inv_icm42600_state *st) · 17 unmodified lines
1818 unsigned int mask, val;
1919 int ret;
2020
21− /* setup interface registers */
22− ret = regmap_update_bits(st->map, INV_ICM42600_REG_INTF_CONFIG6,
23− INV_ICM42600_INTF_CONFIG6_MASK,
24− INV_ICM42600_INTF_CONFIG6_I3C_EN);
25− if (ret)
26− return ret;
21+ /*
22+ * setup interface registers
23+ * This register write to REG_INTF_CONFIG6 enables a spike filter that
24+ * is impacting the line and can prevent the I2C ACK to be seen by the
25+ * controller. So we don't test the return value.
26+ */
27+ regmap_update_bits(st->map, INV_ICM42600_REG_INTF_CONFIG6,
28+ INV_ICM42600_INTF_CONFIG6_MASK,
29+ INV_ICM42600_INTF_CONFIG6_I3C_EN);
2730
2831 ret = regmap_update_bits(st->map, INV_ICM42600_REG_INTF_CONFIG4,
2932 INV_ICM42600_INTF_CONFIG4_I3C_BUS_ONLY, 0);
drivers/iio/magnetometer/ak8975.c+1−0
@@ -416,6 +416,7 @@ static int ak8975_power_on(const struct ak8975_data *data) · 415 unmodified lines
416416 if (ret) {
417417 dev_warn(&data->client->dev,
418418 "Failed to enable specified Vid supply\n");
419+ regulator_disable(data->vdd);
419420 return ret;
420421 }
421422
drivers/iio/proximity/sx9324.c+25−7
@@ -70,13 +70,17 @@ · 69 unmodified lines
7070 #define SX9324_REG_AFE_PH2 0x2a
7171 #define SX9324_REG_AFE_PH3 0x2b
7272 #define SX9324_REG_AFE_CTRL8 0x2c
73−#define SX9324_REG_AFE_CTRL8_RESFILTN_4KOHM 0x02
73+#define SX9324_REG_AFE_CTRL8_RESERVED 0x10
74+#define SX9324_REG_AFE_CTRL8_RESFILTIN_4KOHM 0x02
7475 #define SX9324_REG_AFE_CTRL9 0x2d
7576 #define SX9324_REG_AFE_CTRL9_AGAIN_1 0x08
7677
7778 #define SX9324_REG_PROX_CTRL0 0x30
7879 #define SX9324_REG_PROX_CTRL0_GAIN_MASK GENMASK(5, 3)
79−#define SX9324_REG_PROX_CTRL0_GAIN_1 0x80
80+#define SX9324_REG_PROX_CTRL0_GAIN_SHIFT 3
81+#define SX9324_REG_PROX_CTRL0_GAIN_RSVD 0x0
82+#define SX9324_REG_PROX_CTRL0_GAIN_1 0x1
83+#define SX9324_REG_PROX_CTRL0_GAIN_8 0x4
8084 #define SX9324_REG_PROX_CTRL0_RAWFILT_MASK GENMASK(2, 0)
8185 #define SX9324_REG_PROX_CTRL0_RAWFILT_1P50 0x01
8286 #define SX9324_REG_PROX_CTRL1 0x31
@@ -379,7 +383,14 @@ static int sx9324_read_gain(struct sx_common_data *data, · 296 unmodified lines
379383 if (ret)
380384 return ret;
381385
382− *val = 1 << FIELD_GET(SX9324_REG_PROX_CTRL0_GAIN_MASK, regval);
386+ regval = FIELD_GET(SX9324_REG_PROX_CTRL0_GAIN_MASK, regval);
387+ if (regval)
388+ regval--;
389+ else if (regval == SX9324_REG_PROX_CTRL0_GAIN_RSVD ||
390+ regval > SX9324_REG_PROX_CTRL0_GAIN_8)
391+ return -EINVAL;
392+
393+ *val = 1 << regval;
383394
384395 return IIO_VAL_INT;
385396 }
@@ -725,8 +736,12 @@ static int sx9324_write_gain(struct sx_common_data *data, · 339 unmodified lines
725736 unsigned int gain, reg;
726737 int ret;
727738
728− gain = ilog2(val);
729739 reg = SX9324_REG_PROX_CTRL0 + chan->channel / 2;
740+
741+ gain = ilog2(val) + 1;
742+ if (val <= 0 || gain > SX9324_REG_PROX_CTRL0_GAIN_8)
743+ return -EINVAL;
744+
730745 gain = FIELD_PREP(SX9324_REG_PROX_CTRL0_GAIN_MASK, gain);
731746
732747 mutex_lock(&data->mutex);
@@ -781,12 +796,15 @@ static const struct sx_common_reg_default sx9324_default_regs[] = { · 48 unmodified lines
781796 { SX9324_REG_AFE_PH2, 0x1a },
782797 { SX9324_REG_AFE_PH3, 0x16 },
783798
784− { SX9324_REG_AFE_CTRL8, SX9324_REG_AFE_CTRL8_RESFILTN_4KOHM },
799+ { SX9324_REG_AFE_CTRL8, SX9324_REG_AFE_CTRL8_RESERVED |
800+ SX9324_REG_AFE_CTRL8_RESFILTIN_4KOHM },
785801 { SX9324_REG_AFE_CTRL9, SX9324_REG_AFE_CTRL9_AGAIN_1 },
786802
787− { SX9324_REG_PROX_CTRL0, SX9324_REG_PROX_CTRL0_GAIN_1 |
803+ { SX9324_REG_PROX_CTRL0,
804+ SX9324_REG_PROX_CTRL0_GAIN_1 << SX9324_REG_PROX_CTRL0_GAIN_SHIFT |
788805 SX9324_REG_PROX_CTRL0_RAWFILT_1P50 },
789− { SX9324_REG_PROX_CTRL1, SX9324_REG_PROX_CTRL0_GAIN_1 |
806+ { SX9324_REG_PROX_CTRL1,
807+ SX9324_REG_PROX_CTRL0_GAIN_1 << SX9324_REG_PROX_CTRL0_GAIN_SHIFT |
790808 SX9324_REG_PROX_CTRL0_RAWFILT_1P50 },
791809 { SX9324_REG_PROX_CTRL2, SX9324_REG_PROX_CTRL2_AVGNEG_THRESH_16K },
792810 { SX9324_REG_PROX_CTRL3, SX9324_REG_PROX_CTRL3_AVGDEB_2SAMPLES |
drivers/iio/proximity/sx_common.c+1−0
@@ -521,6 +521,7 @@ int sx_common_probe(struct i2c_client *client, · 520 unmodified lines
521521 return dev_err_probe(dev, ret, "error reading WHOAMI\n");
522522
523523 ACPI_COMPANION_SET(&indio_dev->dev, ACPI_COMPANION(dev));
524+ indio_dev->dev.of_node = client->dev.of_node;
524525 indio_dev->modes = INDIO_DIRECT_MODE;
525526
526527 indio_dev->channels = data->chip_info->iio_channels;
drivers/input/keyboard/cypress-sf.c+14−0
@@ -61,6 +61,14 @@ static irqreturn_t cypress_sf_irq_handler(int irq, void *devid) · 60 unmodified lines
6161 return IRQ_HANDLED;
6262 }
6363
64+static void cypress_sf_disable_regulators(void *arg)
65+{
66+ struct cypress_sf_data *touchkey = arg;
67+
68+ regulator_bulk_disable(ARRAY_SIZE(touchkey->regulators),
69+ touchkey->regulators);
70+}
71+
6472 static int cypress_sf_probe(struct i2c_client *client)
6573 {
6674 struct cypress_sf_data *touchkey;
@@ -121,6 +129,12 @@ static int cypress_sf_probe(struct i2c_client *client) · 54 unmodified lines
121129 return error;
122130 }
123131
132+ error = devm_add_action_or_reset(&client->dev,
133+ cypress_sf_disable_regulators,
134+ touchkey);
135+ if (error)
136+ return error;
137+
124138 touchkey->input_dev = devm_input_allocate_device(&client->dev);
125139 if (!touchkey->input_dev) {
126140 dev_err(&client->dev, "Failed to allocate input device\n");
drivers/input/keyboard/omap4-keypad.c+1−1
@@ -393,7 +393,7 @@ static int omap4_keypad_probe(struct platform_device *pdev) · 392 unmodified lines
393393 * revision register.
394394 */
395395 error = pm_runtime_get_sync(dev);
396− if (error) {
396+ if (error < 0) {
397397 dev_err(dev, "pm_runtime_get_sync() failed\n");
398398 pm_runtime_put_noidle(dev);
399399 return error;
drivers/interconnect/qcom/sc7180.c+0−21
@@ -47,7 +47,6 @@ DEFINE_QNODE(qnm_mnoc_sf, SC7180_MASTER_MNOC_SF_MEM_NOC, 1, 32, SC7180_SLAVE_GEM · 46 unmodified lines
4747 DEFINE_QNODE(qnm_snoc_gc, SC7180_MASTER_SNOC_GC_MEM_NOC, 1, 8, SC7180_SLAVE_LLCC);
4848 DEFINE_QNODE(qnm_snoc_sf, SC7180_MASTER_SNOC_SF_MEM_NOC, 1, 16, SC7180_SLAVE_LLCC);
4949 DEFINE_QNODE(qxm_gpu, SC7180_MASTER_GFX3D, 2, 32, SC7180_SLAVE_GEM_NOC_SNOC, SC7180_SLAVE_LLCC);
50−DEFINE_QNODE(ipa_core_master, SC7180_MASTER_IPA_CORE, 1, 8, SC7180_SLAVE_IPA_CORE);
5150 DEFINE_QNODE(llcc_mc, SC7180_MASTER_LLCC, 2, 4, SC7180_SLAVE_EBI1);
5251 DEFINE_QNODE(qhm_mnoc_cfg, SC7180_MASTER_CNOC_MNOC_CFG, 1, 4, SC7180_SLAVE_SERVICE_MNOC);
5352 DEFINE_QNODE(qxm_camnoc_hf0, SC7180_MASTER_CAMNOC_HF0, 2, 32, SC7180_SLAVE_MNOC_HF_MEM_NOC);
@@ -129,7 +128,6 @@ DEFINE_QNODE(qhs_mdsp_ms_mpu_cfg, SC7180_SLAVE_MSS_PROC_MS_MPU_CFG, 1, 4); · 75 unmodified lines
129128 DEFINE_QNODE(qns_gem_noc_snoc, SC7180_SLAVE_GEM_NOC_SNOC, 1, 8, SC7180_MASTER_GEM_NOC_SNOC);
130129 DEFINE_QNODE(qns_llcc, SC7180_SLAVE_LLCC, 1, 16, SC7180_MASTER_LLCC);
131130 DEFINE_QNODE(srvc_gemnoc, SC7180_SLAVE_SERVICE_GEM_NOC, 1, 4);
132−DEFINE_QNODE(ipa_core_slave, SC7180_SLAVE_IPA_CORE, 1, 8);
133131 DEFINE_QNODE(ebi, SC7180_SLAVE_EBI1, 2, 4);
134132 DEFINE_QNODE(qns_mem_noc_hf, SC7180_SLAVE_MNOC_HF_MEM_NOC, 1, 32, SC7180_MASTER_MNOC_HF_MEM_NOC);
135133 DEFINE_QNODE(qns_mem_noc_sf, SC7180_SLAVE_MNOC_SF_MEM_NOC, 1, 32, SC7180_MASTER_MNOC_SF_MEM_NOC);
@@ -160,7 +158,6 @@ DEFINE_QBCM(bcm_mc0, "MC0", true, &ebi); · 24 unmodified lines
160158 DEFINE_QBCM(bcm_sh0, "SH0", true, &qns_llcc);
161159 DEFINE_QBCM(bcm_mm0, "MM0", false, &qns_mem_noc_hf);
162160 DEFINE_QBCM(bcm_ce0, "CE0", false, &qxm_crypto);
163−DEFINE_QBCM(bcm_ip0, "IP0", false, &ipa_core_slave);
164161 DEFINE_QBCM(bcm_cn0, "CN0", true, &qnm_snoc, &xm_qdss_dap, &qhs_a1_noc_cfg, &qhs_a2_noc_cfg, &qhs_ahb2phy0, &qhs_aop, &qhs_aoss, &qhs_boot_rom, &qhs_camera_cfg, &qhs_camera_nrt_throttle_cfg, &qhs_camera_rt_throttle_cfg, &qhs_clk_ctl, &qhs_cpr_cx, &qhs_cpr_mx, &qhs_crypto0_cfg, &qhs_dcc_cfg, &qhs_ddrss_cfg, &qhs_display_cfg, &qhs_display_rt_throttle_cfg, &qhs_display_throttle_cfg, &qhs_glm, &qhs_gpuss_cfg, &qhs_imem_cfg, &qhs_ipa, &qhs_mnoc_cfg, &qhs_mss_cfg, &qhs_npu_cfg, &qhs_npu_dma_throttle_cfg, &qhs_npu_dsp_throttle_cfg, &qhs_pimem_cfg, &qhs_prng, &qhs_qdss_cfg, &qhs_qm_cfg, &qhs_qm_mpu_cfg, &qhs_qup0, &qhs_qup1, &qhs_security, &qhs_snoc_cfg, &qhs_tcsr, &qhs_tlmm_1, &qhs_tlmm_2, &qhs_tlmm_3, &qhs_ufs_mem_cfg, &qhs_usb3, &qhs_venus_cfg, &qhs_venus_throttle_cfg, &qhs_vsense_ctrl_cfg, &srvc_cnoc);
165162 DEFINE_QBCM(bcm_mm1, "MM1", false, &qxm_camnoc_hf0_uncomp, &qxm_camnoc_hf1_uncomp, &qxm_camnoc_sf_uncomp, &qhm_mnoc_cfg, &qxm_mdp0, &qxm_rot, &qxm_venus0, &qxm_venus_arm9);
166163 DEFINE_QBCM(bcm_sh2, "SH2", false, &acm_sys_tcu);
@@ -372,22 +369,6 @@ static struct qcom_icc_desc sc7180_gem_noc = { · 205 unmodified lines
372369 .num_bcms = ARRAY_SIZE(gem_noc_bcms),
373370 };
374371
375−static struct qcom_icc_bcm *ipa_virt_bcms[] = {
376− &bcm_ip0,
377−};
378−
379−static struct qcom_icc_node *ipa_virt_nodes[] = {
380− [MASTER_IPA_CORE] = &ipa_core_master,
381− [SLAVE_IPA_CORE] = &ipa_core_slave,
382−};
383−
384−static struct qcom_icc_desc sc7180_ipa_virt = {
385− .nodes = ipa_virt_nodes,
386− .num_nodes = ARRAY_SIZE(ipa_virt_nodes),
387− .bcms = ipa_virt_bcms,
388− .num_bcms = ARRAY_SIZE(ipa_virt_bcms),
389−};
390−
391372 static struct qcom_icc_bcm *mc_virt_bcms[] = {
392373 &bcm_acv,
393374 &bcm_mc0,
@@ -519,8 +500,6 @@ static const struct of_device_id qnoc_of_match[] = { · 125 unmodified lines
519500 .data = &sc7180_dc_noc},
520501 { .compatible = "qcom,sc7180-gem-noc",
521502 .data = &sc7180_gem_noc},
522− { .compatible = "qcom,sc7180-ipa-virt",
523− .data = &sc7180_ipa_virt},
524503 { .compatible = "qcom,sc7180-mc-virt",
525504 .data = &sc7180_mc_virt},
526505 { .compatible = "qcom,sc7180-mmss-noc",
drivers/interconnect/qcom/sdx55.c+0−21
@@ -18,7 +18,6 @@ · 17 unmodified lines
1818 #include "icc-rpmh.h"
1919 #include "sdx55.h"
2020
21−DEFINE_QNODE(ipa_core_master, SDX55_MASTER_IPA_CORE, 1, 8, SDX55_SLAVE_IPA_CORE);
2221 DEFINE_QNODE(llcc_mc, SDX55_MASTER_LLCC, 4, 4, SDX55_SLAVE_EBI_CH0);
2322 DEFINE_QNODE(acm_tcu, SDX55_MASTER_TCU_0, 1, 8, SDX55_SLAVE_LLCC, SDX55_SLAVE_MEM_NOC_SNOC, SDX55_SLAVE_MEM_NOC_PCIE_SNOC);
2423 DEFINE_QNODE(qnm_snoc_gc, SDX55_MASTER_SNOC_GC_MEM_NOC, 1, 8, SDX55_SLAVE_LLCC);
@@ -40,7 +39,6 @@ DEFINE_QNODE(xm_pcie, SDX55_MASTER_PCIE, 1, 8, SDX55_SLAVE_ANOC_SNOC); · 15 unmodified lines
4039 DEFINE_QNODE(xm_qdss_etr, SDX55_MASTER_QDSS_ETR, 1, 8, SDX55_SLAVE_SNOC_CFG, SDX55_SLAVE_EMAC_CFG, SDX55_SLAVE_USB3, SDX55_SLAVE_AOSS, SDX55_SLAVE_SPMI_FETCHER, SDX55_SLAVE_QDSS_CFG, SDX55_SLAVE_PDM, SDX55_SLAVE_SNOC_MEM_NOC_GC, SDX55_SLAVE_TCSR, SDX55_SLAVE_CNOC_DDRSS, SDX55_SLAVE_SPMI_VGI_COEX, SDX55_SLAVE_QPIC, SDX55_SLAVE_OCIMEM, SDX55_SLAVE_IPA_CFG, SDX55_SLAVE_USB3_PHY_CFG, SDX55_SLAVE_AOP, SDX55_SLAVE_BLSP_1, SDX55_SLAVE_SDCC_1, SDX55_SLAVE_CNOC_MSS, SDX55_SLAVE_PCIE_PARF, SDX55_SLAVE_ECC_CFG, SDX55_SLAVE_AUDIO, SDX55_SLAVE_AOSS, SDX55_SLAVE_PRNG, SDX55_SLAVE_CRYPTO_0_CFG, SDX55_SLAVE_TCU, SDX55_SLAVE_CLK_CTL, SDX55_SLAVE_IMEM_CFG);
4140 DEFINE_QNODE(xm_sdc1, SDX55_MASTER_SDCC_1, 1, 8, SDX55_SLAVE_AOSS, SDX55_SLAVE_IPA_CFG, SDX55_SLAVE_ANOC_SNOC, SDX55_SLAVE_AOP, SDX55_SLAVE_AUDIO);
4241 DEFINE_QNODE(xm_usb3, SDX55_MASTER_USB3, 1, 8, SDX55_SLAVE_ANOC_SNOC);
43−DEFINE_QNODE(ipa_core_slave, SDX55_SLAVE_IPA_CORE, 1, 8);
4442 DEFINE_QNODE(ebi, SDX55_SLAVE_EBI_CH0, 1, 4);
4543 DEFINE_QNODE(qns_llcc, SDX55_SLAVE_LLCC, 1, 16, SDX55_SLAVE_EBI_CH0);
4644 DEFINE_QNODE(qns_memnoc_snoc, SDX55_SLAVE_MEM_NOC_SNOC, 1, 8, SDX55_MASTER_MEM_NOC_SNOC);
@@ -82,7 +80,6 @@ DEFINE_QNODE(xs_sys_tcu_cfg, SDX55_SLAVE_TCU, 1, 8); · 35 unmodified lines
8280 DEFINE_QBCM(bcm_mc0, "MC0", true, &ebi);
8381 DEFINE_QBCM(bcm_sh0, "SH0", true, &qns_llcc);
8482 DEFINE_QBCM(bcm_ce0, "CE0", false, &qxm_crypto);
85−DEFINE_QBCM(bcm_ip0, "IP0", false, &ipa_core_slave);
8683 DEFINE_QBCM(bcm_pn0, "PN0", false, &qhm_snoc_cfg);
8784 DEFINE_QBCM(bcm_sh3, "SH3", false, &xm_apps_rdwr);
8885 DEFINE_QBCM(bcm_sh4, "SH4", false, &qns_memnoc_snoc, &qns_sys_pcie);
@@ -219,22 +216,6 @@ static const struct qcom_icc_desc sdx55_system_noc = { · 130 unmodified lines
219216 .num_bcms = ARRAY_SIZE(system_noc_bcms),
220217 };
221218
222−static struct qcom_icc_bcm *ipa_virt_bcms[] = {
223− &bcm_ip0,
224−};
225−
226−static struct qcom_icc_node *ipa_virt_nodes[] = {
227− [MASTER_IPA_CORE] = &ipa_core_master,
228− [SLAVE_IPA_CORE] = &ipa_core_slave,
229−};
230−
231−static const struct qcom_icc_desc sdx55_ipa_virt = {
232− .nodes = ipa_virt_nodes,
233− .num_nodes = ARRAY_SIZE(ipa_virt_nodes),
234− .bcms = ipa_virt_bcms,
235− .num_bcms = ARRAY_SIZE(ipa_virt_bcms),
236−};
237−
238219 static const struct of_device_id qnoc_of_match[] = {
239220 { .compatible = "qcom,sdx55-mc-virt",
240221 .data = &sdx55_mc_virt},
@@ -242,8 +223,6 @@ static const struct of_device_id qnoc_of_match[] = { · 1 unmodified line
242223 .data = &sdx55_mem_noc},
243224 { .compatible = "qcom,sdx55-system-noc",
244225 .data = &sdx55_system_noc},
245− { .compatible = "qcom,sdx55-ipa-virt",
246− .data = &sdx55_ipa_virt},
247226 { }
248227 };
249228 MODULE_DEVICE_TABLE(of, qnoc_of_match);
drivers/md/bcache/journal.c+1−1
@@ -771,12 +771,12 @@ static void journal_write_unlocked(struct closure *cl) · 770 unmodified lines
771771
772772 bio_reset(bio, ca->bdev, REQ_OP_WRITE |
773773 REQ_SYNC | REQ_META | REQ_PREFLUSH | REQ_FUA);
774− bch_bio_map(bio, w->data);
775774 bio->bi_iter.bi_sector = PTR_OFFSET(k, i);
776775 bio->bi_iter.bi_size = sectors << 9;
777776
778777 bio->bi_end_io = journal_write_endio;
779778 bio->bi_private = w;
779+ bch_bio_map(bio, w->data);
780780
781781 trace_bcache_journal_write(bio, w->data->keys);
782782 bio_list_add(&list, bio);
drivers/md/bcache/request.c+1−1
@@ -685,7 +685,7 @@ static void do_bio_hook(struct search *s, · 684 unmodified lines
685685 {
686686 struct bio *bio = &s->bio.bio;
687687
688− bio_init_clone(bio->bi_bdev, bio, orig_bio, GFP_NOIO);
688+ bio_init_clone(orig_bio->bi_bdev, bio, orig_bio, GFP_NOIO);
689689 /*
690690 * bi_end_io can be set separately somewhere else, e.g. the
691691 * variants in,
drivers/md/dm-integrity.c+5−2
@@ -4399,6 +4399,7 @@ try_smaller_buffer: · 4398 unmodified lines
43994399 }
44004400
44014401 if (ic->internal_hash) {
4402+ size_t recalc_tags_size;
44024403 ic->recalc_wq = alloc_workqueue("dm-integrity-recalc", WQ_MEM_RECLAIM, 1);
44034404 if (!ic->recalc_wq ) {
44044405 ti->error = "Cannot allocate workqueue";
@@ -4412,8 +4413,10 @@ try_smaller_buffer: · 7 unmodified lines
44124413 r = -ENOMEM;
44134414 goto bad;
44144415 }
4415− ic->recalc_tags = kvmalloc_array(RECALC_SECTORS >> ic->sb->log2_sectors_per_block,
4416− ic->tag_size, GFP_KERNEL);
4416+ recalc_tags_size = (RECALC_SECTORS >> ic->sb->log2_sectors_per_block) * ic->tag_size;
4417+ if (crypto_shash_digestsize(ic->internal_hash) > ic->tag_size)
4418+ recalc_tags_size += crypto_shash_digestsize(ic->internal_hash) - ic->tag_size;
4419+ ic->recalc_tags = kvmalloc(recalc_tags_size, GFP_KERNEL);
44174420 if (!ic->recalc_tags) {
44184421 ti->error = "Cannot allocate tags for recalculating";
44194422 r = -ENOMEM;
drivers/md/dm-ps-historical-service-time.c+5−6
@@ -27,7 +27,6 @@ · 26 unmodified lines
2727 #include <linux/blkdev.h>
2828 #include <linux/slab.h>
2929 #include <linux/module.h>
30−#include <linux/sched/clock.h>
3130
3231
3332 #define DM_MSG_PREFIX "multipath historical-service-time"
@@ -433,7 +432,7 @@ static struct dm_path *hst_select_path(struct path_selector *ps, · 399 unmodified lines
433432 {
434433 struct selector *s = ps->context;
435434 struct path_info *pi = NULL, *best = NULL;
436− u64 time_now = sched_clock();
435+ u64 time_now = ktime_get_ns();
437436 struct dm_path *ret = NULL;
438437 unsigned long flags;
439438
@@ -474,7 +473,7 @@ static int hst_start_io(struct path_selector *ps, struct dm_path *path, · 34 unmodified lines
474473
475474 static u64 path_service_time(struct path_info *pi, u64 start_time)
476475 {
477− u64 sched_now = ktime_get_ns();
476+ u64 now = ktime_get_ns();
478477
479478 /* if a previous disk request has finished after this IO was
480479 * sent to the hardware, pretend the submission happened
@@ -483,11 +482,11 @@ static u64 path_service_time(struct path_info *pi, u64 start_time) · 2 unmodified lines
483482 if (time_after64(pi->last_finish, start_time))
484483 start_time = pi->last_finish;
485484
486− pi->last_finish = sched_now;
487− if (time_before64(sched_now, start_time))
485+ pi->last_finish = now;
486+ if (time_before64(now, start_time))
488487 return 0;
489488
490− return sched_now - start_time;
489+ return now - start_time;
491490 }
492491
493492 static int hst_end_io(struct path_selector *ps, struct dm_path *path,
drivers/md/dm-zone.c+28−21
@@ -360,16 +360,20 @@ static int dm_update_zone_wp_offset(struct mapped_device *md, unsigned int zno, · 359 unmodified lines
360360 return 0;
361361 }
362362
363+struct orig_bio_details {
364+ unsigned int op;
365+ unsigned int nr_sectors;
366+};
367+
363368 /*
364369 * First phase of BIO mapping for targets with zone append emulation:
365370 * check all BIO that change a zone writer pointer and change zone
366371 * append operations into regular write operations.
367372 */
368373 static bool dm_zone_map_bio_begin(struct mapped_device *md,
369− struct bio *orig_bio, struct bio *clone)
374+ unsigned int zno, struct bio *clone)
370375 {
371376 sector_t zsectors = blk_queue_zone_sectors(md->queue);
372− unsigned int zno = bio_zone_no(orig_bio);
373377 unsigned int zwp_offset = READ_ONCE(md->zwp_offset[zno]);
374378
375379 /*
@@ -384,7 +388,7 @@ static bool dm_zone_map_bio_begin(struct mapped_device *md, · 8 unmodified lines
384388 WRITE_ONCE(md->zwp_offset[zno], zwp_offset);
385389 }
386390
387− switch (bio_op(orig_bio)) {
391+ switch (bio_op(clone)) {
388392 case REQ_OP_ZONE_RESET:
389393 case REQ_OP_ZONE_FINISH:
390394 return true;
@@ -401,9 +405,8 @@ static bool dm_zone_map_bio_begin(struct mapped_device *md, · 10 unmodified lines
401405 * target zone.
402406 */
403407 clone->bi_opf = REQ_OP_WRITE | REQ_NOMERGE |
404− (orig_bio->bi_opf & (~REQ_OP_MASK));
405− clone->bi_iter.bi_sector =
406− orig_bio->bi_iter.bi_sector + zwp_offset;
408+ (clone->bi_opf & (~REQ_OP_MASK));
409+ clone->bi_iter.bi_sector += zwp_offset;
407410 break;
408411 default:
409412 DMWARN_LIMIT("Invalid BIO operation");
@@ -423,11 +426,10 @@ static bool dm_zone_map_bio_begin(struct mapped_device *md, · 13 unmodified lines
423426 * data written to a zone. Note that at this point, the remapped clone BIO
424427 * may already have completed, so we do not touch it.
425428 */
426−static blk_status_t dm_zone_map_bio_end(struct mapped_device *md,
427− struct bio *orig_bio,
429+static blk_status_t dm_zone_map_bio_end(struct mapped_device *md, unsigned int zno,
430+ struct orig_bio_details *orig_bio_details,
428431 unsigned int nr_sectors)
429432 {
430− unsigned int zno = bio_zone_no(orig_bio);
431433 unsigned int zwp_offset = READ_ONCE(md->zwp_offset[zno]);
432434
433435 /* The clone BIO may already have been completed and failed */
@@ -435,7 +437,7 @@ static blk_status_t dm_zone_map_bio_end(struct mapped_device *md, · 1 unmodified line
435437 return BLK_STS_IOERR;
436438
437439 /* Update the zone wp offset */
438− switch (bio_op(orig_bio)) {
440+ switch (orig_bio_details->op) {
439441 case REQ_OP_ZONE_RESET:
440442 WRITE_ONCE(md->zwp_offset[zno], 0);
441443 return BLK_STS_OK;
@@ -452,7 +454,7 @@ static blk_status_t dm_zone_map_bio_end(struct mapped_device *md, · 10 unmodified lines
452454 * Check that the target did not truncate the write operation
453455 * emulating a zone append.
454456 */
455− if (nr_sectors != bio_sectors(orig_bio)) {
457+ if (nr_sectors != orig_bio_details->nr_sectors) {
456458 DMWARN_LIMIT("Truncated write for zone append");
457459 return BLK_STS_IOERR;
458460 }
@@ -488,7 +490,7 @@ static inline void dm_zone_unlock(struct request_queue *q, · 29 unmodified lines
488490 bio_clear_flag(clone, BIO_ZONE_WRITE_LOCKED);
489491 }
490492
491−static bool dm_need_zone_wp_tracking(struct bio *orig_bio)
493+static bool dm_need_zone_wp_tracking(struct bio *bio)
492494 {
493495 /*
494496 * Special processing is not needed for operations that do not need the
@@ -496,15 +498,15 @@ static bool dm_need_zone_wp_tracking(struct bio *orig_bio) · 1 unmodified line
496498 * zones and all operations that do not modify directly a sequential
497499 * zone write pointer.
498500 */
499− if (op_is_flush(orig_bio->bi_opf) && !bio_sectors(orig_bio))
501+ if (op_is_flush(bio->bi_opf) && !bio_sectors(bio))
500502 return false;
501− switch (bio_op(orig_bio)) {
503+ switch (bio_op(bio)) {
502504 case REQ_OP_WRITE_ZEROES:
503505 case REQ_OP_WRITE:
504506 case REQ_OP_ZONE_RESET:
505507 case REQ_OP_ZONE_FINISH:
506508 case REQ_OP_ZONE_APPEND:
507− return bio_zone_is_seq(orig_bio);
509+ return bio_zone_is_seq(bio);
508510 default:
509511 return false;
510512 }
@@ -519,8 +521,8 @@ int dm_zone_map_bio(struct dm_target_io *tio) · 8 unmodified lines
519521 struct dm_target *ti = tio->ti;
520522 struct mapped_device *md = io->md;
521523 struct request_queue *q = md->queue;
522− struct bio *orig_bio = io->orig_bio;
523524 struct bio *clone = &tio->clone;
525+ struct orig_bio_details orig_bio_details;
524526 unsigned int zno;
525527 blk_status_t sts;
526528 int r;
@@ -529,18 +531,21 @@ int dm_zone_map_bio(struct dm_target_io *tio) · 2 unmodified lines
529531 * IOs that do not change a zone write pointer do not need
530532 * any additional special processing.
531533 */
532− if (!dm_need_zone_wp_tracking(orig_bio))
534+ if (!dm_need_zone_wp_tracking(clone))
533535 return ti->type->map(ti, clone);
534536
535537 /* Lock the target zone */
536− zno = bio_zone_no(orig_bio);
538+ zno = bio_zone_no(clone);
537539 dm_zone_lock(q, zno, clone);
538540
541+ orig_bio_details.nr_sectors = bio_sectors(clone);
542+ orig_bio_details.op = bio_op(clone);
543+
539544 /*
540545 * Check that the bio and the target zone write pointer offset are
541546 * both valid, and if the bio is a zone append, remap it to a write.
542547 */
543− if (!dm_zone_map_bio_begin(md, orig_bio, clone)) {
548+ if (!dm_zone_map_bio_begin(md, zno, clone)) {
544549 dm_zone_unlock(q, zno, clone);
545550 return DM_MAPIO_KILL;
546551 }
@@ -560,7 +565,8 @@ int dm_zone_map_bio(struct dm_target_io *tio) · 13 unmodified lines
560565 * The target submitted the clone BIO. The target zone will
561566 * be unlocked on completion of the clone.
562567 */
563− sts = dm_zone_map_bio_end(md, orig_bio, *tio->len_ptr);
568+ sts = dm_zone_map_bio_end(md, zno, &orig_bio_details,
569+ *tio->len_ptr);
564570 break;
565571 case DM_MAPIO_REMAPPED:
566572 /*
@@ -568,7 +574,8 @@ int dm_zone_map_bio(struct dm_target_io *tio) · 1 unmodified line
568574 * unlock the target zone here as the clone will not be
569575 * submitted.
570576 */
571− sts = dm_zone_map_bio_end(md, orig_bio, *tio->len_ptr);
577+ sts = dm_zone_map_bio_end(md, zno, &orig_bio_details,
578+ *tio->len_ptr);
572579 if (sts != BLK_STS_OK)
573580 dm_zone_unlock(q, zno, clone);
574581 break;
drivers/md/dm.c+7−11
@@ -1323,8 +1323,7 @@ static void __map_bio(struct bio *clone) · 1322 unmodified lines
13231323 }
13241324
13251325 static void alloc_multiple_bios(struct bio_list *blist, struct clone_info *ci,
1326− struct dm_target *ti, unsigned num_bios,
1327− unsigned *len)
1326+ struct dm_target *ti, unsigned num_bios)
13281327 {
13291328 struct bio *bio;
13301329 int try;
@@ -1335,7 +1334,7 @@ static void alloc_multiple_bios(struct bio_list *blist, struct clone_info *ci, · 4 unmodified lines
13351334 if (try)
13361335 mutex_lock(&ci->io->md->table_devices_lock);
13371336 for (bio_nr = 0; bio_nr < num_bios; bio_nr++) {
1338− bio = alloc_tio(ci, ti, bio_nr, len,
1337+ bio = alloc_tio(ci, ti, bio_nr, NULL,
13391338 try ? GFP_NOIO : GFP_NOWAIT);
13401339 if (!bio)
13411340 break;
@@ -1363,11 +1362,11 @@ static void __send_duplicate_bios(struct clone_info *ci, struct dm_target *ti, · 21 unmodified lines
13631362 break;
13641363 case 1:
13651364 clone = alloc_tio(ci, ti, 0, len, GFP_NOIO);
1366− dm_tio_set_flag(clone_to_tio(clone), DM_TIO_IS_DUPLICATE_BIO);
13671365 __map_bio(clone);
13681366 break;
13691367 default:
1370− alloc_multiple_bios(&blist, ci, ti, num_bios, len);
1368+ /* dm_accept_partial_bio() is not supported with shared tio->len_ptr */
1369+ alloc_multiple_bios(&blist, ci, ti, num_bios);
13711370 while ((clone = bio_list_pop(&blist))) {
13721371 dm_tio_set_flag(clone_to_tio(clone), DM_TIO_IS_DUPLICATE_BIO);
13731372 __map_bio(clone);
@@ -1392,6 +1391,7 @@ static void __send_empty_flush(struct clone_info *ci) · 18 unmodified lines
13921391
13931392 ci->bio = &flush_bio;
13941393 ci->sector_count = 0;
1394+ ci->io->tio.clone.bi_iter.bi_size = 0;
13951395
13961396 while ((ti = dm_table_get_target(ci->map, target_nr++)))
13971397 __send_duplicate_bios(ci, ti, ti->num_flush_bios, NULL);
@@ -1407,14 +1407,10 @@ static void __send_changing_extent_only(struct clone_info *ci, struct dm_target · 9 unmodified lines
14071407 len = min_t(sector_t, ci->sector_count,
14081408 max_io_len_target_boundary(ti, dm_target_offset(ti, ci->sector)));
14091409
1410− /*
1411− * dm_accept_partial_bio cannot be used with duplicate bios,
1412− * so update clone_info cursor before __send_duplicate_bios().
1413− */
1410+ __send_duplicate_bios(ci, ti, num_bios, &len);
1411+
14141412 ci->sector += len;
14151413 ci->sector_count -= len;
1416−
1417− __send_duplicate_bios(ci, ti, num_bios, &len);
14181414 }
14191415
14201416 static bool is_abnormal_io(struct bio *bio)
drivers/media/platform/nxp/Kconfig+1−0
@@ -7,6 +7,7 @@ comment "NXP media platform drivers" · 6 unmodified lines
77 config VIDEO_IMX_MIPI_CSIS
88 tristate "NXP MIPI CSI-2 CSIS receiver found on i.MX7 and i.MX8 models"
99 depends on ARCH_MXC || COMPILE_TEST
10+ depends on VIDEO_DEV
1011 select MEDIA_CONTROLLER
1112 select V4L2_FWNODE
1213 select VIDEO_V4L2_SUBDEV_API
drivers/media/platform/rockchip/rga/rga.c+1−1
@@ -892,7 +892,7 @@ static int rga_probe(struct platform_device *pdev) · 891 unmodified lines
892892 }
893893 rga->dst_mmu_pages =
894894 (unsigned int *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, 3);
895− if (rga->dst_mmu_pages) {
895+ if (!rga->dst_mmu_pages) {
896896 ret = -ENOMEM;
897897 goto free_src_pages;
898898 }
drivers/media/tuners/si2157.c+11−11
@@ -77,16 +77,16 @@ err_mutex_unlock: · 76 unmodified lines
7777 }
7878
7979 static const struct si2157_tuner_info si2157_tuners[] = {
80− { SI2141, false, 0x60, SI2141_60_FIRMWARE, SI2141_A10_FIRMWARE },
81− { SI2141, false, 0x61, SI2141_61_FIRMWARE, SI2141_A10_FIRMWARE },
82− { SI2146, false, 0x11, SI2146_11_FIRMWARE, NULL },
83− { SI2147, false, 0x50, SI2147_50_FIRMWARE, NULL },
84− { SI2148, true, 0x32, SI2148_32_FIRMWARE, SI2158_A20_FIRMWARE },
85− { SI2148, true, 0x33, SI2148_33_FIRMWARE, SI2158_A20_FIRMWARE },
86− { SI2157, false, 0x50, SI2157_50_FIRMWARE, SI2157_A30_FIRMWARE },
87− { SI2158, false, 0x50, SI2158_50_FIRMWARE, SI2158_A20_FIRMWARE },
88− { SI2158, false, 0x51, SI2158_51_FIRMWARE, SI2158_A20_FIRMWARE },
89− { SI2177, false, 0x50, SI2177_50_FIRMWARE, SI2157_A30_FIRMWARE },
80+ { SI2141, 0x60, false, SI2141_60_FIRMWARE, SI2141_A10_FIRMWARE },
81+ { SI2141, 0x61, false, SI2141_61_FIRMWARE, SI2141_A10_FIRMWARE },
82+ { SI2146, 0x11, false, SI2146_11_FIRMWARE, NULL },
83+ { SI2147, 0x50, false, SI2147_50_FIRMWARE, NULL },
84+ { SI2148, 0x32, true, SI2148_32_FIRMWARE, SI2158_A20_FIRMWARE },
85+ { SI2148, 0x33, true, SI2148_33_FIRMWARE, SI2158_A20_FIRMWARE },
86+ { SI2157, 0x50, false, SI2157_50_FIRMWARE, SI2157_A30_FIRMWARE },
87+ { SI2158, 0x50, false, SI2158_50_FIRMWARE, SI2158_A20_FIRMWARE },
88+ { SI2158, 0x51, false, SI2158_51_FIRMWARE, SI2158_A20_FIRMWARE },
89+ { SI2177, 0x50, false, SI2177_50_FIRMWARE, SI2157_A30_FIRMWARE },
9090 };
9191
9292 static int si2157_load_firmware(struct dvb_frontend *fe,
@@ -178,7 +178,7 @@ static int si2157_find_and_load_firmware(struct dvb_frontend *fe) · 85 unmodified lines
178178 }
179179 }
180180
181− if (!fw_name && !fw_alt_name) {
181+ if (required && !fw_name && !fw_alt_name) {
182182 dev_err(&client->dev,
183183 "unknown chip version Si21%d-%c%c%c ROM 0x%02x\n",
184184 part_id, cmd.args[1], cmd.args[3], cmd.args[4], rom_id);
drivers/memory/atmel-ebi.c+17−6
@@ -544,20 +544,27 @@ static int atmel_ebi_probe(struct platform_device *pdev) · 543 unmodified lines
544544 smc_np = of_parse_phandle(dev->of_node, "atmel,smc", 0);
545545
546546 ebi->smc.regmap = syscon_node_to_regmap(smc_np);
547− if (IS_ERR(ebi->smc.regmap))
548− return PTR_ERR(ebi->smc.regmap);
547+ if (IS_ERR(ebi->smc.regmap)) {
548+ ret = PTR_ERR(ebi->smc.regmap);
549+ goto put_node;
550+ }
549551
550552 ebi->smc.layout = atmel_hsmc_get_reg_layout(smc_np);
551− if (IS_ERR(ebi->smc.layout))
552− return PTR_ERR(ebi->smc.layout);
553+ if (IS_ERR(ebi->smc.layout)) {
554+ ret = PTR_ERR(ebi->smc.layout);
555+ goto put_node;
556+ }
553557
554558 ebi->smc.clk = of_clk_get(smc_np, 0);
555559 if (IS_ERR(ebi->smc.clk)) {
556− if (PTR_ERR(ebi->smc.clk) != -ENOENT)
557− return PTR_ERR(ebi->smc.clk);
560+ if (PTR_ERR(ebi->smc.clk) != -ENOENT) {
561+ ret = PTR_ERR(ebi->smc.clk);
562+ goto put_node;
563+ }
558564
559565 ebi->smc.clk = NULL;
560566 }
567+ of_node_put(smc_np);
561568 ret = clk_prepare_enable(ebi->smc.clk);
562569 if (ret)
563570 return ret;
@@ -608,6 +615,10 @@ static int atmel_ebi_probe(struct platform_device *pdev) · 44 unmodified lines
608615 }
609616
610617 return of_platform_populate(np, NULL, NULL, dev);
618+
619+put_node:
620+ of_node_put(smc_np);
621+ return ret;
611622 }
612623
613624 static __maybe_unused int atmel_ebi_resume(struct device *dev)
drivers/memory/fsl_ifc.c+1−2
@@ -287,8 +287,7 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev) · 286 unmodified lines
287287 }
288288
289289 /* legacy dts may still use "simple-bus" compatible */
290− ret = of_platform_populate(dev->dev.of_node, NULL, NULL,
291− &dev->dev);
290+ ret = of_platform_default_populate(dev->dev.of_node, NULL, &dev->dev);
292291 if (ret)
293292 goto err_free_nandirq;
294293
drivers/memory/renesas-rpc-if.c+55−15
@@ -164,25 +164,39 @@ static const struct regmap_access_table rpcif_volatile_table = { · 163 unmodified lines
164164
165165
166166 /*
167− * Custom accessor functions to ensure SMRDR0 and SMWDR0 are always accessed
168− * with proper width. Requires SMENR_SPIDE to be correctly set before!
167+ * Custom accessor functions to ensure SM[RW]DR[01] are always accessed with
168+ * proper width. Requires rpcif.xfer_size to be correctly set before!
169169 */
170170 static int rpcif_reg_read(void *context, unsigned int reg, unsigned int *val)
171171 {
172172 struct rpcif *rpc = context;
173173
174− if (reg == RPCIF_SMRDR0 || reg == RPCIF_SMWDR0) {
175− u32 spide = readl(rpc->base + RPCIF_SMENR) & RPCIF_SMENR_SPIDE(0xF);
176−
177− if (spide == 0x8) {
174+ switch (reg) {
175+ case RPCIF_SMRDR0:
176+ case RPCIF_SMWDR0:
177+ switch (rpc->xfer_size) {
178+ case 1:
178179 *val = readb(rpc->base + reg);
179180 return 0;
180− } else if (spide == 0xC) {
181+
182+ case 2:
181183 *val = readw(rpc->base + reg);
182184 return 0;
183− } else if (spide != 0xF) {
185+
186+ case 4:
187+ case 8:
188+ *val = readl(rpc->base + reg);
189+ return 0;
190+
191+ default:
184192 return -EILSEQ;
185193 }
194+
195+ case RPCIF_SMRDR1:
196+ case RPCIF_SMWDR1:
197+ if (rpc->xfer_size != 8)
198+ return -EILSEQ;
199+ break;
186200 }
187201
188202 *val = readl(rpc->base + reg);
@@ -193,18 +207,34 @@ static int rpcif_reg_write(void *context, unsigned int reg, unsigned int val) · 4 unmodified lines
193207 {
194208 struct rpcif *rpc = context;
195209
196− if (reg == RPCIF_SMRDR0 || reg == RPCIF_SMWDR0) {
197− u32 spide = readl(rpc->base + RPCIF_SMENR) & RPCIF_SMENR_SPIDE(0xF);
198−
199− if (spide == 0x8) {
210+ switch (reg) {
211+ case RPCIF_SMWDR0:
212+ switch (rpc->xfer_size) {
213+ case 1:
200214 writeb(val, rpc->base + reg);
201215 return 0;
202− } else if (spide == 0xC) {
216+
217+ case 2:
203218 writew(val, rpc->base + reg);
204219 return 0;
205− } else if (spide != 0xF) {
220+
221+ case 4:
222+ case 8:
223+ writel(val, rpc->base + reg);
224+ return 0;
225+
226+ default:
206227 return -EILSEQ;
207228 }
229+
230+ case RPCIF_SMWDR1:
231+ if (rpc->xfer_size != 8)
232+ return -EILSEQ;
233+ break;
234+
235+ case RPCIF_SMRDR0:
236+ case RPCIF_SMRDR1:
237+ return -EPERM;
208238 }
209239
210240 writel(val, rpc->base + reg);
@@ -469,6 +499,7 @@ int rpcif_manual_xfer(struct rpcif *rpc) · 258 unmodified lines
469499
470500 smenr |= RPCIF_SMENR_SPIDE(rpcif_bits_set(rpc, nbytes));
471501 regmap_write(rpc->regmap, RPCIF_SMENR, smenr);
502+ rpc->xfer_size = nbytes;
472503
473504 memcpy(data, rpc->buffer + pos, nbytes);
474505 if (nbytes == 8) {
@@ -533,6 +564,7 @@ int rpcif_manual_xfer(struct rpcif *rpc) · 58 unmodified lines
533564 regmap_write(rpc->regmap, RPCIF_SMENR, smenr);
534565 regmap_write(rpc->regmap, RPCIF_SMCR,
535566 rpc->smcr | RPCIF_SMCR_SPIE);
567+ rpc->xfer_size = nbytes;
536568 ret = wait_msg_xfer_end(rpc);
537569 if (ret)
538570 goto err_out;
@@ -651,6 +683,7 @@ static int rpcif_probe(struct platform_device *pdev) · 112 unmodified lines
651683 struct platform_device *vdev;
652684 struct device_node *flash;
653685 const char *name;
686+ int ret;
654687
655688 flash = of_get_next_child(pdev->dev.of_node, NULL);
656689 if (!flash) {
@@ -674,7 +707,14 @@ static int rpcif_probe(struct platform_device *pdev) · 17 unmodified lines
674707 return -ENOMEM;
675708 vdev->dev.parent = &pdev->dev;
676709 platform_set_drvdata(pdev, vdev);
677− return platform_device_add(vdev);
710+
711+ ret = platform_device_add(vdev);
712+ if (ret) {
713+ platform_device_put(vdev);
714+ return ret;
715+ }
716+
717+ return 0;
678718 }
679719
680720 static int rpcif_remove(struct platform_device *pdev)
drivers/misc/eeprom/at25.c+11−8
@@ -31,6 +31,8 @@ · 30 unmodified lines
3131 */
3232
3333 #define FM25_SN_LEN 8 /* serial number length */
34+#define EE_MAXADDRLEN 3 /* 24 bit addresses, up to 2 MBytes */
35+
3436 struct at25_data {
3537 struct spi_eeprom chip;
3638 struct spi_device *spi;
@@ -39,6 +41,7 @@ struct at25_data { · 2 unmodified lines
3941 struct nvmem_config nvmem_config;
4042 struct nvmem_device *nvmem;
4143 u8 sernum[FM25_SN_LEN];
44+ u8 command[EE_MAXADDRLEN + 1];
4245 };
4346
4447 #define AT25_WREN 0x06 /* latch the write enable */
@@ -61,8 +64,6 @@ struct at25_data { · 16 unmodified lines
6164
6265 #define FM25_ID_LEN 9 /* ID length */
6366
64−#define EE_MAXADDRLEN 3 /* 24 bit addresses, up to 2 MBytes */
65−
6667 /*
6768 * Specs often allow 5ms for a page write, sometimes 20ms;
6869 * it's important to recover from write timeouts.
@@ -78,7 +79,6 @@ static int at25_ee_read(void *priv, unsigned int offset, · 9 unmodified lines
7879 {
7980 struct at25_data *at25 = priv;
8081 char *buf = val;
81− u8 command[EE_MAXADDRLEN + 1];
8282 u8 *cp;
8383 ssize_t status;
8484 struct spi_transfer t[2];
@@ -92,12 +92,15 @@ static int at25_ee_read(void *priv, unsigned int offset, · 7 unmodified lines
9292 if (unlikely(!count))
9393 return -EINVAL;
9494
95− cp = command;
95+ cp = at25->command;
9696
9797 instr = AT25_READ;
9898 if (at25->chip.flags & EE_INSTR_BIT3_IS_ADDR)
9999 if (offset >= BIT(at25->addrlen * 8))
100100 instr |= AT25_INSTR_BIT3;
101+
102+ mutex_lock(&at25->lock);
103+
101104 *cp++ = instr;
102105
103106 /* 8/16/24-bit address is written MSB first */
@@ -116,7 +119,7 @@ static int at25_ee_read(void *priv, unsigned int offset, · 12 unmodified lines
116119 spi_message_init(&m);
117120 memset(t, 0, sizeof(t));
118121
119− t[0].tx_buf = command;
122+ t[0].tx_buf = at25->command;
120123 t[0].len = at25->addrlen + 1;
121124 spi_message_add_tail(&t[0], &m);
122125
@@ -124,8 +127,6 @@ static int at25_ee_read(void *priv, unsigned int offset, · 1 unmodified line
124127 t[1].len = count;
125128 spi_message_add_tail(&t[1], &m);
126129
127− mutex_lock(&at25->lock);
128−
129130 /*
130131 * Read it all at once.
131132 *
@@ -152,7 +153,7 @@ static int fm25_aux_read(struct at25_data *at25, u8 *buf, uint8_t command, · 20 unmodified lines
152153 spi_message_init(&m);
153154 memset(t, 0, sizeof(t));
154155
155− t[0].tx_buf = &command;
156+ t[0].tx_buf = at25->command;
156157 t[0].len = 1;
157158 spi_message_add_tail(&t[0], &m);
158159
@@ -162,6 +163,8 @@ static int fm25_aux_read(struct at25_data *at25, u8 *buf, uint8_t command, · 3 unmodified lines
162163
163164 mutex_lock(&at25->lock);
164165
166+ at25->command[0] = command;
167+
165168 status = spi_sync(at25->spi, &m);
166169 dev_dbg(&at25->spi->dev, "read %d aux bytes --> %d\n", len, status);
167170
drivers/mtd/nand/raw/mtk_ecc.c+8−4
@@ -43,6 +43,7 @@ · 42 unmodified lines
4343
4444 struct mtk_ecc_caps {
4545 u32 err_mask;
46+ u32 err_shift;
4647 const u8 *ecc_strength;
4748 const u32 *ecc_regs;
4849 u8 num_ecc_strength;
@@ -76,7 +77,7 @@ static const u8 ecc_strength_mt2712[] = { · 27 unmodified lines
7677 };
7778
7879 static const u8 ecc_strength_mt7622[] = {
79− 4, 6, 8, 10, 12, 14, 16
80+ 4, 6, 8, 10, 12
8081 };
8182
8283 enum mtk_ecc_regs {
@@ -221,7 +222,7 @@ void mtk_ecc_get_stats(struct mtk_ecc *ecc, struct mtk_ecc_stats *stats, · 138 unmodified lines
221222 for (i = 0; i < sectors; i++) {
222223 offset = (i >> 2) << 2;
223224 err = readl(ecc->regs + ECC_DECENUM0 + offset);
224− err = err >> ((i % 4) * 8);
225+ err = err >> ((i % 4) * ecc->caps->err_shift);
225226 err &= ecc->caps->err_mask;
226227 if (err == ecc->caps->err_mask) {
227228 /* uncorrectable errors */
@@ -449,6 +450,7 @@ EXPORT_SYMBOL(mtk_ecc_get_parity_bits); · 221 unmodified lines
449450
450451 static const struct mtk_ecc_caps mtk_ecc_caps_mt2701 = {
451452 .err_mask = 0x3f,
453+ .err_shift = 8,
452454 .ecc_strength = ecc_strength_mt2701,
453455 .ecc_regs = mt2701_ecc_regs,
454456 .num_ecc_strength = 20,
@@ -459,6 +461,7 @@ static const struct mtk_ecc_caps mtk_ecc_caps_mt2701 = { · 4 unmodified lines
459461
460462 static const struct mtk_ecc_caps mtk_ecc_caps_mt2712 = {
461463 .err_mask = 0x7f,
464+ .err_shift = 8,
462465 .ecc_strength = ecc_strength_mt2712,
463466 .ecc_regs = mt2712_ecc_regs,
464467 .num_ecc_strength = 23,
@@ -468,10 +471,11 @@ static const struct mtk_ecc_caps mtk_ecc_caps_mt2712 = { · 3 unmodified lines
468471 };
469472
470473 static const struct mtk_ecc_caps mtk_ecc_caps_mt7622 = {
471− .err_mask = 0x3f,
474+ .err_mask = 0x1f,
475+ .err_shift = 5,
472476 .ecc_strength = ecc_strength_mt7622,
473477 .ecc_regs = mt7622_ecc_regs,
474− .num_ecc_strength = 7,
478+ .num_ecc_strength = 5,
475479 .ecc_mode_shift = 4,
476480 .parity_bits = 13,
477481 .pg_irq_sel = 0,
drivers/mtd/nand/raw/qcom_nandc.c+13−11
@@ -2651,10 +2651,23 @@ static int qcom_nand_attach_chip(struct nand_chip *chip) · 2650 unmodified lines
26512651 ecc->engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST;
26522652
26532653 mtd_set_ooblayout(mtd, &qcom_nand_ooblayout_ops);
2654+ /* Free the initially allocated BAM transaction for reading the ONFI params */
2655+ if (nandc->props->is_bam)
2656+ free_bam_transaction(nandc);
26542657
26552658 nandc->max_cwperpage = max_t(unsigned int, nandc->max_cwperpage,
26562659 cwperpage);
26572660
2661+ /* Now allocate the BAM transaction based on updated max_cwperpage */
2662+ if (nandc->props->is_bam) {
2663+ nandc->bam_txn = alloc_bam_transaction(nandc);
2664+ if (!nandc->bam_txn) {
2665+ dev_err(nandc->dev,
2666+ "failed to allocate bam transaction\n");
2667+ return -ENOMEM;
2668+ }
2669+ }
2670+
26582671 /*
26592672 * DATA_UD_BYTES varies based on whether the read/write command protects
26602673 * spare data with ECC too. We protect spare data by default, so we set
@@ -2955,17 +2968,6 @@ static int qcom_nand_host_init_and_register(struct qcom_nand_controller *nandc, · 294 unmodified lines
29552968 if (ret)
29562969 return ret;
29572970
2958− if (nandc->props->is_bam) {
2959− free_bam_transaction(nandc);
2960− nandc->bam_txn = alloc_bam_transaction(nandc);
2961− if (!nandc->bam_txn) {
2962− dev_err(nandc->dev,
2963− "failed to allocate bam transaction\n");
2964− nand_cleanup(chip);
2965− return -ENOMEM;
2966− }
2967− }
2968−
29692971 ret = mtd_device_parse_register(mtd, probes, NULL, NULL, 0);
29702972 if (ret)
29712973 nand_cleanup(chip);
drivers/mtd/nand/raw/sh_flctl.c+8−6
@@ -384,7 +384,8 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl *flctl, unsigned long *buf, · 383 unmodified lines
384384 dma_addr_t dma_addr;
385385 dma_cookie_t cookie;
386386 uint32_t reg;
387− int ret;
387+ int ret = 0;
388+ unsigned long time_left;
388389
389390 if (dir == DMA_FROM_DEVICE) {
390391 chan = flctl->chan_fifo0_rx;
@@ -425,13 +426,14 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl *flctl, unsigned long *buf, · 34 unmodified lines
425426 goto out;
426427 }
427428
428− ret =
429+ time_left =
429430 wait_for_completion_timeout(&flctl->dma_complete,
430431 msecs_to_jiffies(3000));
431432
432− if (ret <= 0) {
433+ if (time_left == 0) {
433434 dmaengine_terminate_all(chan);
434435 dev_err(&flctl->pdev->dev, "wait_for_completion_timeout\n");
436+ ret = -ETIMEDOUT;
435437 }
436438
437439 out:
@@ -441,7 +443,7 @@ out: · 3 unmodified lines
441443
442444 dma_unmap_single(chan->device->dev, dma_addr, len, dir);
443445
444− /* ret > 0 is success */
446+ /* ret == 0 is success */
445447 return ret;
446448 }
447449
@@ -465,7 +467,7 @@ static void read_fiforeg(struct sh_flctl *flctl, int rlen, int offset) · 17 unmodified lines
465467
466468 /* initiate DMA transfer */
467469 if (flctl->chan_fifo0_rx && rlen >= 32 &&
468− flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_FROM_DEVICE) > 0)
470+ !flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_FROM_DEVICE))
469471 goto convert; /* DMA success */
470472
471473 /* do polling transfer */
@@ -524,7 +526,7 @@ static void write_ec_fiforeg(struct sh_flctl *flctl, int rlen, · 52 unmodified lines
524526
525527 /* initiate DMA transfer */
526528 if (flctl->chan_fifo0_tx && rlen >= 32 &&
527− flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_TO_DEVICE) > 0)
529+ !flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_TO_DEVICE))
528530 return; /* DMA success */
529531
530532 /* do polling transfer */
drivers/net/bonding/bond_main.c+9−4
@@ -4027,14 +4027,19 @@ static bool bond_flow_dissect(struct bonding *bond, struct sk_buff *skb, const v · 4026 unmodified lines
40274027 return true;
40284028 }
40294029
4030−static u32 bond_ip_hash(u32 hash, struct flow_keys *flow)
4030+static u32 bond_ip_hash(u32 hash, struct flow_keys *flow, int xmit_policy)
40314031 {
40324032 hash ^= (__force u32)flow_get_u32_dst(flow) ^
40334033 (__force u32)flow_get_u32_src(flow);
40344034 hash ^= (hash >> 16);
40354035 hash ^= (hash >> 8);
4036+
40364037 /* discard lowest hash bit to deal with the common even ports pattern */
4037− return hash >> 1;
4038+ if (xmit_policy == BOND_XMIT_POLICY_LAYER34 ||
4039+ xmit_policy == BOND_XMIT_POLICY_ENCAP34)
4040+ return hash >> 1;
4041+
4042+ return hash;
40384043 }
40394044
40404045 /* Generate hash based on xmit policy. If @skb is given it is used to linearize
@@ -4064,7 +4069,7 @@ static u32 __bond_xmit_hash(struct bonding *bond, struct sk_buff *skb, const voi · 23 unmodified lines
40644069 memcpy(&hash, &flow.ports.ports, sizeof(hash));
40654070 }
40664071
4067− return bond_ip_hash(hash, &flow);
4072+ return bond_ip_hash(hash, &flow, bond->params.xmit_policy);
40684073 }
40694074
40704075 /**
@@ -5259,7 +5264,7 @@ static u32 bond_sk_hash_l34(struct sock *sk) · 1188 unmodified lines
52595264 /* L4 */
52605265 memcpy(&hash, &flow.ports.ports, sizeof(hash));
52615266 /* L3 */
5262− return bond_ip_hash(hash, &flow);
5267+ return bond_ip_hash(hash, &flow, BOND_XMIT_POLICY_LAYER34);
52635268 }
52645269
52655270 static struct net_device *__bond_sk_get_lower_dev(struct bonding *bond,
drivers/net/dsa/lantiq_gswip.c+0−3
@@ -1681,9 +1681,6 @@ static void gswip_phylink_mac_config(struct dsa_switch *ds, int port, · 1680 unmodified lines
16811681 break;
16821682 case PHY_INTERFACE_MODE_RMII:
16831683 miicfg |= GSWIP_MII_CFG_MODE_RMIIM;
1684−
1685− /* Configure the RMII clock as output: */
1686− miicfg |= GSWIP_MII_CFG_RMII_CLK;
16871684 break;
16881685 case PHY_INTERFACE_MODE_RGMII:
16891686 case PHY_INTERFACE_MODE_RGMII_ID:
drivers/net/dsa/mv88e6xxx/port_hidden.c+3−2
@@ -40,8 +40,9 @@ int mv88e6xxx_port_hidden_wait(struct mv88e6xxx_chip *chip) · 39 unmodified lines
4040 {
4141 int bit = __bf_shf(MV88E6XXX_PORT_RESERVED_1A_BUSY);
4242
43− return mv88e6xxx_wait_bit(chip, MV88E6XXX_PORT_RESERVED_1A_CTRL_PORT,
44− MV88E6XXX_PORT_RESERVED_1A, bit, 0);
43+ return mv88e6xxx_port_wait_bit(chip,
44+ MV88E6XXX_PORT_RESERVED_1A_CTRL_PORT,
45+ MV88E6XXX_PORT_RESERVED_1A, bit, 0);
4546 }
4647
4748 int mv88e6xxx_port_hidden_read(struct mv88e6xxx_chip *chip, int block, int port,
drivers/net/dsa/ocelot/felix.c+23−0
@@ -670,6 +670,8 @@ static int felix_change_tag_protocol(struct dsa_switch *ds, int cpu, · 669 unmodified lines
670670 struct ocelot *ocelot = ds->priv;
671671 struct felix *felix = ocelot_to_felix(ocelot);
672672 enum dsa_tag_protocol old_proto = felix->tag_proto;
673+ bool cpu_port_active = false;
674+ struct dsa_port *dp;
673675 int err;
674676
675677 if (proto != DSA_TAG_PROTO_SEVILLE &&
@@ -677,6 +679,27 @@ static int felix_change_tag_protocol(struct dsa_switch *ds, int cpu, · 1 unmodified line
677679 proto != DSA_TAG_PROTO_OCELOT_8021Q)
678680 return -EPROTONOSUPPORT;
679681
682+ /* We don't support multiple CPU ports, yet the DT blob may have
683+ * multiple CPU ports defined. The first CPU port is the active one,
684+ * the others are inactive. In this case, DSA will call
685+ * ->change_tag_protocol() multiple times, once per CPU port.
686+ * Since we implement the tagging protocol change towards "ocelot" or
687+ * "seville" as effectively initializing the NPI port, what we are
688+ * doing is effectively changing who the NPI port is to the last @cpu
689+ * argument passed, which is an unused DSA CPU port and not the one
690+ * that should actively pass traffic.
691+ * Suppress DSA's calls on CPU ports that are inactive.
692+ */
693+ dsa_switch_for_each_user_port(dp, ds) {
694+ if (dp->cpu_dp->index == cpu) {
695+ cpu_port_active = true;
696+ break;
697+ }
698+ }
699+
700+ if (!cpu_port_active)
701+ return 0;
702+
680703 felix_del_tag_protocol(ds, cpu, old_proto);
681704
682705 err = felix_set_tag_protocol(ds, cpu, proto);
drivers/net/dsa/ocelot/felix_vsc9959.c+1−1
@@ -2316,7 +2316,7 @@ static int felix_pci_probe(struct pci_dev *pdev, · 2315 unmodified lines
23162316
23172317 err = dsa_register_switch(ds);
23182318 if (err) {
2319− dev_err(&pdev->dev, "Failed to register DSA switch: %d\n", err);
2319+ dev_err_probe(&pdev->dev, err, "Failed to register DSA switch\n");
23202320 goto err_register_ds;
23212321 }
23222322
drivers/net/dsa/realtek/Kconfig+21−9
@@ -9,34 +9,46 @@ menuconfig NET_DSA_REALTEK · 8 unmodified lines
99 help
1010 Select to enable support for Realtek Ethernet switch chips.
1111
12+ Note that at least one interface driver must be enabled for the
13+ subdrivers to be loaded. Moreover, an interface driver cannot achieve
14+ anything without at least one subdriver enabled.
15+
16+if NET_DSA_REALTEK
17+
1218 config NET_DSA_REALTEK_MDIO
13− tristate "Realtek MDIO connected switch driver"
14− depends on NET_DSA_REALTEK
19+ tristate "Realtek MDIO interface driver"
1520 depends on OF
21+ depends on NET_DSA_REALTEK_RTL8365MB || NET_DSA_REALTEK_RTL8366RB
22+ depends on NET_DSA_REALTEK_RTL8365MB || !NET_DSA_REALTEK_RTL8365MB
23+ depends on NET_DSA_REALTEK_RTL8366RB || !NET_DSA_REALTEK_RTL8366RB
1624 help
1725 Select to enable support for registering switches configured
1826 through MDIO.
1927
2028 config NET_DSA_REALTEK_SMI
21− tristate "Realtek SMI connected switch driver"
22− depends on NET_DSA_REALTEK
29+ tristate "Realtek SMI interface driver"
2330 depends on OF
31+ depends on NET_DSA_REALTEK_RTL8365MB || NET_DSA_REALTEK_RTL8366RB
32+ depends on NET_DSA_REALTEK_RTL8365MB || !NET_DSA_REALTEK_RTL8365MB
33+ depends on NET_DSA_REALTEK_RTL8366RB || !NET_DSA_REALTEK_RTL8366RB
2434 help
2535 Select to enable support for registering switches connected
2636 through SMI.
2737
2838 config NET_DSA_REALTEK_RTL8365MB
2939 tristate "Realtek RTL8365MB switch subdriver"
30− depends on NET_DSA_REALTEK
31− depends on NET_DSA_REALTEK_SMI || NET_DSA_REALTEK_MDIO
40+ imply NET_DSA_REALTEK_SMI
41+ imply NET_DSA_REALTEK_MDIO
3242 select NET_DSA_TAG_RTL8_4
3343 help
3444 Select to enable support for Realtek RTL8365MB-VC and RTL8367S.
3545
3646 config NET_DSA_REALTEK_RTL8366RB
3747 tristate "Realtek RTL8366RB switch subdriver"
38− depends on NET_DSA_REALTEK
39− depends on NET_DSA_REALTEK_SMI || NET_DSA_REALTEK_MDIO
48+ imply NET_DSA_REALTEK_SMI
49+ imply NET_DSA_REALTEK_MDIO
4050 select NET_DSA_TAG_RTL4_A
4151 help
42− Select to enable support for Realtek RTL8366RB
52+ Select to enable support for Realtek RTL8366RB.
53+
54+endif
drivers/net/dsa/realtek/realtek-mdio.c+0−1
@@ -267,7 +267,6 @@ static const struct of_device_id realtek_mdio_of_match[] = { · 266 unmodified lines
267267 #endif
268268 #if IS_ENABLED(CONFIG_NET_DSA_REALTEK_RTL8365MB)
269269 { .compatible = "realtek,rtl8365mb", .data = &rtl8365mb_variant, },
270− { .compatible = "realtek,rtl8367s", .data = &rtl8365mb_variant, },
271270 #endif
272271 { /* sentinel */ },
273272 };
drivers/net/dsa/realtek/realtek-smi.c+0−9
@@ -546,20 +546,11 @@ static const struct of_device_id realtek_smi_of_match[] = { · 545 unmodified lines
546546 .data = &rtl8366rb_variant,
547547 },
548548 #endif
549− {
550− /* FIXME: add support for RTL8366S and more */
551− .compatible = "realtek,rtl8366s",
552− .data = NULL,
553− },
554549 #if IS_ENABLED(CONFIG_NET_DSA_REALTEK_RTL8365MB)
555550 {
556551 .compatible = "realtek,rtl8365mb",
557552 .data = &rtl8365mb_variant,
558553 },
559− {
560− .compatible = "realtek,rtl8367s",
561− .data = &rtl8365mb_variant,
562− },
563554 #endif
564555 { /* sentinel */ },
565556 };
drivers/net/ethernet/Kconfig+13−13
@@ -35,15 +35,6 @@ source "drivers/net/ethernet/aquantia/Kconfig" · 34 unmodified lines
3535 source "drivers/net/ethernet/arc/Kconfig"
3636 source "drivers/net/ethernet/asix/Kconfig"
3737 source "drivers/net/ethernet/atheros/Kconfig"
38−source "drivers/net/ethernet/broadcom/Kconfig"
39−source "drivers/net/ethernet/brocade/Kconfig"
40−source "drivers/net/ethernet/cadence/Kconfig"
41−source "drivers/net/ethernet/calxeda/Kconfig"
42−source "drivers/net/ethernet/cavium/Kconfig"
43−source "drivers/net/ethernet/chelsio/Kconfig"
44−source "drivers/net/ethernet/cirrus/Kconfig"
45−source "drivers/net/ethernet/cisco/Kconfig"
46−source "drivers/net/ethernet/cortina/Kconfig"
4738
4839 config CX_ECAT
4940 tristate "Beckhoff CX5020 EtherCAT master support"
@@ -57,6 +48,14 @@ config CX_ECAT · 7 unmodified lines
5748 To compile this driver as a module, choose M here. The module
5849 will be called ec_bhf.
5950
51+source "drivers/net/ethernet/broadcom/Kconfig"
52+source "drivers/net/ethernet/cadence/Kconfig"
53+source "drivers/net/ethernet/calxeda/Kconfig"
54+source "drivers/net/ethernet/cavium/Kconfig"
55+source "drivers/net/ethernet/chelsio/Kconfig"
56+source "drivers/net/ethernet/cirrus/Kconfig"
57+source "drivers/net/ethernet/cisco/Kconfig"
58+source "drivers/net/ethernet/cortina/Kconfig"
6059 source "drivers/net/ethernet/davicom/Kconfig"
6160
6261 config DNET
@@ -85,7 +84,6 @@ source "drivers/net/ethernet/huawei/Kconfig" · 22 unmodified lines
8584 source "drivers/net/ethernet/i825xx/Kconfig"
8685 source "drivers/net/ethernet/ibm/Kconfig"
8786 source "drivers/net/ethernet/intel/Kconfig"
88−source "drivers/net/ethernet/microsoft/Kconfig"
8987 source "drivers/net/ethernet/xscale/Kconfig"
9088
9189 config JME
@@ -128,8 +126,9 @@ source "drivers/net/ethernet/mediatek/Kconfig" · 36 unmodified lines
128126 source "drivers/net/ethernet/mellanox/Kconfig"
129127 source "drivers/net/ethernet/micrel/Kconfig"
130128 source "drivers/net/ethernet/microchip/Kconfig"
131−source "drivers/net/ethernet/moxa/Kconfig"
132129 source "drivers/net/ethernet/mscc/Kconfig"
130+source "drivers/net/ethernet/microsoft/Kconfig"
131+source "drivers/net/ethernet/moxa/Kconfig"
133132 source "drivers/net/ethernet/myricom/Kconfig"
134133
135134 config FEALNX
@@ -141,10 +140,10 @@ config FEALNX · 5 unmodified lines
141140 Say Y here to support the Myson MTD-800 family of PCI-based Ethernet
142141 cards. <http://www.myson.com.tw/>
143142
143+source "drivers/net/ethernet/ni/Kconfig"
144144 source "drivers/net/ethernet/natsemi/Kconfig"
145145 source "drivers/net/ethernet/neterion/Kconfig"
146146 source "drivers/net/ethernet/netronome/Kconfig"
147−source "drivers/net/ethernet/ni/Kconfig"
148147 source "drivers/net/ethernet/8390/Kconfig"
149148 source "drivers/net/ethernet/nvidia/Kconfig"
150149 source "drivers/net/ethernet/nxp/Kconfig"
@@ -164,6 +163,7 @@ source "drivers/net/ethernet/packetengines/Kconfig" · 13 unmodified lines
164163 source "drivers/net/ethernet/pasemi/Kconfig"
165164 source "drivers/net/ethernet/pensando/Kconfig"
166165 source "drivers/net/ethernet/qlogic/Kconfig"
166+source "drivers/net/ethernet/brocade/Kconfig"
167167 source "drivers/net/ethernet/qualcomm/Kconfig"
168168 source "drivers/net/ethernet/rdc/Kconfig"
169169 source "drivers/net/ethernet/realtek/Kconfig"
@@ -171,10 +171,10 @@ source "drivers/net/ethernet/renesas/Kconfig" · 1 unmodified line
171171 source "drivers/net/ethernet/rocker/Kconfig"
172172 source "drivers/net/ethernet/samsung/Kconfig"
173173 source "drivers/net/ethernet/seeq/Kconfig"
174−source "drivers/net/ethernet/sfc/Kconfig"
175174 source "drivers/net/ethernet/sgi/Kconfig"
176175 source "drivers/net/ethernet/silan/Kconfig"
177176 source "drivers/net/ethernet/sis/Kconfig"
177+source "drivers/net/ethernet/sfc/Kconfig"
178178 source "drivers/net/ethernet/smsc/Kconfig"
179179 source "drivers/net/ethernet/socionext/Kconfig"
180180 source "drivers/net/ethernet/stmicro/Kconfig"
drivers/net/ethernet/aquantia/atlantic/aq_nic.c+4−4
@@ -486,8 +486,8 @@ int aq_nic_start(struct aq_nic_s *self) · 485 unmodified lines
486486 if (err < 0)
487487 goto err_exit;
488488
489− for (i = 0U, aq_vec = self->aq_vec[0];
490− self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i]) {
489+ for (i = 0U; self->aq_vecs > i; ++i) {
490+ aq_vec = self->aq_vec[i];
491491 err = aq_vec_start(aq_vec);
492492 if (err < 0)
493493 goto err_exit;
@@ -517,8 +517,8 @@ int aq_nic_start(struct aq_nic_s *self) · 23 unmodified lines
517517 mod_timer(&self->polling_timer, jiffies +
518518 AQ_CFG_POLLING_TIMER_INTERVAL);
519519 } else {
520− for (i = 0U, aq_vec = self->aq_vec[0];
521− self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i]) {
520+ for (i = 0U; self->aq_vecs > i; ++i) {
521+ aq_vec = self->aq_vec[i];
522522 err = aq_pci_func_alloc_irq(self, i, self->ndev->name,
523523 aq_vec_isr, aq_vec,
524524 aq_vec_get_affinity_mask(aq_vec));
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c+4−4
@@ -444,22 +444,22 @@ err_exit: · 443 unmodified lines
444444
445445 static int aq_pm_freeze(struct device *dev)
446446 {
447− return aq_suspend_common(dev, false);
447+ return aq_suspend_common(dev, true);
448448 }
449449
450450 static int aq_pm_suspend_poweroff(struct device *dev)
451451 {
452− return aq_suspend_common(dev, true);
452+ return aq_suspend_common(dev, false);
453453 }
454454
455455 static int aq_pm_thaw(struct device *dev)
456456 {
457− return atl_resume_common(dev, false);
457+ return atl_resume_common(dev, true);
458458 }
459459
460460 static int aq_pm_resume_restore(struct device *dev)
461461 {
462− return atl_resume_common(dev, true);
462+ return atl_resume_common(dev, false);
463463 }
464464
465465 static const struct dev_pm_ops aq_pm_ops = {
drivers/net/ethernet/aquantia/atlantic/aq_vec.c+12−12
@@ -43,8 +43,8 @@ static int aq_vec_poll(struct napi_struct *napi, int budget) · 42 unmodified lines
4343 if (!self) {
4444 err = -EINVAL;
4545 } else {
46− for (i = 0U, ring = self->ring[0];
47− self->tx_rings > i; ++i, ring = self->ring[i]) {
46+ for (i = 0U; self->tx_rings > i; ++i) {
47+ ring = self->ring[i];
4848 u64_stats_update_begin(&ring[AQ_VEC_RX_ID].stats.rx.syncp);
4949 ring[AQ_VEC_RX_ID].stats.rx.polls++;
5050 u64_stats_update_end(&ring[AQ_VEC_RX_ID].stats.rx.syncp);
@@ -182,8 +182,8 @@ int aq_vec_init(struct aq_vec_s *self, const struct aq_hw_ops *aq_hw_ops, · 131 unmodified lines
182182 self->aq_hw_ops = aq_hw_ops;
183183 self->aq_hw = aq_hw;
184184
185− for (i = 0U, ring = self->ring[0];
186− self->tx_rings > i; ++i, ring = self->ring[i]) {
185+ for (i = 0U; self->tx_rings > i; ++i) {
186+ ring = self->ring[i];
187187 err = aq_ring_init(&ring[AQ_VEC_TX_ID], ATL_RING_TX);
188188 if (err < 0)
189189 goto err_exit;
@@ -224,8 +224,8 @@ int aq_vec_start(struct aq_vec_s *self) · 34 unmodified lines
224224 unsigned int i = 0U;
225225 int err = 0;
226226
227− for (i = 0U, ring = self->ring[0];
228− self->tx_rings > i; ++i, ring = self->ring[i]) {
227+ for (i = 0U; self->tx_rings > i; ++i) {
228+ ring = self->ring[i];
229229 err = self->aq_hw_ops->hw_ring_tx_start(self->aq_hw,
230230 &ring[AQ_VEC_TX_ID]);
231231 if (err < 0)
@@ -248,8 +248,8 @@ void aq_vec_stop(struct aq_vec_s *self) · 16 unmodified lines
248248 struct aq_ring_s *ring = NULL;
249249 unsigned int i = 0U;
250250
251− for (i = 0U, ring = self->ring[0];
252− self->tx_rings > i; ++i, ring = self->ring[i]) {
251+ for (i = 0U; self->tx_rings > i; ++i) {
252+ ring = self->ring[i];
253253 self->aq_hw_ops->hw_ring_tx_stop(self->aq_hw,
254254 &ring[AQ_VEC_TX_ID]);
255255
@@ -268,8 +268,8 @@ void aq_vec_deinit(struct aq_vec_s *self) · 12 unmodified lines
268268 if (!self)
269269 goto err_exit;
270270
271− for (i = 0U, ring = self->ring[0];
272− self->tx_rings > i; ++i, ring = self->ring[i]) {
271+ for (i = 0U; self->tx_rings > i; ++i) {
272+ ring = self->ring[i];
273273 aq_ring_tx_clean(&ring[AQ_VEC_TX_ID]);
274274 aq_ring_rx_deinit(&ring[AQ_VEC_RX_ID]);
275275 }
@@ -297,8 +297,8 @@ void aq_vec_ring_free(struct aq_vec_s *self) · 21 unmodified lines
297297 if (!self)
298298 goto err_exit;
299299
300− for (i = 0U, ring = self->ring[0];
301− self->tx_rings > i; ++i, ring = self->ring[i]) {
300+ for (i = 0U; self->tx_rings > i; ++i) {
301+ ring = self->ring[i];
302302 aq_ring_free(&ring[AQ_VEC_TX_ID]);
303303 if (i < self->rx_rings)
304304 aq_ring_free(&ring[AQ_VEC_RX_ID]);
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c+5−4
@@ -14153,10 +14153,6 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp) · 14152 unmodified lines
1415314153
1415414154 /* Stop Tx */
1415514155 bnx2x_tx_disable(bp);
14156− /* Delete all NAPI objects */
14157− bnx2x_del_all_napi(bp);
14158− if (CNIC_LOADED(bp))
14159− bnx2x_del_all_napi_cnic(bp);
1416014156 netdev_reset_tc(bp->dev);
1416114157
1416214158 del_timer_sync(&bp->timer);
@@ -14261,6 +14257,11 @@ static pci_ers_result_t bnx2x_io_slot_reset(struct pci_dev *pdev) · 98 unmodified lines
1426114257 bnx2x_drain_tx_queues(bp);
1426214258 bnx2x_send_unload_req(bp, UNLOAD_RECOVERY);
1426314259 bnx2x_netif_stop(bp, 1);
14260+ bnx2x_del_all_napi(bp);
14261+
14262+ if (CNIC_LOADED(bp))
14263+ bnx2x_del_all_napi_cnic(bp);
14264+
1426414265 bnx2x_free_irq(bp);
1426514266
1426614267 /* Report UNLOAD_DONE to MCP */
drivers/net/ethernet/broadcom/genet/bcmgenet.c+9−2
@@ -76,7 +76,7 @@ static inline void bcmgenet_writel(u32 value, void __iomem *offset) · 75 unmodified lines
7676 if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(CONFIG_CPU_BIG_ENDIAN))
7777 __raw_writel(value, offset);
7878 else
79− writel(value, offset);
79+ writel_relaxed(value, offset);
8080 }
8181
8282 static inline u32 bcmgenet_readl(void __iomem *offset)
@@ -84,7 +84,7 @@ static inline u32 bcmgenet_readl(void __iomem *offset) · 1 unmodified line
8484 if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(CONFIG_CPU_BIG_ENDIAN))
8585 return __raw_readl(offset);
8686 else
87− return readl(offset);
87+ return readl_relaxed(offset);
8888 }
8989
9090 static inline void dmadesc_set_length_status(struct bcmgenet_priv *priv,
@@ -2035,6 +2035,11 @@ static struct sk_buff *bcmgenet_add_tsb(struct net_device *dev, · 1944 unmodified lines
20352035 return skb;
20362036 }
20372037
2038+static void bcmgenet_hide_tsb(struct sk_buff *skb)
2039+{
2040+ __skb_pull(skb, sizeof(struct status_64));
2041+}
2042+
20382043 static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
20392044 {
20402045 struct bcmgenet_priv *priv = netdev_priv(dev);
@@ -2141,6 +2146,8 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev) · 100 unmodified lines
21412146 }
21422147
21432148 GENET_CB(skb)->last_cb = tx_cb_ptr;
2149+
2150+ bcmgenet_hide_tsb(skb);
21442151 skb_tx_timestamp(skb);
21452152
21462153 /* Decrement total BD count and advance our write pointer */
drivers/net/ethernet/cadence/macb_main.c+8−0
@@ -1658,6 +1658,7 @@ static void macb_tx_restart(struct macb_queue *queue) · 1657 unmodified lines
16581658 unsigned int head = queue->tx_head;
16591659 unsigned int tail = queue->tx_tail;
16601660 struct macb *bp = queue->bp;
1661+ unsigned int head_idx, tbqp;
16611662
16621663 if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
16631664 queue_writel(queue, ISR, MACB_BIT(TXUBR));
@@ -1665,6 +1666,13 @@ static void macb_tx_restart(struct macb_queue *queue) · 1 unmodified line
16651666 if (head == tail)
16661667 return;
16671668
1669+ tbqp = queue_readl(queue, TBQP) / macb_dma_desc_get_size(bp);
1670+ tbqp = macb_adj_dma_desc_idx(bp, macb_tx_ring_wrap(bp, tbqp));
1671+ head_idx = macb_adj_dma_desc_idx(bp, macb_tx_ring_wrap(bp, head));
1672+
1673+ if (tbqp == head_idx)
1674+ return;
1675+
16681676 macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TSTART));
16691677 }
16701678
drivers/net/ethernet/faraday/ftgmac100.c+5−5
@@ -1835,11 +1835,6 @@ static int ftgmac100_probe(struct platform_device *pdev) · 1834 unmodified lines
18351835 priv->rxdes0_edorr_mask = BIT(30);
18361836 priv->txdes0_edotr_mask = BIT(30);
18371837 priv->is_aspeed = true;
1838− /* Disable ast2600 problematic HW arbitration */
1839− if (of_device_is_compatible(np, "aspeed,ast2600-mac")) {
1840− iowrite32(FTGMAC100_TM_DEFAULT,
1841− priv->base + FTGMAC100_OFFSET_TM);
1842− }
18431838 } else {
18441839 priv->rxdes0_edorr_mask = BIT(15);
18451840 priv->txdes0_edotr_mask = BIT(15);
@@ -1911,6 +1906,11 @@ static int ftgmac100_probe(struct platform_device *pdev) · 65 unmodified lines
19111906 err = ftgmac100_setup_clk(priv);
19121907 if (err)
19131908 goto err_phy_connect;
1909+
1910+ /* Disable ast2600 problematic HW arbitration */
1911+ if (of_device_is_compatible(np, "aspeed,ast2600-mac"))
1912+ iowrite32(FTGMAC100_TM_DEFAULT,
1913+ priv->base + FTGMAC100_OFFSET_TM);
19141914 }
19151915
19161916 /* Default ring sizes */
drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c+6−2
@@ -489,11 +489,15 @@ static int dpaa_get_ts_info(struct net_device *net_dev, · 488 unmodified lines
489489 info->phc_index = -1;
490490
491491 fman_node = of_get_parent(mac_node);
492− if (fman_node)
492+ if (fman_node) {
493493 ptp_node = of_parse_phandle(fman_node, "ptimer-handle", 0);
494+ of_node_put(fman_node);
495+ }
494496
495− if (ptp_node)
497+ if (ptp_node) {
496498 ptp_dev = of_find_device_by_node(ptp_node);
499+ of_node_put(ptp_node);
500+ }
497501
498502 if (ptp_dev)
499503 ptp = platform_get_drvdata(ptp_dev);
drivers/net/ethernet/freescale/enetc/enetc_qos.c+0−4
@@ -297,10 +297,6 @@ int enetc_setup_tc_txtime(struct net_device *ndev, void *type_data) · 296 unmodified lines
297297 if (tc < 0 || tc >= priv->num_tx_rings)
298298 return -EINVAL;
299299
300− /* Do not support TXSTART and TX CSUM offload simutaniously */
301− if (ndev->features & NETIF_F_CSUM_MASK)
302− return -EBUSY;
303−
304300 /* TSD and Qbv are mutually exclusive in hardware */
305301 if (enetc_rd(&priv->si->hw, ENETC_QBV_PTGCR_OFFSET) & ENETC_QBV_TGE)
306302 return -EBUSY;
drivers/net/ethernet/freescale/fec_main.c+1−1
@@ -3731,7 +3731,7 @@ static int fec_enet_init_stop_mode(struct fec_enet_private *fep, · 3730 unmodified lines
37313731 ARRAY_SIZE(out_val));
37323732 if (ret) {
37333733 dev_dbg(&fep->pdev->dev, "no stop mode property\n");
3734− return ret;
3734+ goto out;
37353735 }
37363736
37373737 fep->stop_gpr.gpr = syscon_node_to_regmap(gpr_np);
drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c+5−1
@@ -1065,19 +1065,23 @@ int hns_mac_init(struct dsaf_device *dsaf_dev) · 1064 unmodified lines
10651065 device_for_each_child_node(dsaf_dev->dev, child) {
10661066 ret = fwnode_property_read_u32(child, "reg", &port_id);
10671067 if (ret) {
1068+ fwnode_handle_put(child);
10681069 dev_err(dsaf_dev->dev,
10691070 "get reg fail, ret=%d!\n", ret);
10701071 return ret;
10711072 }
10721073 if (port_id >= max_port_num) {
1074+ fwnode_handle_put(child);
10731075 dev_err(dsaf_dev->dev,
10741076 "reg(%u) out of range!\n", port_id);
10751077 return -EINVAL;
10761078 }
10771079 mac_cb = devm_kzalloc(dsaf_dev->dev, sizeof(*mac_cb),
10781080 GFP_KERNEL);
1079− if (!mac_cb)
1081+ if (!mac_cb) {
1082+ fwnode_handle_put(child);
10801083 return -ENOMEM;
1084+ }
10811085 mac_cb->fw_port = child;
10821086 mac_cb->mac_id = (u8)port_id;
10831087 dsaf_dev->mac_cb[port_id] = mac_cb;
drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_tqp_stats.c+2−2
@@ -75,7 +75,7 @@ int hclge_comm_tqps_update_stats(struct hnae3_handle *handle, · 74 unmodified lines
7575 ret = hclge_comm_cmd_send(hw, &desc, 1);
7676 if (ret) {
7777 dev_err(&hw->cmq.csq.pdev->dev,
78− "failed to get tqp stat, ret = %d, tx = %u.\n",
78+ "failed to get tqp stat, ret = %d, rx = %u.\n",
7979 ret, i);
8080 return ret;
8181 }
@@ -89,7 +89,7 @@ int hclge_comm_tqps_update_stats(struct hnae3_handle *handle, · 7 unmodified lines
8989 ret = hclge_comm_cmd_send(hw, &desc, 1);
9090 if (ret) {
9191 dev_err(&hw->cmq.csq.pdev->dev,
92− "failed to get tqp stat, ret = %d, rx = %u.\n",
92+ "failed to get tqp stat, ret = %d, tx = %u.\n",
9393 ret, i);
9494 return ret;
9595 }
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c+42−42
@@ -562,12 +562,12 @@ static void hns3_dbg_tx_spare_info(struct hns3_enet_ring *ring, char *buf, · 561 unmodified lines
562562
563563 for (i = 0; i < ring_num; i++) {
564564 j = 0;
565− sprintf(result[j++], "%8u", i);
566− sprintf(result[j++], "%9u", ring->tx_copybreak);
567− sprintf(result[j++], "%3u", tx_spare->len);
568− sprintf(result[j++], "%3u", tx_spare->next_to_use);
569− sprintf(result[j++], "%3u", tx_spare->next_to_clean);
570− sprintf(result[j++], "%3u", tx_spare->last_to_clean);
565+ sprintf(result[j++], "%u", i);
566+ sprintf(result[j++], "%u", ring->tx_copybreak);
567+ sprintf(result[j++], "%u", tx_spare->len);
568+ sprintf(result[j++], "%u", tx_spare->next_to_use);
569+ sprintf(result[j++], "%u", tx_spare->next_to_clean);
570+ sprintf(result[j++], "%u", tx_spare->last_to_clean);
571571 sprintf(result[j++], "%pad", &tx_spare->dma);
572572 hns3_dbg_fill_content(content, sizeof(content),
573573 tx_spare_info_items,
@@ -598,35 +598,35 @@ static void hns3_dump_rx_queue_info(struct hns3_enet_ring *ring, · 24 unmodified lines
598598 u32 base_add_l, base_add_h;
599599 u32 j = 0;
600600
601− sprintf(result[j++], "%8u", index);
601+ sprintf(result[j++], "%u", index);
602602
603− sprintf(result[j++], "%6u", readl_relaxed(ring->tqp->io_base +
603+ sprintf(result[j++], "%u", readl_relaxed(ring->tqp->io_base +
604604 HNS3_RING_RX_RING_BD_NUM_REG));
605605
606− sprintf(result[j++], "%6u", readl_relaxed(ring->tqp->io_base +
606+ sprintf(result[j++], "%u", readl_relaxed(ring->tqp->io_base +
607607 HNS3_RING_RX_RING_BD_LEN_REG));
608608
609− sprintf(result[j++], "%4u", readl_relaxed(ring->tqp->io_base +
609+ sprintf(result[j++], "%u", readl_relaxed(ring->tqp->io_base +
610610 HNS3_RING_RX_RING_TAIL_REG));
611611
612− sprintf(result[j++], "%4u", readl_relaxed(ring->tqp->io_base +
612+ sprintf(result[j++], "%u", readl_relaxed(ring->tqp->io_base +
613613 HNS3_RING_RX_RING_HEAD_REG));
614614
615− sprintf(result[j++], "%6u", readl_relaxed(ring->tqp->io_base +
615+ sprintf(result[j++], "%u", readl_relaxed(ring->tqp->io_base +
616616 HNS3_RING_RX_RING_FBDNUM_REG));
617617
618− sprintf(result[j++], "%6u", readl_relaxed(ring->tqp->io_base +
618+ sprintf(result[j++], "%u", readl_relaxed(ring->tqp->io_base +
619619 HNS3_RING_RX_RING_PKTNUM_RECORD_REG));
620− sprintf(result[j++], "%9u", ring->rx_copybreak);
620+ sprintf(result[j++], "%u", ring->rx_copybreak);
621621
622− sprintf(result[j++], "%7s", readl_relaxed(ring->tqp->io_base +
622+ sprintf(result[j++], "%s", readl_relaxed(ring->tqp->io_base +
623623 HNS3_RING_EN_REG) ? "on" : "off");
624624
625625 if (hnae3_ae_dev_tqp_txrx_indep_supported(ae_dev))
626− sprintf(result[j++], "%10s", readl_relaxed(ring->tqp->io_base +
626+ sprintf(result[j++], "%s", readl_relaxed(ring->tqp->io_base +
627627 HNS3_RING_RX_EN_REG) ? "on" : "off");
628628 else
629− sprintf(result[j++], "%10s", "NA");
629+ sprintf(result[j++], "%s", "NA");
630630
631631 base_add_h = readl_relaxed(ring->tqp->io_base +
632632 HNS3_RING_RX_RING_BASEADDR_H_REG);
@@ -700,36 +700,36 @@ static void hns3_dump_tx_queue_info(struct hns3_enet_ring *ring, · 67 unmodified lines
700700 u32 base_add_l, base_add_h;
701701 u32 j = 0;
702702
703− sprintf(result[j++], "%8u", index);
704− sprintf(result[j++], "%6u", readl_relaxed(ring->tqp->io_base +
703+ sprintf(result[j++], "%u", index);
704+ sprintf(result[j++], "%u", readl_relaxed(ring->tqp->io_base +
705705 HNS3_RING_TX_RING_BD_NUM_REG));
706706
707− sprintf(result[j++], "%2u", readl_relaxed(ring->tqp->io_base +
707+ sprintf(result[j++], "%u", readl_relaxed(ring->tqp->io_base +
708708 HNS3_RING_TX_RING_TC_REG));
709709
710− sprintf(result[j++], "%4u", readl_relaxed(ring->tqp->io_base +
710+ sprintf(result[j++], "%u", readl_relaxed(ring->tqp->io_base +
711711 HNS3_RING_TX_RING_TAIL_REG));
712712
713− sprintf(result[j++], "%4u", readl_relaxed(ring->tqp->io_base +
713+ sprintf(result[j++], "%u", readl_relaxed(ring->tqp->io_base +
714714 HNS3_RING_TX_RING_HEAD_REG));
715715
716− sprintf(result[j++], "%6u", readl_relaxed(ring->tqp->io_base +
716+ sprintf(result[j++], "%u", readl_relaxed(ring->tqp->io_base +
717717 HNS3_RING_TX_RING_FBDNUM_REG));
718718
719− sprintf(result[j++], "%6u", readl_relaxed(ring->tqp->io_base +
719+ sprintf(result[j++], "%u", readl_relaxed(ring->tqp->io_base +
720720 HNS3_RING_TX_RING_OFFSET_REG));
721721
722− sprintf(result[j++], "%6u", readl_relaxed(ring->tqp->io_base +
722+ sprintf(result[j++], "%u", readl_relaxed(ring->tqp->io_base +
723723 HNS3_RING_TX_RING_PKTNUM_RECORD_REG));
724724
725− sprintf(result[j++], "%7s", readl_relaxed(ring->tqp->io_base +
725+ sprintf(result[j++], "%s", readl_relaxed(ring->tqp->io_base +
726726 HNS3_RING_EN_REG) ? "on" : "off");
727727
728728 if (hnae3_ae_dev_tqp_txrx_indep_supported(ae_dev))
729− sprintf(result[j++], "%10s", readl_relaxed(ring->tqp->io_base +
729+ sprintf(result[j++], "%s", readl_relaxed(ring->tqp->io_base +
730730 HNS3_RING_TX_EN_REG) ? "on" : "off");
731731 else
732− sprintf(result[j++], "%10s", "NA");
732+ sprintf(result[j++], "%s", "NA");
733733
734734 base_add_h = readl_relaxed(ring->tqp->io_base +
735735 HNS3_RING_TX_RING_BASEADDR_H_REG);
@@ -848,15 +848,15 @@ static void hns3_dump_rx_bd_info(struct hns3_nic_priv *priv, · 112 unmodified lines
848848 {
849849 unsigned int j = 0;
850850
851− sprintf(result[j++], "%5d", idx);
851+ sprintf(result[j++], "%d", idx);
852852 sprintf(result[j++], "%#x", le32_to_cpu(desc->rx.l234_info));
853− sprintf(result[j++], "%7u", le16_to_cpu(desc->rx.pkt_len));
854− sprintf(result[j++], "%4u", le16_to_cpu(desc->rx.size));
853+ sprintf(result[j++], "%u", le16_to_cpu(desc->rx.pkt_len));
854+ sprintf(result[j++], "%u", le16_to_cpu(desc->rx.size));
855855 sprintf(result[j++], "%#x", le32_to_cpu(desc->rx.rss_hash));
856− sprintf(result[j++], "%5u", le16_to_cpu(desc->rx.fd_id));
857− sprintf(result[j++], "%8u", le16_to_cpu(desc->rx.vlan_tag));
858− sprintf(result[j++], "%15u", le16_to_cpu(desc->rx.o_dm_vlan_id_fb));
859− sprintf(result[j++], "%11u", le16_to_cpu(desc->rx.ot_vlan_tag));
856+ sprintf(result[j++], "%u", le16_to_cpu(desc->rx.fd_id));
857+ sprintf(result[j++], "%u", le16_to_cpu(desc->rx.vlan_tag));
858+ sprintf(result[j++], "%u", le16_to_cpu(desc->rx.o_dm_vlan_id_fb));
859+ sprintf(result[j++], "%u", le16_to_cpu(desc->rx.ot_vlan_tag));
860860 sprintf(result[j++], "%#x", le32_to_cpu(desc->rx.bd_base_info));
861861 if (test_bit(HNS3_NIC_STATE_RXD_ADV_LAYOUT_ENABLE, &priv->state)) {
862862 u32 ol_info = le32_to_cpu(desc->rx.ol_info);
@@ -930,19 +930,19 @@ static void hns3_dump_tx_bd_info(struct hns3_nic_priv *priv, · 67 unmodified lines
930930 {
931931 unsigned int j = 0;
932932
933− sprintf(result[j++], "%6d", idx);
933+ sprintf(result[j++], "%d", idx);
934934 sprintf(result[j++], "%#llx", le64_to_cpu(desc->addr));
935− sprintf(result[j++], "%5u", le16_to_cpu(desc->tx.vlan_tag));
936− sprintf(result[j++], "%5u", le16_to_cpu(desc->tx.send_size));
935+ sprintf(result[j++], "%u", le16_to_cpu(desc->tx.vlan_tag));
936+ sprintf(result[j++], "%u", le16_to_cpu(desc->tx.send_size));
937937 sprintf(result[j++], "%#x",
938938 le32_to_cpu(desc->tx.type_cs_vlan_tso_len));
939− sprintf(result[j++], "%5u", le16_to_cpu(desc->tx.outer_vlan_tag));
940− sprintf(result[j++], "%5u", le16_to_cpu(desc->tx.tv));
941− sprintf(result[j++], "%10u",
939+ sprintf(result[j++], "%u", le16_to_cpu(desc->tx.outer_vlan_tag));
940+ sprintf(result[j++], "%u", le16_to_cpu(desc->tx.tv));
941+ sprintf(result[j++], "%u",
942942 le32_to_cpu(desc->tx.ol_type_vlan_len_msec));
943943 sprintf(result[j++], "%#x", le32_to_cpu(desc->tx.paylen_ol4cs));
944944 sprintf(result[j++], "%#x", le16_to_cpu(desc->tx.bdtp_fe_sc_vld_ra_ri));
945− sprintf(result[j++], "%5u", le16_to_cpu(desc->tx.mss_hw_csum));
945+ sprintf(result[j++], "%u", le16_to_cpu(desc->tx.mss_hw_csum));
946946 }
947947
948948 static int hns3_dbg_tx_bd_info(struct hns3_dbg_data *d, char *buf, int len)
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c+9−0
@@ -5203,6 +5203,13 @@ static void hns3_state_init(struct hnae3_handle *handle) · 5202 unmodified lines
52035203 set_bit(HNS3_NIC_STATE_RXD_ADV_LAYOUT_ENABLE, &priv->state);
52045204 }
52055205
5206+static void hns3_state_uninit(struct hnae3_handle *handle)
5207+{
5208+ struct hns3_nic_priv *priv = handle->priv;
5209+
5210+ clear_bit(HNS3_NIC_STATE_INITED, &priv->state);
5211+}
5212+
52065213 static int hns3_client_init(struct hnae3_handle *handle)
52075214 {
52085215 struct pci_dev *pdev = handle->pdev;
@@ -5320,7 +5327,9 @@ static int hns3_client_init(struct hnae3_handle *handle) · 111 unmodified lines
53205327 return ret;
53215328
53225329 out_reg_netdev_fail:
5330+ hns3_state_uninit(handle);
53235331 hns3_dbg_uninit(handle);
5332+ hns3_client_stop(handle);
53245333 out_client_start:
53255334 hns3_free_rx_cpu_rmap(netdev);
53265335 hns3_nic_uninit_irq(priv);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c+20−11
@@ -94,6 +94,13 @@ static int hclge_send_mbx_msg(struct hclge_vport *vport, u8 *msg, u16 msg_len, · 93 unmodified lines
9494 enum hclge_comm_cmd_status status;
9595 struct hclge_desc desc;
9696
97+ if (msg_len > HCLGE_MBX_MAX_MSG_SIZE) {
98+ dev_err(&hdev->pdev->dev,
99+ "msg data length(=%u) exceeds maximum(=%u)\n",
100+ msg_len, HCLGE_MBX_MAX_MSG_SIZE);
101+ return -EMSGSIZE;
102+ }
103+
97104 resp_pf_to_vf = (struct hclge_mbx_pf_to_vf_cmd *)desc.data;
98105
99106 hclge_cmd_setup_basic_desc(&desc, HCLGEVF_OPC_MBX_PF_TO_VF, false);
@@ -176,7 +183,7 @@ static int hclge_get_ring_chain_from_mbx( · 76 unmodified lines
176183 ring_num = req->msg.ring_num;
177184
178185 if (ring_num > HCLGE_MBX_MAX_RING_CHAIN_PARAM_NUM)
179− return -ENOMEM;
186+ return -EINVAL;
180187
181188 for (i = 0; i < ring_num; i++) {
182189 if (req->msg.param[i].tqp_index >= vport->nic.kinfo.rss_size) {
@@ -587,9 +594,9 @@ static int hclge_set_vf_mtu(struct hclge_vport *vport, · 404 unmodified lines
587594 return hclge_set_vport_mtu(vport, mtu);
588595 }
589596
590−static void hclge_get_queue_id_in_pf(struct hclge_vport *vport,
591− struct hclge_mbx_vf_to_pf_cmd *mbx_req,
592− struct hclge_respond_to_vf_msg *resp_msg)
597+static int hclge_get_queue_id_in_pf(struct hclge_vport *vport,
598+ struct hclge_mbx_vf_to_pf_cmd *mbx_req,
599+ struct hclge_respond_to_vf_msg *resp_msg)
593600 {
594601 struct hnae3_handle *handle = &vport->nic;
595602 struct hclge_dev *hdev = vport->back;
@@ -599,17 +606,18 @@ static void hclge_get_queue_id_in_pf(struct hclge_vport *vport, · 3 unmodified lines
599606 if (queue_id >= handle->kinfo.num_tqps) {
600607 dev_err(&hdev->pdev->dev, "Invalid queue id(%u) from VF %u\n",
601608 queue_id, mbx_req->mbx_src_vfid);
602− return;
609+ return -EINVAL;
603610 }
604611
605612 qid_in_pf = hclge_covert_handle_qid_global(&vport->nic, queue_id);
606613 memcpy(resp_msg->data, &qid_in_pf, sizeof(qid_in_pf));
607614 resp_msg->len = sizeof(qid_in_pf);
615+ return 0;
608616 }
609617
610−static void hclge_get_rss_key(struct hclge_vport *vport,
611− struct hclge_mbx_vf_to_pf_cmd *mbx_req,
612− struct hclge_respond_to_vf_msg *resp_msg)
618+static int hclge_get_rss_key(struct hclge_vport *vport,
619+ struct hclge_mbx_vf_to_pf_cmd *mbx_req,
620+ struct hclge_respond_to_vf_msg *resp_msg)
613621 {
614622 #define HCLGE_RSS_MBX_RESP_LEN 8
615623 struct hclge_dev *hdev = vport->back;
@@ -627,13 +635,14 @@ static void hclge_get_rss_key(struct hclge_vport *vport, · 11 unmodified lines
627635 dev_warn(&hdev->pdev->dev,
628636 "failed to get the rss hash key, the index(%u) invalid !\n",
629637 index);
630− return;
638+ return -EINVAL;
631639 }
632640
633641 memcpy(resp_msg->data,
634642 &rss_cfg->rss_hash_key[index * HCLGE_RSS_MBX_RESP_LEN],
635643 HCLGE_RSS_MBX_RESP_LEN);
636644 resp_msg->len = HCLGE_RSS_MBX_RESP_LEN;
645+ return 0;
637646 }
638647
639648 static void hclge_link_fail_parse(struct hclge_dev *hdev, u8 link_fail_code)
@@ -809,10 +818,10 @@ void hclge_mbx_handler(struct hclge_dev *hdev) · 169 unmodified lines
809818 "VF fail(%d) to set mtu\n", ret);
810819 break;
811820 case HCLGE_MBX_GET_QID_IN_PF:
812− hclge_get_queue_id_in_pf(vport, req, &resp_msg);
821+ ret = hclge_get_queue_id_in_pf(vport, req, &resp_msg);
813822 break;
814823 case HCLGE_MBX_GET_RSS_KEY:
815− hclge_get_rss_key(vport, req, &resp_msg);
824+ ret = hclge_get_rss_key(vport, req, &resp_msg);
816825 break;
817826 case HCLGE_MBX_GET_LINK_MODE:
818827 hclge_get_link_mode(vport, req);
drivers/net/ethernet/ibm/ibmvnic.c+35−94
@@ -3210,13 +3210,8 @@ static void ibmvnic_get_ringparam(struct net_device *netdev, · 3209 unmodified lines
32103210 {
32113211 struct ibmvnic_adapter *adapter = netdev_priv(netdev);
32123212
3213− if (adapter->priv_flags & IBMVNIC_USE_SERVER_MAXES) {
3214− ring->rx_max_pending = adapter->max_rx_add_entries_per_subcrq;
3215− ring->tx_max_pending = adapter->max_tx_entries_per_subcrq;
3216− } else {
3217− ring->rx_max_pending = IBMVNIC_MAX_QUEUE_SZ;
3218− ring->tx_max_pending = IBMVNIC_MAX_QUEUE_SZ;
3219− }
3213+ ring->rx_max_pending = adapter->max_rx_add_entries_per_subcrq;
3214+ ring->tx_max_pending = adapter->max_tx_entries_per_subcrq;
32203215 ring->rx_mini_max_pending = 0;
32213216 ring->rx_jumbo_max_pending = 0;
32223217 ring->rx_pending = adapter->req_rx_add_entries_per_subcrq;
@@ -3231,23 +3226,21 @@ static int ibmvnic_set_ringparam(struct net_device *netdev, · 8 unmodified lines
32313226 struct netlink_ext_ack *extack)
32323227 {
32333228 struct ibmvnic_adapter *adapter = netdev_priv(netdev);
3234− int ret;
32353229
3236− ret = 0;
3230+ if (ring->rx_pending > adapter->max_rx_add_entries_per_subcrq ||
3231+ ring->tx_pending > adapter->max_tx_entries_per_subcrq) {
3232+ netdev_err(netdev, "Invalid request.\n");
3233+ netdev_err(netdev, "Max tx buffers = %llu\n",
3234+ adapter->max_rx_add_entries_per_subcrq);
3235+ netdev_err(netdev, "Max rx buffers = %llu\n",
3236+ adapter->max_tx_entries_per_subcrq);
3237+ return -EINVAL;
3238+ }
3239+
32373240 adapter->desired.rx_entries = ring->rx_pending;
32383241 adapter->desired.tx_entries = ring->tx_pending;
32393242
3240− ret = wait_for_reset(adapter);
3241−
3242− if (!ret &&
3243− (adapter->req_rx_add_entries_per_subcrq != ring->rx_pending ||
3244− adapter->req_tx_entries_per_subcrq != ring->tx_pending))
3245− netdev_info(netdev,
3246− "Could not match full ringsize request. Requested: RX %d, TX %d; Allowed: RX %llu, TX %llu\n",
3247− ring->rx_pending, ring->tx_pending,
3248− adapter->req_rx_add_entries_per_subcrq,
3249− adapter->req_tx_entries_per_subcrq);
3250− return ret;
3243+ return wait_for_reset(adapter);
32513244 }
32523245
32533246 static void ibmvnic_get_channels(struct net_device *netdev,
@@ -3255,14 +3248,8 @@ static void ibmvnic_get_channels(struct net_device *netdev, · 1 unmodified line
32553248 {
32563249 struct ibmvnic_adapter *adapter = netdev_priv(netdev);
32573250
3258− if (adapter->priv_flags & IBMVNIC_USE_SERVER_MAXES) {
3259− channels->max_rx = adapter->max_rx_queues;
3260− channels->max_tx = adapter->max_tx_queues;
3261− } else {
3262− channels->max_rx = IBMVNIC_MAX_QUEUES;
3263− channels->max_tx = IBMVNIC_MAX_QUEUES;
3264− }
3265−
3251+ channels->max_rx = adapter->max_rx_queues;
3252+ channels->max_tx = adapter->max_tx_queues;
32663253 channels->max_other = 0;
32673254 channels->max_combined = 0;
32683255 channels->rx_count = adapter->req_rx_queues;
@@ -3275,22 +3262,11 @@ static int ibmvnic_set_channels(struct net_device *netdev, · 6 unmodified lines
32753262 struct ethtool_channels *channels)
32763263 {
32773264 struct ibmvnic_adapter *adapter = netdev_priv(netdev);
3278− int ret;
32793265
3280− ret = 0;
32813266 adapter->desired.rx_queues = channels->rx_count;
32823267 adapter->desired.tx_queues = channels->tx_count;
32833268
3284− ret = wait_for_reset(adapter);
3285−
3286− if (!ret &&
3287− (adapter->req_rx_queues != channels->rx_count ||
3288− adapter->req_tx_queues != channels->tx_count))
3289− netdev_info(netdev,
3290− "Could not match full channels request. Requested: RX %d, TX %d; Allowed: RX %llu, TX %llu\n",
3291− channels->rx_count, channels->tx_count,
3292− adapter->req_rx_queues, adapter->req_tx_queues);
3293− return ret;
3269+ return wait_for_reset(adapter);
32943270 }
32953271
32963272 static void ibmvnic_get_strings(struct net_device *dev, u32 stringset, u8 *data)
@@ -3298,43 +3274,32 @@ static void ibmvnic_get_strings(struct net_device *dev, u32 stringset, u8 *data) · 1 unmodified line
32983274 struct ibmvnic_adapter *adapter = netdev_priv(dev);
32993275 int i;
33003276
3301− switch (stringset) {
3302− case ETH_SS_STATS:
3303− for (i = 0; i < ARRAY_SIZE(ibmvnic_stats);
3304− i++, data += ETH_GSTRING_LEN)
3305− memcpy(data, ibmvnic_stats[i].name, ETH_GSTRING_LEN);
3277+ if (stringset != ETH_SS_STATS)
3278+ return;
33063279
3307− for (i = 0; i < adapter->req_tx_queues; i++) {
3308− snprintf(data, ETH_GSTRING_LEN, "tx%d_packets", i);
3309− data += ETH_GSTRING_LEN;
3280+ for (i = 0; i < ARRAY_SIZE(ibmvnic_stats); i++, data += ETH_GSTRING_LEN)
3281+ memcpy(data, ibmvnic_stats[i].name, ETH_GSTRING_LEN);
33103282
3311− snprintf(data, ETH_GSTRING_LEN, "tx%d_bytes", i);
3312− data += ETH_GSTRING_LEN;
3283+ for (i = 0; i < adapter->req_tx_queues; i++) {
3284+ snprintf(data, ETH_GSTRING_LEN, "tx%d_packets", i);
3285+ data += ETH_GSTRING_LEN;
33133286
3314− snprintf(data, ETH_GSTRING_LEN,
3315− "tx%d_dropped_packets", i);
3316− data += ETH_GSTRING_LEN;
3317− }
3287+ snprintf(data, ETH_GSTRING_LEN, "tx%d_bytes", i);
3288+ data += ETH_GSTRING_LEN;
33183289
3319− for (i = 0; i < adapter->req_rx_queues; i++) {
3320− snprintf(data, ETH_GSTRING_LEN, "rx%d_packets", i);
3321− data += ETH_GSTRING_LEN;
3290+ snprintf(data, ETH_GSTRING_LEN, "tx%d_dropped_packets", i);
3291+ data += ETH_GSTRING_LEN;
3292+ }
33223293
3323− snprintf(data, ETH_GSTRING_LEN, "rx%d_bytes", i);
3324− data += ETH_GSTRING_LEN;
3294+ for (i = 0; i < adapter->req_rx_queues; i++) {
3295+ snprintf(data, ETH_GSTRING_LEN, "rx%d_packets", i);
3296+ data += ETH_GSTRING_LEN;
33253297
3326− snprintf(data, ETH_GSTRING_LEN, "rx%d_interrupts", i);
3327− data += ETH_GSTRING_LEN;
3328− }
3329− break;
3298+ snprintf(data, ETH_GSTRING_LEN, "rx%d_bytes", i);
3299+ data += ETH_GSTRING_LEN;
33303300
3331− case ETH_SS_PRIV_FLAGS:
3332− for (i = 0; i < ARRAY_SIZE(ibmvnic_priv_flags); i++)
3333− strcpy(data + i * ETH_GSTRING_LEN,
3334− ibmvnic_priv_flags[i]);
3335− break;
3336− default:
3337− return;
3301+ snprintf(data, ETH_GSTRING_LEN, "rx%d_interrupts", i);
3302+ data += ETH_GSTRING_LEN;
33383303 }
33393304 }
33403305
@@ -3347,8 +3312,6 @@ static int ibmvnic_get_sset_count(struct net_device *dev, int sset) · 6 unmodified lines
33473312 return ARRAY_SIZE(ibmvnic_stats) +
33483313 adapter->req_tx_queues * NUM_TX_STATS +
33493314 adapter->req_rx_queues * NUM_RX_STATS;
3350− case ETH_SS_PRIV_FLAGS:
3351− return ARRAY_SIZE(ibmvnic_priv_flags);
33523315 default:
33533316 return -EOPNOTSUPP;
33543317 }
@@ -3401,26 +3364,6 @@ static void ibmvnic_get_ethtool_stats(struct net_device *dev, · 46 unmodified lines
34013364 }
34023365 }
34033366
3404−static u32 ibmvnic_get_priv_flags(struct net_device *netdev)
3405−{
3406− struct ibmvnic_adapter *adapter = netdev_priv(netdev);
3407−
3408− return adapter->priv_flags;
3409−}
3410−
3411−static int ibmvnic_set_priv_flags(struct net_device *netdev, u32 flags)
3412−{
3413− struct ibmvnic_adapter *adapter = netdev_priv(netdev);
3414− bool which_maxes = !!(flags & IBMVNIC_USE_SERVER_MAXES);
3415−
3416− if (which_maxes)
3417− adapter->priv_flags |= IBMVNIC_USE_SERVER_MAXES;
3418− else
3419− adapter->priv_flags &= ~IBMVNIC_USE_SERVER_MAXES;
3420−
3421− return 0;
3422−}
3423−
34243367 static const struct ethtool_ops ibmvnic_ethtool_ops = {
34253368 .get_drvinfo = ibmvnic_get_drvinfo,
34263369 .get_msglevel = ibmvnic_get_msglevel,
@@ -3434,8 +3377,6 @@ static const struct ethtool_ops ibmvnic_ethtool_ops = { · 7 unmodified lines
34343377 .get_sset_count = ibmvnic_get_sset_count,
34353378 .get_ethtool_stats = ibmvnic_get_ethtool_stats,
34363379 .get_link_ksettings = ibmvnic_get_link_ksettings,
3437− .get_priv_flags = ibmvnic_get_priv_flags,
3438− .set_priv_flags = ibmvnic_set_priv_flags,
34393380 };
34403381
34413382 /* Routines for managing CRQs/sCRQs */
drivers/net/ethernet/ibm/ibmvnic.h+0−6
@@ -41,11 +41,6 @@ · 40 unmodified lines
4141
4242 #define IBMVNIC_RESET_DELAY 100
4343
44−static const char ibmvnic_priv_flags[][ETH_GSTRING_LEN] = {
45−#define IBMVNIC_USE_SERVER_MAXES 0x1
46− "use-server-maxes"
47−};
48−
4944 struct ibmvnic_login_buffer {
5045 __be32 len;
5146 __be32 version;
@@ -883,7 +878,6 @@ struct ibmvnic_adapter { · 831 unmodified lines
883878 struct ibmvnic_control_ip_offload_buffer ip_offload_ctrl;
884879 dma_addr_t ip_offload_ctrl_tok;
885880 u32 msg_enable;
886− u32 priv_flags;
887881
888882 /* Vital Product Data (VPD) */
889883 struct ibmvnic_vpd *vpd;
drivers/net/ethernet/intel/e1000e/ich8lan.c+2−2
@@ -1009,8 +1009,8 @@ static s32 e1000_platform_pm_pch_lpt(struct e1000_hw *hw, bool link) · 1008 unmodified lines
10091009 {
10101010 u32 reg = link << (E1000_LTRV_REQ_SHIFT + E1000_LTRV_NOSNOOP_SHIFT) |
10111011 link << E1000_LTRV_REQ_SHIFT | E1000_LTRV_SEND;
1012− u16 max_ltr_enc_d = 0; /* maximum LTR decoded by platform */
1013− u16 lat_enc_d = 0; /* latency decoded */
1012+ u32 max_ltr_enc_d = 0; /* maximum LTR decoded by platform */
1013+ u32 lat_enc_d = 0; /* latency decoded */
10141014 u16 lat_enc = 0; /* latency encoded */
10151015
10161016 if (link) {
drivers/net/ethernet/intel/iavf/iavf_main.c+2−5
@@ -2871,7 +2871,6 @@ continue_reset: · 2870 unmodified lines
28712871 running = adapter->state == __IAVF_RUNNING;
28722872
28732873 if (running) {
2874− netdev->flags &= ~IFF_UP;
28752874 netif_carrier_off(netdev);
28762875 netif_tx_stop_all_queues(netdev);
28772876 adapter->link_up = false;
@@ -2988,7 +2987,7 @@ continue_reset: · 110 unmodified lines
29882987 * to __IAVF_RUNNING
29892988 */
29902989 iavf_up_complete(adapter);
2991− netdev->flags |= IFF_UP;
2990+
29922991 iavf_irq_enable(adapter, true);
29932992 } else {
29942993 iavf_change_state(adapter, __IAVF_DOWN);
@@ -3004,10 +3003,8 @@ continue_reset: · 9 unmodified lines
30043003 reset_err:
30053004 mutex_unlock(&adapter->client_lock);
30063005 mutex_unlock(&adapter->crit_lock);
3007− if (running) {
3006+ if (running)
30083007 iavf_change_state(adapter, __IAVF_RUNNING);
3009− netdev->flags |= IFF_UP;
3010− }
30113008 dev_err(&adapter->pdev->dev, "failed to allocate resources during reinit\n");
30123009 iavf_close(netdev);
30133010 }
drivers/net/ethernet/intel/ice/ice_arfs.c+2−7
@@ -577,7 +577,7 @@ void ice_free_cpu_rx_rmap(struct ice_vsi *vsi) · 576 unmodified lines
577577 {
578578 struct net_device *netdev;
579579
580− if (!vsi || vsi->type != ICE_VSI_PF || !vsi->arfs_fltr_list)
580+ if (!vsi || vsi->type != ICE_VSI_PF)
581581 return;
582582
583583 netdev = vsi->netdev;
@@ -599,7 +599,7 @@ int ice_set_cpu_rx_rmap(struct ice_vsi *vsi) · 15 unmodified lines
599599 int base_idx, i;
600600
601601 if (!vsi || vsi->type != ICE_VSI_PF)
602− return -EINVAL;
602+ return 0;
603603
604604 pf = vsi->back;
605605 netdev = vsi->netdev;
@@ -636,7 +636,6 @@ void ice_remove_arfs(struct ice_pf *pf) · 30 unmodified lines
636636 if (!pf_vsi)
637637 return;
638638
639− ice_free_cpu_rx_rmap(pf_vsi);
640639 ice_clear_arfs(pf_vsi);
641640 }
642641
@@ -653,9 +652,5 @@ void ice_rebuild_arfs(struct ice_pf *pf) · 10 unmodified lines
653652 return;
654653
655654 ice_remove_arfs(pf);
656− if (ice_set_cpu_rx_rmap(pf_vsi)) {
657− dev_err(ice_pf_to_dev(pf), "Failed to rebuild aRFS\n");
658− return;
659− }
660655 ice_init_arfs(pf_vsi);
661656 }
drivers/net/ethernet/intel/ice/ice_eswitch.c+2−1
@@ -361,7 +361,8 @@ ice_eswitch_port_start_xmit(struct sk_buff *skb, struct net_device *netdev) · 360 unmodified lines
361361 np = netdev_priv(netdev);
362362 vsi = np->vsi;
363363
364− if (ice_is_reset_in_progress(vsi->back->state))
364+ if (ice_is_reset_in_progress(vsi->back->state) ||
365+ test_bit(ICE_VF_DIS, vsi->back->state))
365366 return NETDEV_TX_BUSY;
366367
367368 repr = ice_netdev_to_repr(netdev);
drivers/net/ethernet/intel/ice/ice_eswitch.h+1−1
@@ -52,7 +52,7 @@ static inline void ice_eswitch_update_repr(struct ice_vsi *vsi) { } · 51 unmodified lines
5252
5353 static inline int ice_eswitch_configure(struct ice_pf *pf)
5454 {
55− return -EOPNOTSUPP;
55+ return 0;
5656 }
5757
5858 static inline int ice_eswitch_rebuild(struct ice_pf *pf)
drivers/net/ethernet/intel/ice/ice_lib.c+4−1
@@ -2689,6 +2689,8 @@ void ice_vsi_free_irq(struct ice_vsi *vsi) · 2688 unmodified lines
26892689 return;
26902690
26912691 vsi->irqs_ready = false;
2692+ ice_free_cpu_rx_rmap(vsi);
2693+
26922694 ice_for_each_q_vector(vsi, i) {
26932695 u16 vector = i + base;
26942696 int irq_num;
@@ -2702,7 +2704,8 @@ void ice_vsi_free_irq(struct ice_vsi *vsi) · 7 unmodified lines
27022704 continue;
27032705
27042706 /* clear the affinity notifier in the IRQ descriptor */
2705− irq_set_affinity_notifier(irq_num, NULL);
2707+ if (!IS_ENABLED(CONFIG_RFS_ACCEL))
2708+ irq_set_affinity_notifier(irq_num, NULL);
27062709
27072710 /* clear the affinity_mask in the IRQ descriptor */
27082711 irq_set_affinity_hint(irq_num, NULL);
drivers/net/ethernet/intel/ice/ice_main.c+11−10
@@ -2510,6 +2510,13 @@ static int ice_vsi_req_irq_msix(struct ice_vsi *vsi, char *basename) · 2509 unmodified lines
25102510 irq_set_affinity_hint(irq_num, &q_vector->affinity_mask);
25112511 }
25122512
2513+ err = ice_set_cpu_rx_rmap(vsi);
2514+ if (err) {
2515+ netdev_err(vsi->netdev, "Failed to setup CPU RMAP on VSI %u: %pe\n",
2516+ vsi->vsi_num, ERR_PTR(err));
2517+ goto free_q_irqs;
2518+ }
2519+
25132520 vsi->irqs_ready = true;
25142521 return 0;
25152522
@@ -3692,20 +3699,12 @@ static int ice_setup_pf_sw(struct ice_pf *pf) · 1176 unmodified lines
36923699 */
36933700 ice_napi_add(vsi);
36943701
3695− status = ice_set_cpu_rx_rmap(vsi);
3696− if (status) {
3697− dev_err(dev, "Failed to set CPU Rx map VSI %d error %d\n",
3698− vsi->vsi_num, status);
3699− goto unroll_napi_add;
3700− }
37013702 status = ice_init_mac_fltr(pf);
37023703 if (status)
3703− goto free_cpu_rx_map;
3704+ goto unroll_napi_add;
37043705
37053706 return 0;
37063707
3707−free_cpu_rx_map:
3708− ice_free_cpu_rx_rmap(vsi);
37093708 unroll_napi_add:
37103709 ice_tc_indir_block_unregister(vsi);
37113710 unroll_cfg_netdev:
@@ -5167,7 +5166,6 @@ static int __maybe_unused ice_suspend(struct device *dev) · 1455 unmodified lines
51675166 continue;
51685167 ice_vsi_free_q_vectors(pf->vsi[v]);
51695168 }
5170− ice_free_cpu_rx_rmap(ice_get_main_vsi(pf));
51715169 ice_clear_interrupt_scheme(pf);
51725170
51735171 pci_save_state(pdev);
@@ -6931,12 +6929,15 @@ static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type) · 1757 unmodified lines
69316929
69326930 dev_dbg(dev, "rebuilding PF after reset_type=%d\n", reset_type);
69336931
6932+#define ICE_EMP_RESET_SLEEP_MS 5000
69346933 if (reset_type == ICE_RESET_EMPR) {
69356934 /* If an EMP reset has occurred, any previously pending flash
69366935 * update will have completed. We no longer know whether or
69376936 * not the NVM update EMP reset is restricted.
69386937 */
69396938 pf->fw_emp_reset_disabled = false;
6939+
6940+ msleep(ICE_EMP_RESET_SLEEP_MS);
69406941 }
69416942
69426943 err = ice_init_all_ctrlq(hw);
drivers/net/ethernet/intel/ice/ice_nvm.c+1−0
@@ -641,6 +641,7 @@ ice_get_orom_civd_data(struct ice_hw *hw, enum ice_bank_select bank, · 640 unmodified lines
641641 status = ice_read_flash_module(hw, bank, ICE_SR_1ST_OROM_BANK_PTR, 0,
642642 orom_data, hw->flash.banks.orom_size);
643643 if (status) {
644+ vfree(orom_data);
644645 ice_debug(hw, ICE_DBG_NVM, "Unable to read Option ROM data\n");
645646 return status;
646647 }
drivers/net/ethernet/intel/ice/ice_sriov.c+1−1
@@ -1046,8 +1046,8 @@ int ice_sriov_configure(struct pci_dev *pdev, int num_vfs) · 1045 unmodified lines
10461046
10471047 if (!num_vfs) {
10481048 if (!pci_vfs_assigned(pdev)) {
1049− ice_mbx_deinit_snapshot(&pf->hw);
10501049 ice_free_vfs(pf);
1050+ ice_mbx_deinit_snapshot(&pf->hw);
10511051 if (pf->lag)
10521052 ice_enable_lag(pf->lag);
10531053 return 0;
drivers/net/ethernet/intel/ice/ice_virtchnl.c+9−18
@@ -3625,6 +3625,8 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event) · 3624 unmodified lines
36253625 return;
36263626 }
36273627
3628+ mutex_lock(&vf->cfg_lock);
3629+
36283630 /* Check if VF is disabled. */
36293631 if (test_bit(ICE_VF_STATE_DIS, vf->vf_states)) {
36303632 err = -EPERM;
@@ -3642,32 +3644,20 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event) · 11 unmodified lines
36423644 err = -EINVAL;
36433645 }
36443646
3645− if (!ice_vc_is_opcode_allowed(vf, v_opcode)) {
3646− ice_vc_send_msg_to_vf(vf, v_opcode,
3647− VIRTCHNL_STATUS_ERR_NOT_SUPPORTED, NULL,
3648− 0);
3649− ice_put_vf(vf);
3650− return;
3651− }
3652−
36533647 error_handler:
36543648 if (err) {
36553649 ice_vc_send_msg_to_vf(vf, v_opcode, VIRTCHNL_STATUS_ERR_PARAM,
36563650 NULL, 0);
36573651 dev_err(dev, "Invalid message from VF %d, opcode %d, len %d, error %d\n",
36583652 vf_id, v_opcode, msglen, err);
3659− ice_put_vf(vf);
3660− return;
3653+ goto finish;
36613654 }
36623655
3663− /* VF is being configured in another context that triggers a VFR, so no
3664− * need to process this message
3665− */
3666− if (!mutex_trylock(&vf->cfg_lock)) {
3667− dev_info(dev, "VF %u is being configured in another context that will trigger a VFR, so there is no need to handle this message\n",
3668− vf->vf_id);
3669− ice_put_vf(vf);
3670− return;
3656+ if (!ice_vc_is_opcode_allowed(vf, v_opcode)) {
3657+ ice_vc_send_msg_to_vf(vf, v_opcode,
3658+ VIRTCHNL_STATUS_ERR_NOT_SUPPORTED, NULL,
3659+ 0);
3660+ goto finish;
36713661 }
36723662
36733663 switch (v_opcode) {
@@ -3780,6 +3770,7 @@ error_handler: · 106 unmodified lines
37803770 vf_id, v_opcode, err);
37813771 }
37823772
3773+finish:
37833774 mutex_unlock(&vf->cfg_lock);
37843775 ice_put_vf(vf);
37853776 }
drivers/net/ethernet/intel/ice/ice_xsk.c+6−1
@@ -415,8 +415,8 @@ static u16 ice_fill_rx_descs(struct xsk_buff_pool *pool, struct xdp_buff **xdp, · 414 unmodified lines
415415 */
416416 static bool __ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring, u16 count)
417417 {
418+ u32 nb_buffs_extra = 0, nb_buffs = 0;
418419 union ice_32b_rx_flex_desc *rx_desc;
419− u32 nb_buffs_extra = 0, nb_buffs;
420420 u16 ntu = rx_ring->next_to_use;
421421 u16 total_count = count;
422422 struct xdp_buff **xdp;
@@ -428,6 +428,10 @@ static bool __ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring, u16 count) · 5 unmodified lines
428428 nb_buffs_extra = ice_fill_rx_descs(rx_ring->xsk_pool, xdp,
429429 rx_desc,
430430 rx_ring->count - ntu);
431+ if (nb_buffs_extra != rx_ring->count - ntu) {
432+ ntu += nb_buffs_extra;
433+ goto exit;
434+ }
431435 rx_desc = ICE_RX_DESC(rx_ring, 0);
432436 xdp = ice_xdp_buf(rx_ring, 0);
433437 ntu = 0;
@@ -441,6 +445,7 @@ static bool __ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring, u16 count) · 7 unmodified lines
441445 if (ntu == rx_ring->count)
442446 ntu = 0;
443447
448+exit:
444449 if (rx_ring->next_to_use != ntu)
445450 ice_release_rx_desc(rx_ring, ntu);
446451
drivers/net/ethernet/intel/igc/igc_i225.c+9−2
@@ -156,8 +156,15 @@ void igc_release_swfw_sync_i225(struct igc_hw *hw, u16 mask) · 155 unmodified lines
156156 {
157157 u32 swfw_sync;
158158
159− while (igc_get_hw_semaphore_i225(hw))
160− ; /* Empty */
159+ /* Releasing the resource requires first getting the HW semaphore.
160+ * If we fail to get the semaphore, there is nothing we can do,
161+ * except log an error and quit. We are not allowed to hang here
162+ * indefinitely, as it may cause denial of service or system crash.
163+ */
164+ if (igc_get_hw_semaphore_i225(hw)) {
165+ hw_dbg("Failed to release SW_FW_SYNC.\n");
166+ return;
167+ }
161168
162169 swfw_sync = rd32(IGC_SW_FW_SYNC);
163170 swfw_sync &= ~mask;
drivers/net/ethernet/intel/igc/igc_phy.c+2−2
@@ -581,7 +581,7 @@ static s32 igc_read_phy_reg_mdic(struct igc_hw *hw, u32 offset, u16 *data) · 580 unmodified lines
581581 * the lower time out
582582 */
583583 for (i = 0; i < IGC_GEN_POLL_TIMEOUT; i++) {
584− usleep_range(500, 1000);
584+ udelay(50);
585585 mdic = rd32(IGC_MDIC);
586586 if (mdic & IGC_MDIC_READY)
587587 break;
@@ -638,7 +638,7 @@ static s32 igc_write_phy_reg_mdic(struct igc_hw *hw, u32 offset, u16 data) · 50 unmodified lines
638638 * the lower time out
639639 */
640640 for (i = 0; i < IGC_GEN_POLL_TIMEOUT; i++) {
641− usleep_range(500, 1000);
641+ udelay(50);
642642 mdic = rd32(IGC_MDIC);
643643 if (mdic & IGC_MDIC_READY)
644644 break;
drivers/net/ethernet/intel/igc/igc_ptp.c+14−1
@@ -992,6 +992,17 @@ static void igc_ptp_time_restore(struct igc_adapter *adapter) · 991 unmodified lines
992992 igc_ptp_write_i225(adapter, &ts);
993993 }
994994
995+static void igc_ptm_stop(struct igc_adapter *adapter)
996+{
997+ struct igc_hw *hw = &adapter->hw;
998+ u32 ctrl;
999+
1000+ ctrl = rd32(IGC_PTM_CTRL);
1001+ ctrl &= ~IGC_PTM_CTRL_EN;
1002+
1003+ wr32(IGC_PTM_CTRL, ctrl);
1004+}
1005+
9951006 /**
9961007 * igc_ptp_suspend - Disable PTP work items and prepare for suspend
9971008 * @adapter: Board private structure
@@ -1009,8 +1020,10 @@ void igc_ptp_suspend(struct igc_adapter *adapter) · 11 unmodified lines
10091020 adapter->ptp_tx_skb = NULL;
10101021 clear_bit_unlock(__IGC_PTP_TX_IN_PROGRESS, &adapter->state);
10111022
1012− if (pci_device_is_present(adapter->pdev))
1023+ if (pci_device_is_present(adapter->pdev)) {
10131024 igc_ptp_time_save(adapter);
1025+ igc_ptm_stop(adapter);
1026+ }
10141027 }
10151028
10161029 /**
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c+2−1
@@ -903,7 +903,8 @@ int ixgbe_ipsec_vf_add_sa(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf) · 902 unmodified lines
903903 /* Tx IPsec offload doesn't seem to work on this
904904 * device, so block these requests for now.
905905 */
906− if (!(sam->flags & XFRM_OFFLOAD_INBOUND)) {
906+ sam->flags = sam->flags & ~XFRM_OFFLOAD_IPV6;
907+ if (sam->flags != XFRM_OFFLOAD_INBOUND) {
907908 err = -EOPNOTSUPP;
908909 goto err_out;
909910 }
drivers/net/ethernet/mellanox/mlxsw/i2c.c+1−0
@@ -650,6 +650,7 @@ static int mlxsw_i2c_probe(struct i2c_client *client, · 649 unmodified lines
650650 return 0;
651651
652652 errout:
653+ mutex_destroy(&mlxsw_i2c->cmd.lock);
653654 i2c_set_clientdata(client, NULL);
654655
655656 return err;
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c+1−1
@@ -423,7 +423,7 @@ mlxsw_sp_span_gretap4_route(const struct net_device *to_dev, · 422 unmodified lines
423423
424424 parms = mlxsw_sp_ipip_netdev_parms4(to_dev);
425425 ip_tunnel_init_flow(&fl4, parms.iph.protocol, *daddrp, *saddrp,
426− 0, 0, parms.link, tun->fwmark, 0);
426+ 0, 0, dev_net(to_dev), parms.link, tun->fwmark, 0);
427427
428428 rt = ip_route_output_key(tun->net, &fl4);
429429 if (IS_ERR(rt))
drivers/net/ethernet/microchip/lan966x/lan966x_mac.c+4−2
@@ -346,7 +346,8 @@ static void lan966x_mac_irq_process(struct lan966x *lan966x, u32 row, · 345 unmodified lines
346346
347347 lan966x_mac_process_raw_entry(&raw_entries[column],
348348 mac, &vid, &dest_idx);
349− WARN_ON(dest_idx > lan966x->num_phys_ports);
349+ if (WARN_ON(dest_idx >= lan966x->num_phys_ports))
350+ continue;
350351
351352 /* If the entry in SW is found, then there is nothing
352353 * to do
@@ -392,7 +393,8 @@ static void lan966x_mac_irq_process(struct lan966x *lan966x, u32 row, · 39 unmodified lines
392393
393394 lan966x_mac_process_raw_entry(&raw_entries[column],
394395 mac, &vid, &dest_idx);
395− WARN_ON(dest_idx > lan966x->num_phys_ports);
396+ if (WARN_ON(dest_idx >= lan966x->num_phys_ports))
397+ continue;
396398
397399 mac_entry = lan966x_mac_alloc_entry(mac, vid, dest_idx);
398400 if (!mac_entry)
drivers/net/ethernet/microchip/lan966x/lan966x_main.c+9−0
@@ -446,6 +446,12 @@ static bool lan966x_hw_offload(struct lan966x *lan966x, u32 port, · 445 unmodified lines
446446 ANA_CPU_FWD_CFG_MLD_REDIR_ENA)))
447447 return true;
448448
449+ if (eth_type_vlan(skb->protocol)) {
450+ skb = skb_vlan_untag(skb);
451+ if (unlikely(!skb))
452+ return false;
453+ }
454+
449455 if (skb->protocol == htons(ETH_P_IP) &&
450456 ip_hdr(skb)->protocol == IPPROTO_IGMP)
451457 return false;
@@ -665,6 +671,9 @@ static void lan966x_cleanup_ports(struct lan966x *lan966x) · 213 unmodified lines
665671 disable_irq(lan966x->ana_irq);
666672 lan966x->ana_irq = -ENXIO;
667673 }
674+
675+ if (lan966x->ptp_irq)
676+ devm_free_irq(lan966x->dev, lan966x->ptp_irq, lan966x);
668677 }
669678
670679 static int lan966x_probe_port(struct lan966x *lan966x, u32 p,
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c+4−4
@@ -29,10 +29,10 @@ enum { · 28 unmodified lines
2929
3030 static u64 lan966x_ptp_get_nominal_value(void)
3131 {
32− u64 res = 0x304d2df1;
33−
34− res <<= 32;
35− return res;
32+ /* This is the default value that for each system clock, the time of day
33+ * is increased. It has the format 5.59 nanosecond.
34+ */
35+ return 0x304d4873ecade305;
3636 }
3737
3838 int lan966x_ptp_hwtstamp_set(struct lan966x_port *port, struct ifreq *ifr)
drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c+1−2
@@ -322,8 +322,7 @@ static int lan966x_port_prechangeupper(struct net_device *dev, · 321 unmodified lines
322322
323323 if (netif_is_bridge_master(info->upper_dev) && !info->linking)
324324 switchdev_bridge_port_unoffload(port->dev, port,
325− &lan966x_switchdev_nb,
326− &lan966x_switchdev_blocking_nb);
325+ NULL, NULL);
327326
328327 return NOTIFY_DONE;
329328 }
drivers/net/ethernet/mscc/ocelot.c+14−2
@@ -551,7 +551,7 @@ int ocelot_port_vlan_filtering(struct ocelot *ocelot, int port, · 550 unmodified lines
551551 struct ocelot_vcap_block *block = &ocelot->block[VCAP_IS1];
552552 struct ocelot_port *ocelot_port = ocelot->ports[port];
553553 struct ocelot_vcap_filter *filter;
554− int err;
554+ int err = 0;
555555 u32 val;
556556
557557 list_for_each_entry(filter, &block->rules, list) {
@@ -570,7 +570,7 @@ int ocelot_port_vlan_filtering(struct ocelot *ocelot, int port, · 12 unmodified lines
570570 if (vlan_aware)
571571 err = ocelot_del_vlan_unaware_pvid(ocelot, port,
572572 ocelot_port->bridge);
573− else
573+ else if (ocelot_port->bridge)
574574 err = ocelot_add_vlan_unaware_pvid(ocelot, port,
575575 ocelot_port->bridge);
576576 if (err)
@@ -629,6 +629,13 @@ int ocelot_vlan_add(struct ocelot *ocelot, int port, u16 vid, bool pvid, · 52 unmodified lines
629629 {
630630 int err;
631631
632+ /* Ignore VID 0 added to our RX filter by the 8021q module, since
633+ * that collides with OCELOT_STANDALONE_PVID and changes it from
634+ * egress-untagged to egress-tagged.
635+ */
636+ if (!vid)
637+ return 0;
638+
632639 err = ocelot_vlan_member_add(ocelot, port, vid, untagged);
633640 if (err)
634641 return err;
@@ -651,6 +658,9 @@ int ocelot_vlan_del(struct ocelot *ocelot, int port, u16 vid) · 16 unmodified lines
651658 bool del_pvid = false;
652659 int err;
653660
661+ if (!vid)
662+ return 0;
663+
654664 if (ocelot_port->pvid_vlan && ocelot_port->pvid_vlan->vid == vid)
655665 del_pvid = true;
656666
@@ -2859,6 +2869,8 @@ static void ocelot_port_set_mcast_flood(struct ocelot *ocelot, int port, · 2202 unmodified lines
28592869 val = BIT(port);
28602870
28612871 ocelot_rmw_rix(ocelot, val, BIT(port), ANA_PGID_PGID, PGID_MC);
2872+ ocelot_rmw_rix(ocelot, val, BIT(port), ANA_PGID_PGID, PGID_MCIPV4);
2873+ ocelot_rmw_rix(ocelot, val, BIT(port), ANA_PGID_PGID, PGID_MCIPV6);
28622874 }
28632875
28642876 static void ocelot_port_set_bcast_flood(struct ocelot *ocelot, int port,
drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c+0−8
@@ -57,10 +57,6 @@ · 56 unmodified lines
5757 #define TSE_PCS_USE_SGMII_ENA BIT(0)
5858 #define TSE_PCS_IF_USE_SGMII 0x03
5959
60−#define SGMII_ADAPTER_CTRL_REG 0x00
61−#define SGMII_ADAPTER_DISABLE 0x0001
62−#define SGMII_ADAPTER_ENABLE 0x0000
63−
6460 #define AUTONEGO_LINK_TIMER 20
6561
6662 static int tse_pcs_reset(void __iomem *base, struct tse_pcs *pcs)
@@ -202,12 +198,8 @@ void tse_pcs_fix_mac_speed(struct tse_pcs *pcs, struct phy_device *phy_dev, · 135 unmodified lines
202198 unsigned int speed)
203199 {
204200 void __iomem *tse_pcs_base = pcs->tse_pcs_base;
205− void __iomem *sgmii_adapter_base = pcs->sgmii_adapter_base;
206201 u32 val;
207202
208− writew(SGMII_ADAPTER_ENABLE,
209− sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
210−
211203 pcs->autoneg = phy_dev->autoneg;
212204
213205 if (phy_dev->autoneg == AUTONEG_ENABLE) {
drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.h+4−0
@@ -10,6 +10,10 @@ · 9 unmodified lines
1010 #include <linux/phy.h>
1111 #include <linux/timer.h>
1212
13+#define SGMII_ADAPTER_CTRL_REG 0x00
14+#define SGMII_ADAPTER_ENABLE 0x0000
15+#define SGMII_ADAPTER_DISABLE 0x0001
16+
1317 struct tse_pcs {
1418 struct device *dev;
1519 void __iomem *tse_pcs_base;
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c+5−6
@@ -18,9 +18,6 @@ · 17 unmodified lines
1818
1919 #include "altr_tse_pcs.h"
2020
21−#define SGMII_ADAPTER_CTRL_REG 0x00
22−#define SGMII_ADAPTER_DISABLE 0x0001
23−
2421 #define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII 0x0
2522 #define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RGMII 0x1
2623 #define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RMII 0x2
@@ -62,14 +59,13 @@ static void socfpga_dwmac_fix_mac_speed(void *priv, unsigned int speed) · 35 unmodified lines
6259 {
6360 struct socfpga_dwmac *dwmac = (struct socfpga_dwmac *)priv;
6461 void __iomem *splitter_base = dwmac->splitter_base;
65− void __iomem *tse_pcs_base = dwmac->pcs.tse_pcs_base;
6662 void __iomem *sgmii_adapter_base = dwmac->pcs.sgmii_adapter_base;
6763 struct device *dev = dwmac->dev;
6864 struct net_device *ndev = dev_get_drvdata(dev);
6965 struct phy_device *phy_dev = ndev->phydev;
7066 u32 val;
7167
72− if ((tse_pcs_base) && (sgmii_adapter_base))
68+ if (sgmii_adapter_base)
7369 writew(SGMII_ADAPTER_DISABLE,
7470 sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
7571
@@ -93,8 +89,11 @@ static void socfpga_dwmac_fix_mac_speed(void *priv, unsigned int speed) · 17 unmodified lines
9389 writel(val, splitter_base + EMAC_SPLITTER_CTRL_REG);
9490 }
9591
96− if (tse_pcs_base && sgmii_adapter_base)
92+ if (phy_dev && sgmii_adapter_base) {
93+ writew(SGMII_ADAPTER_ENABLE,
94+ sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
9795 tse_pcs_fix_mac_speed(&dwmac->pcs, phy_dev, speed);
96+ }
9897 }
9998
10099 static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *dev)
drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c+2−2
@@ -71,9 +71,9 @@ static int init_systime(void __iomem *ioaddr, u32 sec, u32 nsec) · 70 unmodified lines
7171 writel(value, ioaddr + PTP_TCR);
7272
7373 /* wait for present system time initialize to complete */
74− return readl_poll_timeout(ioaddr + PTP_TCR, value,
74+ return readl_poll_timeout_atomic(ioaddr + PTP_TCR, value,
7575 !(value & PTP_TCR_TSINIT),
76− 10000, 100000);
76+ 10, 100000);
7777 }
7878
7979 static int config_addend(void __iomem *ioaddr, u32 addend)
drivers/net/hippi/rrunner.c+2−0
@@ -1355,7 +1355,9 @@ static int rr_close(struct net_device *dev) · 1354 unmodified lines
13551355
13561356 rrpriv->fw_running = 0;
13571357
1358+ spin_unlock_irqrestore(&rrpriv->lock, flags);
13581359 del_timer_sync(&rrpriv->timer);
1360+ spin_lock_irqsave(&rrpriv->lock, flags);
13591361
13601362 writel(0, &regs->TxPi);
13611363 writel(0, &regs->IpRxPi);
drivers/net/macvlan.c+6−2
@@ -460,8 +460,10 @@ static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) · 459 unmodified lines
460460 return RX_HANDLER_CONSUMED;
461461 *pskb = skb;
462462 eth = eth_hdr(skb);
463− if (macvlan_forward_source(skb, port, eth->h_source))
463+ if (macvlan_forward_source(skb, port, eth->h_source)) {
464+ kfree_skb(skb);
464465 return RX_HANDLER_CONSUMED;
466+ }
465467 src = macvlan_hash_lookup(port, eth->h_source);
466468 if (src && src->mode != MACVLAN_MODE_VEPA &&
467469 src->mode != MACVLAN_MODE_BRIDGE) {
@@ -480,8 +482,10 @@ static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) · 12 unmodified lines
480482 return RX_HANDLER_PASS;
481483 }
482484
483− if (macvlan_forward_source(skb, port, eth->h_source))
485+ if (macvlan_forward_source(skb, port, eth->h_source)) {
486+ kfree_skb(skb);
484487 return RX_HANDLER_CONSUMED;
488+ }
485489 if (macvlan_passthru(port))
486490 vlan = list_first_or_null_rcu(&port->vlans,
487491 struct macvlan_dev, list);
drivers/net/mdio/fwnode_mdio.c+5−0
@@ -43,6 +43,11 @@ int fwnode_mdiobus_phy_device_register(struct mii_bus *mdio, · 42 unmodified lines
4343 int rc;
4444
4545 rc = fwnode_irq_get(child, 0);
46+ /* Don't wait forever if the IRQ provider doesn't become available,
47+ * just fall back to poll mode
48+ */
49+ if (rc == -EPROBE_DEFER)
50+ rc = driver_deferred_probe_check_state(&phy->mdio.dev);
4651 if (rc == -EPROBE_DEFER)
4752 return rc;
4853
drivers/net/phy/marvell10g.c+1−1
@@ -880,7 +880,7 @@ static int mv3310_read_status_copper(struct phy_device *phydev) · 879 unmodified lines
880880
881881 cssr1 = phy_read_mmd(phydev, MDIO_MMD_PCS, MV_PCS_CSSR1);
882882 if (cssr1 < 0)
883− return val;
883+ return cssr1;
884884
885885 /* If the link settings are not resolved, mark the link down */
886886 if (!(cssr1 & MV_PCS_CSSR1_RESOLVED)) {
drivers/net/phy/microchip_t1.c+2−6
@@ -706,7 +706,6 @@ static int lan87xx_read_status(struct phy_device *phydev) · 705 unmodified lines
706706 static int lan87xx_config_aneg(struct phy_device *phydev)
707707 {
708708 u16 ctl = 0;
709− int rc;
710709
711710 switch (phydev->master_slave_set) {
712711 case MASTER_SLAVE_CFG_MASTER_FORCE:
@@ -722,11 +721,7 @@ static int lan87xx_config_aneg(struct phy_device *phydev) · 9 unmodified lines
722721 return -EOPNOTSUPP;
723722 }
724723
725− rc = phy_modify_changed(phydev, MII_CTRL1000, CTL1000_AS_MASTER, ctl);
726− if (rc == 1)
727− rc = genphy_soft_reset(phydev);
728−
729− return rc;
724+ return phy_modify_changed(phydev, MII_CTRL1000, CTL1000_AS_MASTER, ctl);
730725 }
731726
732727 static struct phy_driver microchip_t1_phy_driver[] = {
@@ -748,6 +743,7 @@ static struct phy_driver microchip_t1_phy_driver[] = { · 15 unmodified lines
748743 {
749744 PHY_ID_MATCH_MODEL(PHY_ID_LAN937X),
750745 .name = "Microchip LAN937x T1",
746+ .flags = PHY_POLL_CABLE_TEST,
751747 .features = PHY_BASIC_T1_FEATURES,
752748 .config_init = lan87xx_config_init,
753749 .suspend = genphy_suspend,
drivers/net/tun.c+1−1
@@ -1124,7 +1124,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev) · 1123 unmodified lines
11241124
11251125 /* NETIF_F_LLTX requires to do our own update of trans_start */
11261126 queue = netdev_get_tx_queue(dev, txq);
1127− queue->trans_start = jiffies;
1127+ txq_trans_cond_update(queue);
11281128
11291129 /* Notify and wake up reader process */
11301130 if (tfile->flags & TUN_FASYNC)
drivers/net/veth.c+1−1
@@ -320,7 +320,7 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) · 319 unmodified lines
320320
321321 rcu_read_lock();
322322 rcv = rcu_dereference(priv->peer);
323− if (unlikely(!rcv)) {
323+ if (unlikely(!rcv) || !pskb_may_pull(skb, ETH_HLEN)) {
324324 kfree_skb(skb);
325325 goto drop;
326326 }
drivers/net/virtio_net.c+19−1
@@ -1005,6 +1005,24 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, · 1004 unmodified lines
10051005 * xdp.data_meta were adjusted
10061006 */
10071007 len = xdp.data_end - xdp.data + vi->hdr_len + metasize;
1008+
1009+ /* recalculate headroom if xdp.data or xdp_data_meta
1010+ * were adjusted, note that offset should always point
1011+ * to the start of the reserved bytes for virtio_net
1012+ * header which are followed by xdp.data, that means
1013+ * that offset is equal to the headroom (when buf is
1014+ * starting at the beginning of the page, otherwise
1015+ * there is a base offset inside the page) but it's used
1016+ * with a different starting point (buf start) than
1017+ * xdp.data (buf start + vnet hdr size). If xdp.data or
1018+ * data_meta were adjusted by the xdp prog then the
1019+ * headroom size has changed and so has the offset, we
1020+ * can use data_hard_start, which points at buf start +
1021+ * vnet hdr size, to calculate the new headroom and use
1022+ * it later to compute buf start in page_to_skb()
1023+ */
1024+ headroom = xdp.data - xdp.data_hard_start - metasize;
1025+
10081026 /* We can only create skb based on xdp_page. */
10091027 if (unlikely(xdp_page != page)) {
10101028 rcu_read_unlock();
@@ -1012,7 +1030,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, · 1 unmodified line
10121030 head_skb = page_to_skb(vi, rq, xdp_page, offset,
10131031 len, PAGE_SIZE, false,
10141032 metasize,
1015− VIRTIO_XDP_HEADROOM);
1033+ headroom);
10161034 return head_skb;
10171035 }
10181036 break;
drivers/net/vxlan/vxlan_core.c+2−2
@@ -651,11 +651,11 @@ static int vxlan_fdb_append(struct vxlan_fdb *f, · 650 unmodified lines
651651
652652 rd = kmalloc(sizeof(*rd), GFP_ATOMIC);
653653 if (rd == NULL)
654− return -ENOBUFS;
654+ return -ENOMEM;
655655
656656 if (dst_cache_init(&rd->dst_cache, GFP_ATOMIC)) {
657657 kfree(rd);
658− return -ENOBUFS;
658+ return -ENOMEM;
659659 }
660660
661661 rd->remote_ip = *ip;
drivers/net/wan/cosa.c+1−1
@@ -349,7 +349,7 @@ static int __init cosa_init(void) · 348 unmodified lines
349349 }
350350 } else {
351351 cosa_major = register_chrdev(0, "cosa", &cosa_fops);
352− if (!cosa_major) {
352+ if (cosa_major < 0) {
353353 pr_warn("unable to register chardev\n");
354354 err = -EIO;
355355 goto out;
drivers/net/wireguard/device.c+2−1
@@ -19,6 +19,7 @@ · 18 unmodified lines
1919 #include <linux/if_arp.h>
2020 #include <linux/icmp.h>
2121 #include <linux/suspend.h>
22+#include <net/dst_metadata.h>
2223 #include <net/icmp.h>
2324 #include <net/rtnetlink.h>
2425 #include <net/ip_tunnels.h>
@@ -167,7 +168,7 @@ static netdev_tx_t wg_xmit(struct sk_buff *skb, struct net_device *dev) · 142 unmodified lines
167168 goto err_peer;
168169 }
169170
170− mtu = skb_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu;
171+ mtu = skb_valid_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu;
171172
172173 __skb_queue_head_init(&packets);
173174 if (!skb_is_gso(skb)) {
drivers/net/wireless/ath/ath11k/mac.c+14−8
@@ -3136,6 +3136,20 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw, · 3135 unmodified lines
31363136 arvif->do_not_send_tmpl = true;
31373137 else
31383138 arvif->do_not_send_tmpl = false;
3139+
3140+ if (vif->bss_conf.he_support) {
3141+ ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
3142+ WMI_VDEV_PARAM_BA_MODE,
3143+ WMI_BA_MODE_BUFFER_SIZE_256);
3144+ if (ret)
3145+ ath11k_warn(ar->ab,
3146+ "failed to set BA BUFFER SIZE 256 for vdev: %d\n",
3147+ arvif->vdev_id);
3148+ else
3149+ ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
3150+ "Set BA BUFFER SIZE 256 for VDEV: %d\n",
3151+ arvif->vdev_id);
3152+ }
31393153 }
31403154
31413155 if (changed & (BSS_CHANGED_BEACON_INFO | BSS_CHANGED_BEACON)) {
@@ -3171,14 +3185,6 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw, · 29 unmodified lines
31713185
31723186 if (arvif->is_up && vif->bss_conf.he_support &&
31733187 vif->bss_conf.he_oper.params) {
3174− ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
3175− WMI_VDEV_PARAM_BA_MODE,
3176− WMI_BA_MODE_BUFFER_SIZE_256);
3177− if (ret)
3178− ath11k_warn(ar->ab,
3179− "failed to set BA BUFFER SIZE 256 for vdev: %d\n",
3180− arvif->vdev_id);
3181−
31823188 param_id = WMI_VDEV_PARAM_HEOPS_0_31;
31833189 param_value = vif->bss_conf.he_oper.params;
31843190 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
drivers/net/wireless/ath/ath9k/main.c+1−1
@@ -839,7 +839,7 @@ static bool ath9k_txq_list_has_key(struct list_head *txq_list, u32 keyix) · 838 unmodified lines
839839 continue;
840840
841841 txinfo = IEEE80211_SKB_CB(bf->bf_mpdu);
842− fi = (struct ath_frame_info *)&txinfo->rate_driver_data[0];
842+ fi = (struct ath_frame_info *)&txinfo->status.status_driver_data[0];
843843 if (fi->keyix == keyix)
844844 return true;
845845 }
drivers/net/wireless/ath/ath9k/xmit.c+21−12
@@ -141,8 +141,8 @@ static struct ath_frame_info *get_frame_info(struct sk_buff *skb) · 140 unmodified lines
141141 {
142142 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
143143 BUILD_BUG_ON(sizeof(struct ath_frame_info) >
144− sizeof(tx_info->rate_driver_data));
145− return (struct ath_frame_info *) &tx_info->rate_driver_data[0];
144+ sizeof(tx_info->status.status_driver_data));
145+ return (struct ath_frame_info *) &tx_info->status.status_driver_data[0];
146146 }
147147
148148 static void ath_send_bar(struct ath_atx_tid *tid, u16 seqno)
@@ -2542,6 +2542,16 @@ skip_tx_complete: · 2393 unmodified lines
25422542 spin_unlock_irqrestore(&sc->tx.txbuflock, flags);
25432543 }
25442544
2545+static void ath_clear_tx_status(struct ieee80211_tx_info *tx_info)
2546+{
2547+ void *ptr = &tx_info->status;
2548+
2549+ memset(ptr + sizeof(tx_info->status.rates), 0,
2550+ sizeof(tx_info->status) -
2551+ sizeof(tx_info->status.rates) -
2552+ sizeof(tx_info->status.status_driver_data));
2553+}
2554+
25452555 static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
25462556 struct ath_tx_status *ts, int nframes, int nbad,
25472557 int txok)
@@ -2553,6 +2563,8 @@ static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf, · 5 unmodified lines
25532563 struct ath_hw *ah = sc->sc_ah;
25542564 u8 i, tx_rateindex;
25552565
2566+ ath_clear_tx_status(tx_info);
2567+
25562568 if (txok)
25572569 tx_info->status.ack_signal = ts->ts_rssi;
25582570
@@ -2567,6 +2579,13 @@ static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf, · 8 unmodified lines
25672579 tx_info->status.ampdu_len = nframes;
25682580 tx_info->status.ampdu_ack_len = nframes - nbad;
25692581
2582+ tx_info->status.rates[tx_rateindex].count = ts->ts_longretry + 1;
2583+
2584+ for (i = tx_rateindex + 1; i < hw->max_rates; i++) {
2585+ tx_info->status.rates[i].count = 0;
2586+ tx_info->status.rates[i].idx = -1;
2587+ }
2588+
25702589 if ((ts->ts_status & ATH9K_TXERR_FILT) == 0 &&
25712590 (tx_info->flags & IEEE80211_TX_CTL_NO_ACK) == 0) {
25722591 /*
@@ -2588,16 +2607,6 @@ static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf, · 15 unmodified lines
25882607 tx_info->status.rates[tx_rateindex].count =
25892608 hw->max_rate_tries;
25902609 }
2591−
2592− for (i = tx_rateindex + 1; i < hw->max_rates; i++) {
2593− tx_info->status.rates[i].count = 0;
2594− tx_info->status.rates[i].idx = -1;
2595− }
2596−
2597− tx_info->status.rates[tx_rateindex].count = ts->ts_longretry + 1;
2598−
2599− /* we report airtime in ath_tx_count_airtime(), don't report twice */
2600− tx_info->status.tx_time = 0;
26012610 }
26022611
26032612 static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c+1−1
@@ -557,7 +557,7 @@ enum brcmf_sdio_frmtype { · 556 unmodified lines
557557 BRCMF_SDIO_FT_SUB,
558558 };
559559
560−#define SDIOD_DRVSTR_KEY(chip, pmu) (((chip) << 16) | (pmu))
560+#define SDIOD_DRVSTR_KEY(chip, pmu) (((unsigned int)(chip) << 16) | (pmu))
561561
562562 /* SDIO Pad drive strength to select value mappings */
563563 struct sdiod_drive_str {
drivers/net/wireless/mediatek/mt76/mt76x2/pci.c+1−1
@@ -80,7 +80,7 @@ mt76x2e_probe(struct pci_dev *pdev, const struct pci_device_id *id) · 79 unmodified lines
8080 mt76_rmw_field(dev, 0x15a10, 0x1f << 16, 0x9);
8181
8282 /* RG_SSUSB_G1_CDR_BIC_LTR = 0xf */
83− mt76_rmw_field(dev, 0x15a0c, 0xf << 28, 0xf);
83+ mt76_rmw_field(dev, 0x15a0c, 0xfU << 28, 0xf);
8484
8585 /* RG_SSUSB_CDR_BR_PE1D = 0x3 */
8686 mt76_rmw_field(dev, 0x15c58, 0x3 << 6, 0x3);
drivers/nvme/host/core.c+20−7
@@ -366,7 +366,7 @@ static inline void nvme_end_req(struct request *req) · 365 unmodified lines
366366 {
367367 blk_status_t status = nvme_error_status(nvme_req(req)->status);
368368
369− if (unlikely(nvme_req(req)->status != NVME_SC_SUCCESS))
369+ if (unlikely(nvme_req(req)->status && !(req->rq_flags & RQF_QUIET)))
370370 nvme_log_error(req);
371371 nvme_end_req_zoned(req);
372372 nvme_trace_bio_complete(req);
@@ -1015,6 +1015,7 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd, · 642 unmodified lines
10151015 goto out;
10161016 }
10171017
1018+ req->rq_flags |= RQF_QUIET;
10181019 ret = nvme_execute_rq(req, at_head);
10191020 if (result && ret >= 0)
10201021 *result = nvme_req(req)->result;
@@ -1287,6 +1288,8 @@ static int nvme_process_ns_desc(struct nvme_ctrl *ctrl, struct nvme_ns_ids *ids, · 266 unmodified lines
12871288 warn_str, cur->nidl);
12881289 return -1;
12891290 }
1291+ if (ctrl->quirks & NVME_QUIRK_BOGUS_NID)
1292+ return NVME_NIDT_EUI64_LEN;
12901293 memcpy(ids->eui64, data + sizeof(*cur), NVME_NIDT_EUI64_LEN);
12911294 return NVME_NIDT_EUI64_LEN;
12921295 case NVME_NIDT_NGUID:
@@ -1295,6 +1298,8 @@ static int nvme_process_ns_desc(struct nvme_ctrl *ctrl, struct nvme_ns_ids *ids, · 2 unmodified lines
12951298 warn_str, cur->nidl);
12961299 return -1;
12971300 }
1301+ if (ctrl->quirks & NVME_QUIRK_BOGUS_NID)
1302+ return NVME_NIDT_NGUID_LEN;
12981303 memcpy(ids->nguid, data + sizeof(*cur), NVME_NIDT_NGUID_LEN);
12991304 return NVME_NIDT_NGUID_LEN;
13001305 case NVME_NIDT_UUID:
@@ -1303,6 +1308,8 @@ static int nvme_process_ns_desc(struct nvme_ctrl *ctrl, struct nvme_ns_ids *ids, · 2 unmodified lines
13031308 warn_str, cur->nidl);
13041309 return -1;
13051310 }
1311+ if (ctrl->quirks & NVME_QUIRK_BOGUS_NID)
1312+ return NVME_NIDT_UUID_LEN;
13061313 uuid_copy(&ids->uuid, data + sizeof(*cur));
13071314 return NVME_NIDT_UUID_LEN;
13081315 case NVME_NIDT_CSI:
@@ -1399,12 +1406,18 @@ static int nvme_identify_ns(struct nvme_ctrl *ctrl, unsigned nsid, · 90 unmodified lines
13991406 if ((*id)->ncap == 0) /* namespace not allocated or attached */
14001407 goto out_free_id;
14011408
1402− if (ctrl->vs >= NVME_VS(1, 1, 0) &&
1403− !memchr_inv(ids->eui64, 0, sizeof(ids->eui64)))
1404− memcpy(ids->eui64, (*id)->eui64, sizeof(ids->eui64));
1405− if (ctrl->vs >= NVME_VS(1, 2, 0) &&
1406− !memchr_inv(ids->nguid, 0, sizeof(ids->nguid)))
1407− memcpy(ids->nguid, (*id)->nguid, sizeof(ids->nguid));
1409+
1410+ if (ctrl->quirks & NVME_QUIRK_BOGUS_NID) {
1411+ dev_info(ctrl->device,
1412+ "Ignoring bogus Namespace Identifiers\n");
1413+ } else {
1414+ if (ctrl->vs >= NVME_VS(1, 1, 0) &&
1415+ !memchr_inv(ids->eui64, 0, sizeof(ids->eui64)))
1416+ memcpy(ids->eui64, (*id)->eui64, sizeof(ids->eui64));
1417+ if (ctrl->vs >= NVME_VS(1, 2, 0) &&
1418+ !memchr_inv(ids->nguid, 0, sizeof(ids->nguid)))
1419+ memcpy(ids->nguid, (*id)->nguid, sizeof(ids->nguid));
1420+ }
14081421
14091422 return 0;
14101423
drivers/nvme/host/nvme.h+5−0
@@ -144,6 +144,11 @@ enum nvme_quirks { · 143 unmodified lines
144144 * encoding the generation sequence number.
145145 */
146146 NVME_QUIRK_SKIP_CID_GEN = (1 << 17),
147+
148+ /*
149+ * Reports garbage in the namespace identifiers (eui64, nguid, uuid).
150+ */
151+ NVME_QUIRK_BOGUS_NID = (1 << 18),
147152 };
148153
149154 /*
drivers/nvme/host/pci.c+8−1
@@ -3409,7 +3409,10 @@ static const struct pci_device_id nvme_id_table[] = { · 3408 unmodified lines
34093409 .driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN, },
34103410 { PCI_VDEVICE(INTEL, 0x5845), /* Qemu emulated controller */
34113411 .driver_data = NVME_QUIRK_IDENTIFY_CNS |
3412− NVME_QUIRK_DISABLE_WRITE_ZEROES, },
3412+ NVME_QUIRK_DISABLE_WRITE_ZEROES |
3413+ NVME_QUIRK_BOGUS_NID, },
3414+ { PCI_VDEVICE(REDHAT, 0x0010), /* Qemu emulated controller */
3415+ .driver_data = NVME_QUIRK_BOGUS_NID, },
34133416 { PCI_DEVICE(0x126f, 0x2263), /* Silicon Motion unidentified */
34143417 .driver_data = NVME_QUIRK_NO_NS_DESC_LIST, },
34153418 { PCI_DEVICE(0x1bb1, 0x0100), /* Seagate Nytro Flash Storage */
@@ -3447,6 +3450,10 @@ static const struct pci_device_id nvme_id_table[] = { · 31 unmodified lines
34473450 .driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
34483451 { PCI_DEVICE(0x2646, 0x2263), /* KINGSTON A2000 NVMe SSD */
34493452 .driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
3453+ { PCI_DEVICE(0x1e4B, 0x1002), /* MAXIO MAP1002 */
3454+ .driver_data = NVME_QUIRK_BOGUS_NID, },
3455+ { PCI_DEVICE(0x1e4B, 0x1202), /* MAXIO MAP1202 */
3456+ .driver_data = NVME_QUIRK_BOGUS_NID, },
34503457 { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0061),
34513458 .driver_data = NVME_QUIRK_DMA_ADDRESS_BITS_48, },
34523459 { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0065),
drivers/perf/arm_pmu.c+4−6
@@ -400,6 +400,9 @@ validate_group(struct perf_event *event) · 399 unmodified lines
400400 if (!validate_event(event->pmu, &fake_pmu, leader))
401401 return -EINVAL;
402402
403+ if (event == leader)
404+ return 0;
405+
403406 for_each_sibling_event(sibling, leader) {
404407 if (!validate_event(event->pmu, &fake_pmu, sibling))
405408 return -EINVAL;
@@ -489,12 +492,7 @@ __hw_perf_event_init(struct perf_event *event) · 83 unmodified lines
489492 local64_set(&hwc->period_left, hwc->sample_period);
490493 }
491494
492− if (event->group_leader != event) {
493− if (validate_group(event) != 0)
494− return -EINVAL;
495− }
496−
497− return 0;
495+ return validate_group(event);
498496 }
499497
500498 static int armpmu_event_init(struct perf_event *event)
drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c+12−8
@@ -414,19 +414,19 @@ static int phy_g12a_usb3_pcie_probe(struct platform_device *pdev) · 413 unmodified lines
414414
415415 ret = clk_prepare_enable(priv->clk_ref);
416416 if (ret)
417− goto err_disable_clk_ref;
417+ return ret;
418418
419419 priv->reset = devm_reset_control_array_get_exclusive(dev);
420− if (IS_ERR(priv->reset))
421− return PTR_ERR(priv->reset);
420+ if (IS_ERR(priv->reset)) {
421+ ret = PTR_ERR(priv->reset);
422+ goto err_disable_clk_ref;
423+ }
422424
423425 priv->phy = devm_phy_create(dev, np, &phy_g12a_usb3_pcie_ops);
424426 if (IS_ERR(priv->phy)) {
425427 ret = PTR_ERR(priv->phy);
426− if (ret != -EPROBE_DEFER)
427− dev_err(dev, "failed to create PHY\n");
428−
429− return ret;
428+ dev_err_probe(dev, ret, "failed to create PHY\n");
429+ goto err_disable_clk_ref;
430430 }
431431
432432 phy_set_drvdata(priv->phy, priv);
@@ -434,8 +434,12 @@ static int phy_g12a_usb3_pcie_probe(struct platform_device *pdev) · 1 unmodified line
434434
435435 phy_provider = devm_of_phy_provider_register(dev,
436436 phy_g12a_usb3_pcie_xlate);
437+ if (IS_ERR(phy_provider)) {
438+ ret = PTR_ERR(phy_provider);
439+ goto err_disable_clk_ref;
440+ }
437441
438− return PTR_ERR_OR_ZERO(phy_provider);
442+ return 0;
439443
440444 err_disable_clk_ref:
441445 clk_disable_unprepare(priv->clk_ref);
drivers/phy/motorola/phy-mapphone-mdm6600.c+2−1
@@ -629,7 +629,8 @@ idle: · 628 unmodified lines
629629 cleanup:
630630 if (error < 0)
631631 phy_mdm6600_device_power_off(ddata);
632−
632+ pm_runtime_disable(ddata->dev);
633+ pm_runtime_dont_use_autosuspend(ddata->dev);
633634 return error;
634635 }
635636
drivers/phy/samsung/phy-exynos5250-sata.c+15−6
@@ -187,6 +187,7 @@ static int exynos_sata_phy_probe(struct platform_device *pdev) · 186 unmodified lines
187187 return -EINVAL;
188188
189189 sata_phy->client = of_find_i2c_device_by_node(node);
190+ of_node_put(node);
190191 if (!sata_phy->client)
191192 return -EPROBE_DEFER;
192193
@@ -195,20 +196,21 @@ static int exynos_sata_phy_probe(struct platform_device *pdev) · 2 unmodified lines
195196 sata_phy->phyclk = devm_clk_get(dev, "sata_phyctrl");
196197 if (IS_ERR(sata_phy->phyclk)) {
197198 dev_err(dev, "failed to get clk for PHY\n");
198− return PTR_ERR(sata_phy->phyclk);
199+ ret = PTR_ERR(sata_phy->phyclk);
200+ goto put_dev;
199201 }
200202
201203 ret = clk_prepare_enable(sata_phy->phyclk);
202204 if (ret < 0) {
203205 dev_err(dev, "failed to enable source clk\n");
204− return ret;
206+ goto put_dev;
205207 }
206208
207209 sata_phy->phy = devm_phy_create(dev, NULL, &exynos_sata_phy_ops);
208210 if (IS_ERR(sata_phy->phy)) {
209− clk_disable_unprepare(sata_phy->phyclk);
210211 dev_err(dev, "failed to create PHY\n");
211− return PTR_ERR(sata_phy->phy);
212+ ret = PTR_ERR(sata_phy->phy);
213+ goto clk_disable;
212214 }
213215
214216 phy_set_drvdata(sata_phy->phy, sata_phy);
@@ -216,11 +218,18 @@ static int exynos_sata_phy_probe(struct platform_device *pdev) · 1 unmodified line
216218 phy_provider = devm_of_phy_provider_register(dev,
217219 of_phy_simple_xlate);
218220 if (IS_ERR(phy_provider)) {
219− clk_disable_unprepare(sata_phy->phyclk);
220− return PTR_ERR(phy_provider);
221+ ret = PTR_ERR(phy_provider);
222+ goto clk_disable;
221223 }
222224
223225 return 0;
226+
227+clk_disable:
228+ clk_disable_unprepare(sata_phy->phyclk);
229+put_dev:
230+ put_device(&sata_phy->client->dev);
231+
232+ return ret;
224233 }
225234
226235 static const struct of_device_id exynos_sata_phy_of_match[] = {
drivers/phy/ti/phy-am654-serdes.c+1−1
@@ -838,7 +838,7 @@ static int serdes_am654_probe(struct platform_device *pdev) · 837 unmodified lines
838838
839839 clk_err:
840840 of_clk_del_provider(node);
841−
841+ pm_runtime_disable(dev);
842842 return ret;
843843 }
844844
drivers/phy/ti/phy-omap-usb2.c+1−1
@@ -215,7 +215,7 @@ static int omap_usb2_enable_clocks(struct omap_usb *phy) · 214 unmodified lines
215215 return 0;
216216
217217 err1:
218− clk_disable(phy->wkupclk);
218+ clk_disable_unprepare(phy->wkupclk);
219219
220220 err0:
221221 return ret;
drivers/phy/ti/phy-ti-pipe3.c+1−0
@@ -696,6 +696,7 @@ static int ti_pipe3_get_sysctrl(struct ti_pipe3 *phy) · 695 unmodified lines
696696 }
697697
698698 control_pdev = of_find_device_by_node(control_node);
699+ of_node_put(control_node);
699700 if (!control_pdev) {
700701 dev_err(dev, "Failed to get control device\n");
701702 return -EINVAL;
drivers/phy/ti/phy-tusb1210.c+9−3
@@ -155,7 +155,7 @@ static int tusb1210_set_mode(struct phy *phy, enum phy_mode mode, int submode) · 154 unmodified lines
155155 }
156156
157157 #ifdef CONFIG_POWER_SUPPLY
158−const char * const tusb1210_chg_det_states[] = {
158+static const char * const tusb1210_chg_det_states[] = {
159159 "CHG_DET_CONNECTING",
160160 "CHG_DET_START_DET",
161161 "CHG_DET_READ_DET",
@@ -537,12 +537,18 @@ static int tusb1210_probe(struct ulpi *ulpi) · 375 unmodified lines
537537 tusb1210_probe_charger_detect(tusb);
538538
539539 tusb->phy = ulpi_phy_create(ulpi, &phy_ops);
540− if (IS_ERR(tusb->phy))
541− return PTR_ERR(tusb->phy);
540+ if (IS_ERR(tusb->phy)) {
541+ ret = PTR_ERR(tusb->phy);
542+ goto err_remove_charger;
543+ }
542544
543545 phy_set_drvdata(tusb->phy, tusb);
544546 ulpi_set_drvdata(ulpi, tusb);
545547 return 0;
548+
549+err_remove_charger:
550+ tusb1210_remove_charger_detect(tusb);
551+ return ret;
546552 }
547553
548554 static void tusb1210_remove(struct ulpi *ulpi)
drivers/pinctrl/intel/pinctrl-alderlake.c+40−20
@@ -14,11 +14,17 @@ · 13 unmodified lines
1414
1515 #include "pinctrl-intel.h"
1616
17−#define ADL_PAD_OWN 0x0a0
18−#define ADL_PADCFGLOCK 0x110
19−#define ADL_HOSTSW_OWN 0x150
20−#define ADL_GPI_IS 0x200
21−#define ADL_GPI_IE 0x220
17+#define ADL_N_PAD_OWN 0x020
18+#define ADL_N_PADCFGLOCK 0x080
19+#define ADL_N_HOSTSW_OWN 0x0b0
20+#define ADL_N_GPI_IS 0x100
21+#define ADL_N_GPI_IE 0x120
22+
23+#define ADL_S_PAD_OWN 0x0a0
24+#define ADL_S_PADCFGLOCK 0x110
25+#define ADL_S_HOSTSW_OWN 0x150
26+#define ADL_S_GPI_IS 0x200
27+#define ADL_S_GPI_IE 0x220
2228
2329 #define ADL_GPP(r, s, e, g) \
2430 { \
@@ -28,14 +34,28 @@ · 3 unmodified lines
2834 .gpio_base = (g), \
2935 }
3036
31−#define ADL_COMMUNITY(b, s, e, g) \
37+#define ADL_N_COMMUNITY(b, s, e, g) \
38+ { \
39+ .barno = (b), \
40+ .padown_offset = ADL_N_PAD_OWN, \
41+ .padcfglock_offset = ADL_N_PADCFGLOCK, \
42+ .hostown_offset = ADL_N_HOSTSW_OWN, \
43+ .is_offset = ADL_N_GPI_IS, \
44+ .ie_offset = ADL_N_GPI_IE, \
45+ .pin_base = (s), \
46+ .npins = ((e) - (s) + 1), \
47+ .gpps = (g), \
48+ .ngpps = ARRAY_SIZE(g), \
49+ }
50+
51+#define ADL_S_COMMUNITY(b, s, e, g) \
3252 { \
3353 .barno = (b), \
34− .padown_offset = ADL_PAD_OWN, \
35− .padcfglock_offset = ADL_PADCFGLOCK, \
36− .hostown_offset = ADL_HOSTSW_OWN, \
37− .is_offset = ADL_GPI_IS, \
38− .ie_offset = ADL_GPI_IE, \
54+ .padown_offset = ADL_S_PAD_OWN, \
55+ .padcfglock_offset = ADL_S_PADCFGLOCK, \
56+ .hostown_offset = ADL_S_HOSTSW_OWN, \
57+ .is_offset = ADL_S_GPI_IS, \
58+ .ie_offset = ADL_S_GPI_IE, \
3959 .pin_base = (s), \
4060 .npins = ((e) - (s) + 1), \
4161 .gpps = (g), \
@@ -342,10 +362,10 @@ static const struct intel_padgroup adln_community5_gpps[] = { · 300 unmodified lines
342362 };
343363
344364 static const struct intel_community adln_communities[] = {
345− ADL_COMMUNITY(0, 0, 66, adln_community0_gpps),
346− ADL_COMMUNITY(1, 67, 168, adln_community1_gpps),
347− ADL_COMMUNITY(2, 169, 248, adln_community4_gpps),
348− ADL_COMMUNITY(3, 249, 256, adln_community5_gpps),
365+ ADL_N_COMMUNITY(0, 0, 66, adln_community0_gpps),
366+ ADL_N_COMMUNITY(1, 67, 168, adln_community1_gpps),
367+ ADL_N_COMMUNITY(2, 169, 248, adln_community4_gpps),
368+ ADL_N_COMMUNITY(3, 249, 256, adln_community5_gpps),
349369 };
350370
351371 static const struct intel_pinctrl_soc_data adln_soc_data = {
@@ -713,11 +733,11 @@ static const struct intel_padgroup adls_community5_gpps[] = { · 361 unmodified lines
713733 };
714734
715735 static const struct intel_community adls_communities[] = {
716− ADL_COMMUNITY(0, 0, 94, adls_community0_gpps),
717− ADL_COMMUNITY(1, 95, 150, adls_community1_gpps),
718− ADL_COMMUNITY(2, 151, 199, adls_community3_gpps),
719− ADL_COMMUNITY(3, 200, 269, adls_community4_gpps),
720− ADL_COMMUNITY(4, 270, 303, adls_community5_gpps),
736+ ADL_S_COMMUNITY(0, 0, 94, adls_community0_gpps),
737+ ADL_S_COMMUNITY(1, 95, 150, adls_community1_gpps),
738+ ADL_S_COMMUNITY(2, 151, 199, adls_community3_gpps),
739+ ADL_S_COMMUNITY(3, 200, 269, adls_community4_gpps),
740+ ADL_S_COMMUNITY(4, 270, 303, adls_community5_gpps),
721741 };
722742
723743 static const struct intel_pinctrl_soc_data adls_soc_data = {
drivers/pinctrl/mediatek/Kconfig+1−0
@@ -30,6 +30,7 @@ config PINCTRL_MTK_MOORE · 29 unmodified lines
3030 select GENERIC_PINMUX_FUNCTIONS
3131 select GPIOLIB
3232 select OF_GPIO
33+ select EINT_MTK
3334 select PINCTRL_MTK_V2
3435
3536 config PINCTRL_MTK_PARIS
drivers/pinctrl/pinctrl-pistachio.c+3−3
@@ -1374,10 +1374,10 @@ static int pistachio_gpio_register(struct pistachio_pinctrl *pctl) · 1373 unmodified lines
13741374 }
13751375
13761376 irq = irq_of_parse_and_map(child, 0);
1377− if (irq < 0) {
1378− dev_err(pctl->dev, "No IRQ for bank %u: %d\n", i, irq);
1377+ if (!irq) {
1378+ dev_err(pctl->dev, "No IRQ for bank %u\n", i);
13791379 of_node_put(child);
1380− ret = irq;
1380+ ret = -EINVAL;
13811381 goto err;
13821382 }
13831383
drivers/pinctrl/pinctrl-rockchip.c+42−27
@@ -457,95 +457,110 @@ static struct rockchip_mux_recalced_data rk3128_mux_recalced_data[] = { · 456 unmodified lines
457457
458458 static struct rockchip_mux_recalced_data rk3308_mux_recalced_data[] = {
459459 {
460+ /* gpio1b6_sel */
460461 .num = 1,
461462 .pin = 14,
462463 .reg = 0x28,
463464 .bit = 12,
464465 .mask = 0xf
465466 }, {
467+ /* gpio1b7_sel */
466468 .num = 1,
467469 .pin = 15,
468470 .reg = 0x2c,
469471 .bit = 0,
470472 .mask = 0x3
471473 }, {
474+ /* gpio1c2_sel */
472475 .num = 1,
473476 .pin = 18,
474477 .reg = 0x30,
475478 .bit = 4,
476479 .mask = 0xf
477480 }, {
481+ /* gpio1c3_sel */
478482 .num = 1,
479483 .pin = 19,
480484 .reg = 0x30,
481485 .bit = 8,
482486 .mask = 0xf
483487 }, {
488+ /* gpio1c4_sel */
484489 .num = 1,
485490 .pin = 20,
486491 .reg = 0x30,
487492 .bit = 12,
488493 .mask = 0xf
489494 }, {
495+ /* gpio1c5_sel */
490496 .num = 1,
491497 .pin = 21,
492498 .reg = 0x34,
493499 .bit = 0,
494500 .mask = 0xf
495501 }, {
502+ /* gpio1c6_sel */
496503 .num = 1,
497504 .pin = 22,
498505 .reg = 0x34,
499506 .bit = 4,
500507 .mask = 0xf
501508 }, {
509+ /* gpio1c7_sel */
502510 .num = 1,
503511 .pin = 23,
504512 .reg = 0x34,
505513 .bit = 8,
506514 .mask = 0xf
507515 }, {
508− .num = 3,
509− .pin = 12,
510− .reg = 0x68,
511− .bit = 8,
512− .mask = 0xf
513− }, {
514− .num = 3,
515− .pin = 13,
516− .reg = 0x68,
517− .bit = 12,
518− .mask = 0xf
519− }, {
516+ /* gpio2a2_sel */
520517 .num = 2,
521518 .pin = 2,
522− .reg = 0x608,
523− .bit = 0,
524− .mask = 0x7
519+ .reg = 0x40,
520+ .bit = 4,
521+ .mask = 0x3
525522 }, {
523+ /* gpio2a3_sel */
526524 .num = 2,
527525 .pin = 3,
528− .reg = 0x608,
529− .bit = 4,
530− .mask = 0x7
526+ .reg = 0x40,
527+ .bit = 6,
528+ .mask = 0x3
531529 }, {
530+ /* gpio2c0_sel */
532531 .num = 2,
533532 .pin = 16,
534− .reg = 0x610,
535− .bit = 8,
536− .mask = 0x7
533+ .reg = 0x50,
534+ .bit = 0,
535+ .mask = 0x3
537536 }, {
537+ /* gpio3b2_sel */
538538 .num = 3,
539539 .pin = 10,
540− .reg = 0x610,
541− .bit = 0,
542− .mask = 0x7
540+ .reg = 0x68,
541+ .bit = 4,
542+ .mask = 0x3
543543 }, {
544+ /* gpio3b3_sel */
544545 .num = 3,
545546 .pin = 11,
546− .reg = 0x610,
547− .bit = 4,
548− .mask = 0x7
547+ .reg = 0x68,
548+ .bit = 6,
549+ .mask = 0x3
550+ }, {
551+ /* gpio3b4_sel */
552+ .num = 3,
553+ .pin = 12,
554+ .reg = 0x68,
555+ .bit = 8,
556+ .mask = 0xf
557+ }, {
558+ /* gpio3b5_sel */
559+ .num = 3,
560+ .pin = 13,
561+ .reg = 0x68,
562+ .bit = 12,
563+ .mask = 0xf
549564 },
550565 };
551566
drivers/pinctrl/qcom/pinctrl-sm6350.c+8−8
@@ -264,14 +264,14 @@ static const struct pinctrl_pin_desc sm6350_pins[] = { · 263 unmodified lines
264264 PINCTRL_PIN(153, "GPIO_153"),
265265 PINCTRL_PIN(154, "GPIO_154"),
266266 PINCTRL_PIN(155, "GPIO_155"),
267− PINCTRL_PIN(156, "SDC1_RCLK"),
268− PINCTRL_PIN(157, "SDC1_CLK"),
269− PINCTRL_PIN(158, "SDC1_CMD"),
270− PINCTRL_PIN(159, "SDC1_DATA"),
271− PINCTRL_PIN(160, "SDC2_CLK"),
272− PINCTRL_PIN(161, "SDC2_CMD"),
273− PINCTRL_PIN(162, "SDC2_DATA"),
274− PINCTRL_PIN(163, "UFS_RESET"),
267+ PINCTRL_PIN(156, "UFS_RESET"),
268+ PINCTRL_PIN(157, "SDC1_RCLK"),
269+ PINCTRL_PIN(158, "SDC1_CLK"),
270+ PINCTRL_PIN(159, "SDC1_CMD"),
271+ PINCTRL_PIN(160, "SDC1_DATA"),
272+ PINCTRL_PIN(161, "SDC2_CLK"),
273+ PINCTRL_PIN(162, "SDC2_CMD"),
274+ PINCTRL_PIN(163, "SDC2_DATA"),
275275 };
276276
277277 #define DECLARE_MSM_GPIO_PINS(pin) \
drivers/pinctrl/samsung/Kconfig+4−7
@@ -4,14 +4,13 @@ · 3 unmodified lines
44 #
55 config PINCTRL_SAMSUNG
66 bool
7− depends on OF_GPIO
7+ select GPIOLIB
88 select PINMUX
99 select PINCONF
1010
1111 config PINCTRL_EXYNOS
1212 bool "Pinctrl common driver part for Samsung Exynos SoCs"
13− depends on OF_GPIO
14− depends on ARCH_EXYNOS || ARCH_S5PV210 || COMPILE_TEST
13+ depends on ARCH_EXYNOS || ARCH_S5PV210 || (COMPILE_TEST && OF)
1514 select PINCTRL_SAMSUNG
1615 select PINCTRL_EXYNOS_ARM if ARM && (ARCH_EXYNOS || ARCH_S5PV210)
1716 select PINCTRL_EXYNOS_ARM64 if ARM64 && ARCH_EXYNOS
@@ -26,12 +25,10 @@ config PINCTRL_EXYNOS_ARM64 · 8 unmodified lines
2625
2726 config PINCTRL_S3C24XX
2827 bool "Samsung S3C24XX SoC pinctrl driver"
29− depends on OF_GPIO
30− depends on ARCH_S3C24XX || COMPILE_TEST
28+ depends on ARCH_S3C24XX || (COMPILE_TEST && OF)
3129 select PINCTRL_SAMSUNG
3230
3331 config PINCTRL_S3C64XX
3432 bool "Samsung S3C64XX SoC pinctrl driver"
35− depends on OF_GPIO
36− depends on ARCH_S3C64XX || COMPILE_TEST
33+ depends on ARCH_S3C64XX || (COMPILE_TEST && OF)
3734 select PINCTRL_SAMSUNG
drivers/pinctrl/samsung/pinctrl-exynos-arm64.c+1−1
@@ -770,7 +770,7 @@ static const struct samsung_pin_bank_data fsd_pin_banks2[] __initconst = { · 769 unmodified lines
770770 EXYNOS850_PIN_BANK_EINTN(3, 0x00, "gpq0"),
771771 };
772772
773−const struct samsung_pin_ctrl fsd_pin_ctrl[] __initconst = {
773+static const struct samsung_pin_ctrl fsd_pin_ctrl[] __initconst = {
774774 {
775775 /* pin-controller instance 0 FSYS0 data */
776776 .pin_banks = fsd_pin_banks0,
drivers/pinctrl/stm32/pinctrl-stm32.c+21−2
@@ -225,6 +225,13 @@ static void stm32_gpio_free(struct gpio_chip *chip, unsigned offset) · 224 unmodified lines
225225 pinctrl_gpio_free(chip->base + offset);
226226 }
227227
228+static int stm32_gpio_get_noclk(struct gpio_chip *chip, unsigned int offset)
229+{
230+ struct stm32_gpio_bank *bank = gpiochip_get_data(chip);
231+
232+ return !!(readl_relaxed(bank->base + STM32_GPIO_IDR) & BIT(offset));
233+}
234+
228235 static int stm32_gpio_get(struct gpio_chip *chip, unsigned offset)
229236 {
230237 struct stm32_gpio_bank *bank = gpiochip_get_data(chip);
@@ -232,7 +239,7 @@ static int stm32_gpio_get(struct gpio_chip *chip, unsigned offset) · 1 unmodified line
232239
233240 clk_enable(bank->clk);
234241
235− ret = !!(readl_relaxed(bank->base + STM32_GPIO_IDR) & BIT(offset));
242+ ret = stm32_gpio_get_noclk(chip, offset);
236243
237244 clk_disable(bank->clk);
238245
@@ -311,8 +318,12 @@ static void stm32_gpio_irq_trigger(struct irq_data *d) · 72 unmodified lines
311318 struct stm32_gpio_bank *bank = d->domain->host_data;
312319 int level;
313320
321+ /* Do not access the GPIO if this is not LEVEL triggered IRQ. */
322+ if (!(bank->irq_type[d->hwirq] & IRQ_TYPE_LEVEL_MASK))
323+ return;
324+
314325 /* If level interrupt type then retrig */
315− level = stm32_gpio_get(&bank->gpio_chip, d->hwirq);
326+ level = stm32_gpio_get_noclk(&bank->gpio_chip, d->hwirq);
316327 if ((level == 0 && bank->irq_type[d->hwirq] == IRQ_TYPE_LEVEL_LOW) ||
317328 (level == 1 && bank->irq_type[d->hwirq] == IRQ_TYPE_LEVEL_HIGH))
318329 irq_chip_retrigger_hierarchy(d);
@@ -354,6 +365,7 @@ static int stm32_gpio_irq_request_resources(struct irq_data *irq_data) · 35 unmodified lines
354365 {
355366 struct stm32_gpio_bank *bank = irq_data->domain->host_data;
356367 struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent);
368+ unsigned long flags;
357369 int ret;
358370
359371 ret = stm32_gpio_direction_input(&bank->gpio_chip, irq_data->hwirq);
@@ -367,6 +379,10 @@ static int stm32_gpio_irq_request_resources(struct irq_data *irq_data) · 7 unmodified lines
367379 return ret;
368380 }
369381
382+ flags = irqd_get_trigger_type(irq_data);
383+ if (flags & IRQ_TYPE_LEVEL_MASK)
384+ clk_enable(bank->clk);
385+
370386 return 0;
371387 }
372388
@@ -374,6 +390,9 @@ static void stm32_gpio_irq_release_resources(struct irq_data *irq_data) · 1 unmodified line
374390 {
375391 struct stm32_gpio_bank *bank = irq_data->domain->host_data;
376392
393+ if (bank->irq_type[irq_data->hwirq] & IRQ_TYPE_LEVEL_MASK)
394+ clk_disable(bank->clk);
395+
377396 gpiochip_unlock_as_irq(&bank->gpio_chip, irq_data->hwirq);
378397 }
379398
drivers/pinctrl/sunplus/sppctl_sp7021.c+8−0
@@ -419,7 +419,15 @@ static const struct sppctl_grp sp7021grps_prbp[] = { · 418 unmodified lines
419419 EGRP("PROBE_PORT2", 2, pins_prp2),
420420 };
421421
422+/*
423+ * Due to compatible reason, the first valid item should start at the third
424+ * position of the array. Please keep the first two items of the table
425+ * no use (dummy).
426+ */
422427 const struct sppctl_func sppctl_list_funcs[] = {
428+ FNCN("", pinmux_type_fpmx, 0x00, 0, 0),
429+ FNCN("", pinmux_type_fpmx, 0x00, 0, 0),
430+
423431 FNCN("L2SW_CLK_OUT", pinmux_type_fpmx, 0x00, 0, 7),
424432 FNCN("L2SW_MAC_SMI_MDC", pinmux_type_fpmx, 0x00, 8, 7),
425433 FNCN("L2SW_LED_FLASH0", pinmux_type_fpmx, 0x01, 0, 7),
drivers/platform/x86/acerhdf.c+3−18
@@ -584,21 +584,6 @@ static struct platform_driver acerhdf_driver = { · 583 unmodified lines
584584 .remove = acerhdf_remove,
585585 };
586586
587−/* checks if str begins with start */
588−static int str_starts_with(const char *str, const char *start)
589−{
590− unsigned long str_len = 0, start_len = 0;
591−
592− str_len = strlen(str);
593− start_len = strlen(start);
594−
595− if (str_len >= start_len &&
596− !strncmp(str, start, start_len))
597− return 1;
598−
599− return 0;
600−}
601−
602587 /* check hardware */
603588 static int __init acerhdf_check_hardware(void)
604589 {
@@ -651,9 +636,9 @@ static int __init acerhdf_check_hardware(void) · 46 unmodified lines
651636 * check if actual hardware BIOS vendor, product and version
652637 * IDs start with the strings of BIOS table entry
653638 */
654− if (str_starts_with(vendor, bt->vendor) &&
655− str_starts_with(product, bt->product) &&
656− str_starts_with(version, bt->version)) {
639+ if (strstarts(vendor, bt->vendor) &&
640+ strstarts(product, bt->product) &&
641+ strstarts(version, bt->version)) {
657642 found = 1;
658643 break;
659644 }
drivers/platform/x86/amd-pmc.c+13−1
@@ -160,8 +160,10 @@ MODULE_PARM_DESC(enable_stb, "Enable the STB debug mechanism"); · 159 unmodified lines
160160
161161 static struct amd_pmc_dev pmc;
162162 static int amd_pmc_send_cmd(struct amd_pmc_dev *dev, u32 arg, u32 *data, u8 msg, bool ret);
163−static int amd_pmc_write_stb(struct amd_pmc_dev *dev, u32 data);
164163 static int amd_pmc_read_stb(struct amd_pmc_dev *dev, u32 *buf);
164+#ifdef CONFIG_SUSPEND
165+static int amd_pmc_write_stb(struct amd_pmc_dev *dev, u32 data);
166+#endif
165167
166168 static inline u32 amd_pmc_reg_read(struct amd_pmc_dev *dev, int reg_offset)
167169 {
@@ -325,6 +327,7 @@ static int get_metrics_table(struct amd_pmc_dev *pdev, struct smu_metrics *table · 157 unmodified lines
325327 return 0;
326328 }
327329
330+#ifdef CONFIG_SUSPEND
328331 static void amd_pmc_validate_deepest(struct amd_pmc_dev *pdev)
329332 {
330333 struct smu_metrics table;
@@ -338,6 +341,7 @@ static void amd_pmc_validate_deepest(struct amd_pmc_dev *pdev) · 7 unmodified lines
338341 dev_dbg(pdev->dev, "Last suspend in deepest state for %lluus\n",
339342 table.timein_s0i3_lastcapture);
340343 }
344+#endif
341345
342346 #ifdef CONFIG_DEBUG_FS
343347 static int smu_fw_info_show(struct seq_file *s, void *unused)
@@ -569,6 +573,7 @@ out_unlock: · 225 unmodified lines
569573 return rc;
570574 }
571575
576+#ifdef CONFIG_SUSPEND
572577 static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev)
573578 {
574579 switch (dev->cpu_id) {
@@ -694,6 +699,7 @@ static struct acpi_s2idle_dev_ops amd_pmc_s2idle_dev_ops = { · 119 unmodified lines
694699 .prepare = amd_pmc_s2idle_prepare,
695700 .restore = amd_pmc_s2idle_restore,
696701 };
702+#endif
697703
698704 static const struct pci_device_id pmc_pci_ids[] = {
699705 { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_YC) },
@@ -733,6 +739,7 @@ static int amd_pmc_s2d_init(struct amd_pmc_dev *dev) · 33 unmodified lines
733739 return 0;
734740 }
735741
742+#ifdef CONFIG_SUSPEND
736743 static int amd_pmc_write_stb(struct amd_pmc_dev *dev, u32 data)
737744 {
738745 int err;
@@ -753,6 +760,7 @@ static int amd_pmc_write_stb(struct amd_pmc_dev *dev, u32 data) · 14 unmodified lines
753760
754761 return 0;
755762 }
763+#endif
756764
757765 static int amd_pmc_read_stb(struct amd_pmc_dev *dev, u32 *buf)
758766 {
@@ -859,9 +867,11 @@ static int amd_pmc_probe(struct platform_device *pdev) · 100 unmodified lines
859867
860868 amd_pmc_get_smu_version(dev);
861869 platform_set_drvdata(pdev, dev);
870+#ifdef CONFIG_SUSPEND
862871 err = acpi_register_lps0_dev(&amd_pmc_s2idle_dev_ops);
863872 if (err)
864873 dev_warn(dev->dev, "failed to register LPS0 sleep handler, expect increased power consumption\n");
874+#endif
865875
866876 amd_pmc_dbgfs_register(dev);
867877 return 0;
@@ -875,7 +885,9 @@ static int amd_pmc_remove(struct platform_device *pdev) · 7 unmodified lines
875885 {
876886 struct amd_pmc_dev *dev = platform_get_drvdata(pdev);
877887
888+#ifdef CONFIG_SUSPEND
878889 acpi_unregister_lps0_dev(&amd_pmc_s2idle_dev_ops);
890+#endif
879891 amd_pmc_dbgfs_unregister(dev);
880892 pci_dev_put(dev->rdev);
881893 mutex_destroy(&dev->lock);
drivers/platform/x86/asus-wmi.c+10−5
@@ -371,10 +371,14 @@ static int asus_wmi_evaluate_method_buf(u32 method_id, · 370 unmodified lines
371371
372372 switch (obj->type) {
373373 case ACPI_TYPE_BUFFER:
374− if (obj->buffer.length > size)
374+ if (obj->buffer.length > size) {
375375 err = -ENOSPC;
376− if (obj->buffer.length == 0)
376+ break;
377+ }
378+ if (obj->buffer.length == 0) {
377379 err = -ENODATA;
380+ break;
381+ }
378382
379383 memcpy(ret_buffer, obj->buffer.pointer, obj->buffer.length);
380384 break;
@@ -2223,9 +2227,10 @@ static int fan_curve_check_present(struct asus_wmi *asus, bool *available, · 1842 unmodified lines
22232227
22242228 err = fan_curve_get_factory_default(asus, fan_dev);
22252229 if (err) {
2226− if (err == -ENODEV || err == -ENODATA)
2227− return 0;
2228− return err;
2230+ pr_debug("fan_curve_get_factory_default(0x%08x) failed: %d\n",
2231+ fan_dev, err);
2232+ /* Don't cause probe to fail on devices without fan-curves */
2233+ return 0;
22292234 }
22302235
22312236 *available = true;
drivers/platform/x86/barco-p50-gpio.c+0−1
@@ -10,7 +10,6 @@ · 9 unmodified lines
1010
1111 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
1212
13−#include <linux/io.h>
1413 #include <linux/delay.h>
1514 #include <linux/dmi.h>
1615 #include <linux/err.h>
drivers/platform/x86/dell/dell-laptop.c+13−0
@@ -80,6 +80,10 @@ static struct quirk_entry quirk_dell_inspiron_1012 = { · 79 unmodified lines
8080 .kbd_led_not_present = true,
8181 };
8282
83+static struct quirk_entry quirk_dell_latitude_7520 = {
84+ .kbd_missing_ac_tag = true,
85+};
86+
8387 static struct platform_driver platform_driver = {
8488 .driver = {
8589 .name = "dell-laptop",
@@ -336,6 +340,15 @@ static const struct dmi_system_id dell_quirks[] __initconst = { · 250 unmodified lines
336340 },
337341 .driver_data = &quirk_dell_inspiron_1012,
338342 },
343+ {
344+ .callback = dmi_matched,
345+ .ident = "Dell Latitude 7520",
346+ .matches = {
347+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
348+ DMI_MATCH(DMI_PRODUCT_NAME, "Latitude 7520"),
349+ },
350+ .driver_data = &quirk_dell_latitude_7520,
351+ },
339352 { }
340353 };
341354
drivers/platform/x86/gigabyte-wmi.c+1−0
@@ -148,6 +148,7 @@ static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = { · 147 unmodified lines
148148 DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550I AORUS PRO AX"),
149149 DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550M AORUS PRO-P"),
150150 DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550M DS3H"),
151+ DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B660 GAMING X DDR4"),
151152 DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("Z390 I AORUS PRO WIFI-CF"),
152153 DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 AORUS ELITE"),
153154 DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 GAMING X"),
drivers/platform/x86/intel/pmc/core.h+1−1
@@ -236,7 +236,7 @@ enum ppfear_regs { · 235 unmodified lines
236236 #define ADL_LPM_STATUS_LATCH_EN_OFFSET 0x1704
237237 #define ADL_LPM_LIVE_STATUS_OFFSET 0x1764
238238
239−const char *pmc_lpm_modes[] = {
239+static const char *pmc_lpm_modes[] = {
240240 "S0i2.0",
241241 "S0i2.1",
242242 "S0i2.2",
drivers/platform/x86/intel/sdsi.c+30−14
@@ -51,6 +51,8 @@ · 50 unmodified lines
5151 #define MBOX_TIMEOUT_US 2000
5252 #define MBOX_TIMEOUT_ACQUIRE_US 1000
5353 #define MBOX_POLLING_PERIOD_US 100
54+#define MBOX_ACQUIRE_NUM_RETRIES 5
55+#define MBOX_ACQUIRE_RETRY_DELAY_MS 500
5456 #define MBOX_MAX_PACKETS 4
5557
5658 #define MBOX_OWNER_NONE 0x00
@@ -81,7 +83,7 @@ enum sdsi_command { · 24 unmodified lines
8183
8284 struct sdsi_mbox_info {
8385 u64 *payload;
84− u64 *buffer;
86+ void *buffer;
8587 int size;
8688 };
8789
@@ -163,9 +165,7 @@ static int sdsi_mbox_cmd_read(struct sdsi_priv *priv, struct sdsi_mbox_info *inf · 75 unmodified lines
163165 total = 0;
164166 loop = 0;
165167 do {
166− int offset = SDSI_SIZE_MAILBOX * loop;
167− void __iomem *addr = priv->mbox_addr + offset;
168− u64 *buf = info->buffer + offset / SDSI_SIZE_CMD;
168+ void *buf = info->buffer + (SDSI_SIZE_MAILBOX * loop);
169169 u32 packet_size;
170170
171171 /* Poll on ready bit */
@@ -196,7 +196,7 @@ static int sdsi_mbox_cmd_read(struct sdsi_priv *priv, struct sdsi_mbox_info *inf · 24 unmodified lines
196196 break;
197197 }
198198
199− sdsi_memcpy64_fromio(buf, addr, round_up(packet_size, SDSI_SIZE_CMD));
199+ sdsi_memcpy64_fromio(buf, priv->mbox_addr, round_up(packet_size, SDSI_SIZE_CMD));
200200
201201 total += packet_size;
202202
@@ -243,8 +243,8 @@ static int sdsi_mbox_cmd_write(struct sdsi_priv *priv, struct sdsi_mbox_info *in · 40 unmodified lines
243243 FIELD_PREP(CTRL_PACKET_SIZE, info->size);
244244 writeq(control, priv->control_addr);
245245
246− /* Poll on run_busy bit */
247− ret = readq_poll_timeout(priv->control_addr, control, !(control & CTRL_RUN_BUSY),
246+ /* Poll on ready bit */
247+ ret = readq_poll_timeout(priv->control_addr, control, control & CTRL_READY,
248248 MBOX_POLLING_PERIOD_US, MBOX_TIMEOUT_US);
249249
250250 if (ret)
@@ -263,7 +263,7 @@ static int sdsi_mbox_acquire(struct sdsi_priv *priv, struct sdsi_mbox_info *info · 12 unmodified lines
263263 {
264264 u64 control;
265265 u32 owner;
266− int ret;
266+ int ret, retries = 0;
267267
268268 lockdep_assert_held(&priv->mb_lock);
269269
@@ -273,13 +273,29 @@ static int sdsi_mbox_acquire(struct sdsi_priv *priv, struct sdsi_mbox_info *info · 3 unmodified lines
273273 if (owner != MBOX_OWNER_NONE)
274274 return -EBUSY;
275275
276− /* Write first qword of payload */
277− writeq(info->payload[0], priv->mbox_addr);
276+ /*
277+ * If there has been no recent transaction and no one owns the mailbox,
278+ * we should acquire it in under 1ms. However, if we've accessed it
279+ * recently it may take up to 2.1 seconds to acquire it again.
280+ */
281+ do {
282+ /* Write first qword of payload */
283+ writeq(info->payload[0], priv->mbox_addr);
284+
285+ /* Check for ownership */
286+ ret = readq_poll_timeout(priv->control_addr, control,
287+ FIELD_GET(CTRL_OWNER, control) == MBOX_OWNER_INBAND,
288+ MBOX_POLLING_PERIOD_US, MBOX_TIMEOUT_ACQUIRE_US);
289+
290+ if (FIELD_GET(CTRL_OWNER, control) == MBOX_OWNER_NONE &&
291+ retries++ < MBOX_ACQUIRE_NUM_RETRIES) {
292+ msleep(MBOX_ACQUIRE_RETRY_DELAY_MS);
293+ continue;
294+ }
278295
279− /* Check for ownership */
280− ret = readq_poll_timeout(priv->control_addr, control,
281− FIELD_GET(CTRL_OWNER, control) & MBOX_OWNER_INBAND,
282− MBOX_POLLING_PERIOD_US, MBOX_TIMEOUT_ACQUIRE_US);
296+ /* Either we got it or someone else did. */
297+ break;
298+ } while (true);
283299
284300 return ret;
285301 }
drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c+3−0
@@ -212,6 +212,9 @@ static int __init intel_uncore_init(void) · 211 unmodified lines
212212 const struct x86_cpu_id *id;
213213 int ret;
214214
215+ if (cpu_feature_enabled(X86_FEATURE_HYPERVISOR))
216+ return -ENODEV;
217+
215218 id = x86_match_cpu(intel_uncore_cpu_ids);
216219 if (!id)
217220 return -ENODEV;
drivers/platform/x86/samsung-laptop.c+0−2
@@ -1121,8 +1121,6 @@ static void kbd_led_set(struct led_classdev *led_cdev, · 1120 unmodified lines
11211121
11221122 if (value > samsung->kbd_led.max_brightness)
11231123 value = samsung->kbd_led.max_brightness;
1124− else if (value < 0)
1125− value = 0;
11261124
11271125 samsung->kbd_led_wk = value;
11281126 queue_work(samsung->led_workqueue, &samsung->kbd_led_work);
drivers/platform/x86/think-lmi.c+15−29
@@ -740,16 +740,8 @@ static ssize_t certificate_store(struct kobject *kobj, · 739 unmodified lines
740740 if (!tlmi_priv.certificate_support)
741741 return -EOPNOTSUPP;
742742
743− new_cert = kstrdup(buf, GFP_KERNEL);
744− if (!new_cert)
745− return -ENOMEM;
746− /* Strip out CR if one is present */
747− strip_cr(new_cert);
748−
749743 /* If empty then clear installed certificate */
750− if (new_cert[0] == '\0') { /* Clear installed certificate */
751− kfree(new_cert);
752−
744+ if ((buf[0] == '\0') || (buf[0] == '\n')) { /* Clear installed certificate */
753745 /* Check that signature is set */
754746 if (!setting->signature || !setting->signature[0])
755747 return -EACCES;
@@ -763,14 +755,16 @@ static ssize_t certificate_store(struct kobject *kobj, · 7 unmodified lines
763755
764756 ret = tlmi_simple_call(LENOVO_CLEAR_BIOS_CERT_GUID, auth_str);
765757 kfree(auth_str);
766− if (ret)
767− return ret;
768758
769− kfree(setting->certificate);
770− setting->certificate = NULL;
771− return count;
759+ return ret ?: count;
772760 }
773761
762+ new_cert = kstrdup(buf, GFP_KERNEL);
763+ if (!new_cert)
764+ return -ENOMEM;
765+ /* Strip out CR if one is present */
766+ strip_cr(new_cert);
767+
774768 if (setting->cert_installed) {
775769 /* Certificate is installed so this is an update */
776770 if (!setting->signature || !setting->signature[0]) {
@@ -792,21 +786,14 @@ static ssize_t certificate_store(struct kobject *kobj, · 15 unmodified lines
792786 auth_str = kasprintf(GFP_KERNEL, "%s,%s",
793787 new_cert, setting->password);
794788 }
795− if (!auth_str) {
796− kfree(new_cert);
789+ kfree(new_cert);
790+ if (!auth_str)
797791 return -ENOMEM;
798− }
799792
800793 ret = tlmi_simple_call(guid, auth_str);
801794 kfree(auth_str);
802− if (ret) {
803− kfree(new_cert);
804− return ret;
805− }
806795
807− kfree(setting->certificate);
808− setting->certificate = new_cert;
809− return count;
796+ return ret ?: count;
810797 }
811798
812799 static struct kobj_attribute auth_certificate = __ATTR_WO(certificate);
@@ -1194,6 +1181,10 @@ static void tlmi_release_attr(void) · 381 unmodified lines
11941181
11951182 kset_unregister(tlmi_priv.attribute_kset);
11961183
1184+ /* Free up any saved signatures */
1185+ kfree(tlmi_priv.pwd_admin->signature);
1186+ kfree(tlmi_priv.pwd_admin->save_signature);
1187+
11971188 /* Authentication structures */
11981189 sysfs_remove_group(&tlmi_priv.pwd_admin->kobj, &auth_attr_group);
11991190 kobject_put(&tlmi_priv.pwd_admin->kobj);
@@ -1210,11 +1201,6 @@ static void tlmi_release_attr(void) · 10 unmodified lines
12101201 }
12111202
12121203 kset_unregister(tlmi_priv.authentication_kset);
1213−
1214− /* Free up any saved certificates/signatures */
1215− kfree(tlmi_priv.pwd_admin->certificate);
1216− kfree(tlmi_priv.pwd_admin->signature);
1217− kfree(tlmi_priv.pwd_admin->save_signature);
12181204 }
12191205
12201206 static int tlmi_sysfs_init(void)
drivers/platform/x86/think-lmi.h+0−1
@@ -63,7 +63,6 @@ struct tlmi_pwd_setting { · 62 unmodified lines
6363 int index; /*Used for HDD and NVME auth */
6464 enum level_option level;
6565 bool cert_installed;
66− char *certificate;
6766 char *signature;
6867 char *save_signature;
6968 };
drivers/power/supply/power_supply_core.c+6−0
@@ -604,6 +604,12 @@ int power_supply_get_battery_info(struct power_supply *psy, · 603 unmodified lines
604604 err = samsung_sdi_battery_get_info(&psy->dev, value, &info);
605605 if (!err)
606606 goto out_ret_pointer;
607+ else if (err == -ENODEV)
608+ /*
609+ * Device does not have a static battery.
610+ * Proceed to look for a simple battery.
611+ */
612+ err = 0;
607613
608614 if (strcmp("simple-battery", value)) {
609615 err = -ENODEV;
drivers/power/supply/samsung-sdi-battery.c+2−0
@@ -824,6 +824,7 @@ static struct samsung_sdi_battery samsung_sdi_batteries[] = { · 823 unmodified lines
824824 .constant_charge_current_max_ua = 900000,
825825 .constant_charge_voltage_max_uv = 4200000,
826826 .charge_term_current_ua = 200000,
827+ .charge_restart_voltage_uv = 4170000,
827828 .maintenance_charge = samsung_maint_charge_table,
828829 .maintenance_charge_size = ARRAY_SIZE(samsung_maint_charge_table),
829830 .alert_low_temp_charge_current_ua = 300000,
@@ -867,6 +868,7 @@ static struct samsung_sdi_battery samsung_sdi_batteries[] = { · 37 unmodified lines
867868 .constant_charge_current_max_ua = 1500000,
868869 .constant_charge_voltage_max_uv = 4350000,
869870 .charge_term_current_ua = 120000,
871+ .charge_restart_voltage_uv = 4300000,
870872 .maintenance_charge = samsung_maint_charge_table,
871873 .maintenance_charge_size = ARRAY_SIZE(samsung_maint_charge_table),
872874 .alert_low_temp_charge_current_ua = 300000,
drivers/reset/reset-rzg2l-usbphy-ctrl.c+3−1
@@ -121,7 +121,9 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev) · 120 unmodified lines
121121 return dev_err_probe(dev, PTR_ERR(priv->rstc),
122122 "failed to get reset\n");
123123
124− reset_control_deassert(priv->rstc);
124+ error = reset_control_deassert(priv->rstc);
125+ if (error)
126+ return error;
125127
126128 priv->rcdev.ops = &rzg2l_usbphy_ctrl_reset_ops;
127129 priv->rcdev.of_reset_n_cells = 1;
drivers/reset/tegra/reset-bpmp.c+8−1
@@ -20,6 +20,7 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc, · 19 unmodified lines
2020 struct tegra_bpmp *bpmp = to_tegra_bpmp(rstc);
2121 struct mrq_reset_request request;
2222 struct tegra_bpmp_message msg;
23+ int err;
2324
2425 memset(&request, 0, sizeof(request));
2526 request.cmd = command;
@@ -30,7 +31,13 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc, · 4 unmodified lines
3031 msg.tx.data = &request;
3132 msg.tx.size = sizeof(request);
3233
33− return tegra_bpmp_transfer(bpmp, &msg);
34+ err = tegra_bpmp_transfer(bpmp, &msg);
35+ if (err)
36+ return err;
37+ if (msg.rx.ret)
38+ return -EINVAL;
39+
40+ return 0;
3441 }
3542
3643 static int tegra_bpmp_reset_module(struct reset_controller_dev *rstc,
drivers/scsi/bnx2i/bnx2i_hwi.c+1−1
@@ -1977,7 +1977,7 @@ static int bnx2i_process_new_cqes(struct bnx2i_conn *bnx2i_conn) · 1976 unmodified lines
19771977 if (nopin->cq_req_sn != qp->cqe_exp_seq_sn)
19781978 break;
19791979
1980− if (unlikely(test_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx))) {
1980+ if (unlikely(test_bit(ISCSI_CONN_FLAG_SUSPEND_RX, &conn->flags))) {
19811981 if (nopin->op_code == ISCSI_OP_NOOP_IN &&
19821982 nopin->itt == (u16) RESERVED_ITT) {
19831983 printk(KERN_ALERT "bnx2i: Unsolicited "
drivers/scsi/bnx2i/bnx2i_iscsi.c+1−1
@@ -1721,7 +1721,7 @@ static int bnx2i_tear_down_conn(struct bnx2i_hba *hba, · 1720 unmodified lines
17211721 struct iscsi_conn *conn = ep->conn->cls_conn->dd_data;
17221722
17231723 /* Must suspend all rx queue activity for this ep */
1724− set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx);
1724+ set_bit(ISCSI_CONN_FLAG_SUSPEND_RX, &conn->flags);
17251725 }
17261726 /* CONN_DISCONNECT timeout may or may not be an issue depending
17271727 * on what transcribed in TCP layer, different targets behave
drivers/scsi/cxgbi/libcxgbi.c+3−3
@@ -1634,11 +1634,11 @@ void cxgbi_conn_pdu_ready(struct cxgbi_sock *csk) · 1633 unmodified lines
16341634 log_debug(1 << CXGBI_DBG_PDU_RX,
16351635 "csk 0x%p, conn 0x%p.\n", csk, conn);
16361636
1637− if (unlikely(!conn || conn->suspend_rx)) {
1637+ if (unlikely(!conn || test_bit(ISCSI_CONN_FLAG_SUSPEND_RX, &conn->flags))) {
16381638 log_debug(1 << CXGBI_DBG_PDU_RX,
1639− "csk 0x%p, conn 0x%p, id %d, suspend_rx %lu!\n",
1639+ "csk 0x%p, conn 0x%p, id %d, conn flags 0x%lx!\n",
16401640 csk, conn, conn ? conn->id : 0xFF,
1641− conn ? conn->suspend_rx : 0xFF);
1641+ conn ? conn->flags : 0xFF);
16421642 return;
16431643 }
16441644
drivers/scsi/libiscsi.c+16−11
@@ -678,7 +678,8 @@ __iscsi_conn_send_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr, · 677 unmodified lines
678678 struct iscsi_task *task;
679679 itt_t itt;
680680
681− if (session->state == ISCSI_STATE_TERMINATE)
681+ if (session->state == ISCSI_STATE_TERMINATE ||
682+ !test_bit(ISCSI_CONN_FLAG_BOUND, &conn->flags))
682683 return NULL;
683684
684685 if (opcode == ISCSI_OP_LOGIN || opcode == ISCSI_OP_TEXT) {
@@ -1392,8 +1393,8 @@ static bool iscsi_set_conn_failed(struct iscsi_conn *conn) · 707 unmodified lines
13921393 if (conn->stop_stage == 0)
13931394 session->state = ISCSI_STATE_FAILED;
13941395
1395− set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
1396− set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx);
1396+ set_bit(ISCSI_CONN_FLAG_SUSPEND_TX, &conn->flags);
1397+ set_bit(ISCSI_CONN_FLAG_SUSPEND_RX, &conn->flags);
13971398 return true;
13981399 }
13991400
@@ -1454,7 +1455,7 @@ static int iscsi_xmit_task(struct iscsi_conn *conn, struct iscsi_task *task, · 54 unmodified lines
14541455 * Do this after dropping the extra ref because if this was a requeue
14551456 * it's removed from that list and cleanup_queued_task would miss it.
14561457 */
1457− if (test_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx)) {
1458+ if (test_bit(ISCSI_CONN_FLAG_SUSPEND_TX, &conn->flags)) {
14581459 /*
14591460 * Save the task and ref in case we weren't cleaning up this
14601461 * task and get woken up again.
@@ -1532,7 +1533,7 @@ static int iscsi_data_xmit(struct iscsi_conn *conn) · 71 unmodified lines
15321533 int rc = 0;
15331534
15341535 spin_lock_bh(&conn->session->frwd_lock);
1535− if (test_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx)) {
1536+ if (test_bit(ISCSI_CONN_FLAG_SUSPEND_TX, &conn->flags)) {
15361537 ISCSI_DBG_SESSION(conn->session, "Tx suspended!\n");
15371538 spin_unlock_bh(&conn->session->frwd_lock);
15381539 return -ENODATA;
@@ -1746,7 +1747,7 @@ int iscsi_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc) · 207 unmodified lines
17461747 goto fault;
17471748 }
17481749
1749− if (test_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx)) {
1750+ if (test_bit(ISCSI_CONN_FLAG_SUSPEND_TX, &conn->flags)) {
17501751 reason = FAILURE_SESSION_IN_RECOVERY;
17511752 sc->result = DID_REQUEUE << 16;
17521753 goto fault;
@@ -1935,7 +1936,7 @@ static void fail_scsi_tasks(struct iscsi_conn *conn, u64 lun, int error) · 182 unmodified lines
19351936 void iscsi_suspend_queue(struct iscsi_conn *conn)
19361937 {
19371938 spin_lock_bh(&conn->session->frwd_lock);
1938− set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
1939+ set_bit(ISCSI_CONN_FLAG_SUSPEND_TX, &conn->flags);
19391940 spin_unlock_bh(&conn->session->frwd_lock);
19401941 }
19411942 EXPORT_SYMBOL_GPL(iscsi_suspend_queue);
@@ -1953,7 +1954,7 @@ void iscsi_suspend_tx(struct iscsi_conn *conn) · 11 unmodified lines
19531954 struct Scsi_Host *shost = conn->session->host;
19541955 struct iscsi_host *ihost = shost_priv(shost);
19551956
1956− set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
1957+ set_bit(ISCSI_CONN_FLAG_SUSPEND_TX, &conn->flags);
19571958 if (ihost->workq)
19581959 flush_workqueue(ihost->workq);
19591960 }
@@ -1961,7 +1962,7 @@ EXPORT_SYMBOL_GPL(iscsi_suspend_tx); · 1 unmodified line
19611962
19621963 static void iscsi_start_tx(struct iscsi_conn *conn)
19631964 {
1964− clear_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
1965+ clear_bit(ISCSI_CONN_FLAG_SUSPEND_TX, &conn->flags);
19651966 iscsi_conn_queue_work(conn);
19661967 }
19671968
@@ -2214,6 +2215,8 @@ void iscsi_conn_unbind(struct iscsi_cls_conn *cls_conn, bool is_active) · 246 unmodified lines
22142215 iscsi_suspend_tx(conn);
22152216
22162217 spin_lock_bh(&session->frwd_lock);
2218+ clear_bit(ISCSI_CONN_FLAG_BOUND, &conn->flags);
2219+
22172220 if (!is_active) {
22182221 /*
22192222 * if logout timed out before userspace could even send a PDU
@@ -3317,6 +3320,8 @@ int iscsi_conn_bind(struct iscsi_cls_session *cls_session, · 1097 unmodified lines
33173320 spin_lock_bh(&session->frwd_lock);
33183321 if (is_leading)
33193322 session->leadconn = conn;
3323+
3324+ set_bit(ISCSI_CONN_FLAG_BOUND, &conn->flags);
33203325 spin_unlock_bh(&session->frwd_lock);
33213326
33223327 /*
@@ -3329,8 +3334,8 @@ int iscsi_conn_bind(struct iscsi_cls_session *cls_session, · 6 unmodified lines
33293334 /*
33303335 * Unblock xmitworker(), Login Phase will pass through.
33313336 */
3332− clear_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx);
3333− clear_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
3337+ clear_bit(ISCSI_CONN_FLAG_SUSPEND_RX, &conn->flags);
3338+ clear_bit(ISCSI_CONN_FLAG_SUSPEND_TX, &conn->flags);
33343339 return 0;
33353340 }
33363341 EXPORT_SYMBOL_GPL(iscsi_conn_bind);
drivers/scsi/libiscsi_tcp.c+1−1
@@ -927,7 +927,7 @@ int iscsi_tcp_recv_skb(struct iscsi_conn *conn, struct sk_buff *skb, · 926 unmodified lines
927927 */
928928 conn->last_recv = jiffies;
929929
930− if (unlikely(conn->suspend_rx)) {
930+ if (unlikely(test_bit(ISCSI_CONN_FLAG_SUSPEND_RX, &conn->flags))) {
931931 ISCSI_DBG_TCP(conn, "Rx suspended!\n");
932932 *status = ISCSI_TCP_SUSPENDED;
933933 return 0;
drivers/scsi/pm8001/pm80xx_hwi.c+24−9
@@ -766,6 +766,10 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha) · 765 unmodified lines
766766 pm8001_ha->main_cfg_tbl.pm80xx_tbl.pcs_event_log_severity = 0x01;
767767 pm8001_ha->main_cfg_tbl.pm80xx_tbl.fatal_err_interrupt = 0x01;
768768
769+ /* Enable higher IQs and OQs, 32 to 63, bit 16 */
770+ if (pm8001_ha->max_q_num > 32)
771+ pm8001_ha->main_cfg_tbl.pm80xx_tbl.fatal_err_interrupt |=
772+ 1 << 16;
769773 /* Disable end to end CRC checking */
770774 pm8001_ha->main_cfg_tbl.pm80xx_tbl.crc_core_dump = (0x1 << 16);
771775
@@ -1027,6 +1031,13 @@ static int mpi_init_check(struct pm8001_hba_info *pm8001_ha) · 255 unmodified lines
10271031 if (0x0000 != gst_len_mpistate)
10281032 return -EBUSY;
10291033
1034+ /*
1035+ * As per controller datasheet, after successful MPI
1036+ * initialization minimum 500ms delay is required before
1037+ * issuing commands.
1038+ */
1039+ msleep(500);
1040+
10301041 return 0;
10311042 }
10321043
@@ -1727,10 +1738,11 @@ static void · 694 unmodified lines
17271738 pm80xx_chip_interrupt_enable(struct pm8001_hba_info *pm8001_ha, u8 vec)
17281739 {
17291740 #ifdef PM8001_USE_MSIX
1730− u32 mask;
1731− mask = (u32)(1 << vec);
1732−
1733− pm8001_cw32(pm8001_ha, 0, MSGU_ODMR_CLR, (u32)(mask & 0xFFFFFFFF));
1741+ if (vec < 32)
1742+ pm8001_cw32(pm8001_ha, 0, MSGU_ODMR_CLR, 1U << vec);
1743+ else
1744+ pm8001_cw32(pm8001_ha, 0, MSGU_ODMR_CLR_U,
1745+ 1U << (vec - 32));
17341746 return;
17351747 #endif
17361748 pm80xx_chip_intx_interrupt_enable(pm8001_ha);
@@ -1746,12 +1758,15 @@ static void · 9 unmodified lines
17461758 pm80xx_chip_interrupt_disable(struct pm8001_hba_info *pm8001_ha, u8 vec)
17471759 {
17481760 #ifdef PM8001_USE_MSIX
1749− u32 mask;
1750− if (vec == 0xFF)
1751− mask = 0xFFFFFFFF;
1761+ if (vec == 0xFF) {
1762+ /* disable all vectors 0-31, 32-63 */
1763+ pm8001_cw32(pm8001_ha, 0, MSGU_ODMR, 0xFFFFFFFF);
1764+ pm8001_cw32(pm8001_ha, 0, MSGU_ODMR_U, 0xFFFFFFFF);
1765+ } else if (vec < 32)
1766+ pm8001_cw32(pm8001_ha, 0, MSGU_ODMR, 1U << vec);
17521767 else
1753− mask = (u32)(1 << vec);
1754− pm8001_cw32(pm8001_ha, 0, MSGU_ODMR, (u32)(mask & 0xFFFFFFFF));
1768+ pm8001_cw32(pm8001_ha, 0, MSGU_ODMR_U,
1769+ 1U << (vec - 32));
17551770 return;
17561771 #endif
17571772 pm80xx_chip_intx_interrupt_disable(pm8001_ha);
drivers/scsi/qedi/qedi_iscsi.c+34−35
@@ -860,6 +860,37 @@ static int qedi_task_xmit(struct iscsi_task *task) · 859 unmodified lines
860860 return qedi_iscsi_send_ioreq(task);
861861 }
862862
863+static void qedi_offload_work(struct work_struct *work)
864+{
865+ struct qedi_endpoint *qedi_ep =
866+ container_of(work, struct qedi_endpoint, offload_work);
867+ struct qedi_ctx *qedi;
868+ int wait_delay = 5 * HZ;
869+ int ret;
870+
871+ qedi = qedi_ep->qedi;
872+
873+ ret = qedi_iscsi_offload_conn(qedi_ep);
874+ if (ret) {
875+ QEDI_ERR(&qedi->dbg_ctx,
876+ "offload error: iscsi_cid=%u, qedi_ep=%p, ret=%d\n",
877+ qedi_ep->iscsi_cid, qedi_ep, ret);
878+ qedi_ep->state = EP_STATE_OFLDCONN_FAILED;
879+ return;
880+ }
881+
882+ ret = wait_event_interruptible_timeout(qedi_ep->tcp_ofld_wait,
883+ (qedi_ep->state ==
884+ EP_STATE_OFLDCONN_COMPL),
885+ wait_delay);
886+ if (ret <= 0 || qedi_ep->state != EP_STATE_OFLDCONN_COMPL) {
887+ qedi_ep->state = EP_STATE_OFLDCONN_FAILED;
888+ QEDI_ERR(&qedi->dbg_ctx,
889+ "Offload conn TIMEOUT iscsi_cid=%u, qedi_ep=%p\n",
890+ qedi_ep->iscsi_cid, qedi_ep);
891+ }
892+}
893+
863894 static struct iscsi_endpoint *
864895 qedi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
865896 int non_blocking)
@@ -908,6 +939,7 @@ qedi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr, · 42 unmodified lines
908939 }
909940 qedi_ep = ep->dd_data;
910941 memset(qedi_ep, 0, sizeof(struct qedi_endpoint));
942+ INIT_WORK(&qedi_ep->offload_work, qedi_offload_work);
911943 qedi_ep->state = EP_STATE_IDLE;
912944 qedi_ep->iscsi_cid = (u32)-1;
913945 qedi_ep->qedi = qedi;
@@ -1056,12 +1088,11 @@ static void qedi_ep_disconnect(struct iscsi_endpoint *ep) · 142 unmodified lines
10561088 qedi_ep = ep->dd_data;
10571089 qedi = qedi_ep->qedi;
10581090
1091+ flush_work(&qedi_ep->offload_work);
1092+
10591093 if (qedi_ep->state == EP_STATE_OFLDCONN_START)
10601094 goto ep_exit_recover;
10611095
1062− if (qedi_ep->state != EP_STATE_OFLDCONN_NONE)
1063− flush_work(&qedi_ep->offload_work);
1064−
10651096 if (qedi_ep->conn) {
10661097 qedi_conn = qedi_ep->conn;
10671098 abrt_conn = qedi_conn->abrt_conn;
@@ -1235,37 +1266,6 @@ static int qedi_data_avail(struct qedi_ctx *qedi, u16 vlanid) · 167 unmodified lines
12351266 return rc;
12361267 }
12371268
1238−static void qedi_offload_work(struct work_struct *work)
1239−{
1240− struct qedi_endpoint *qedi_ep =
1241− container_of(work, struct qedi_endpoint, offload_work);
1242− struct qedi_ctx *qedi;
1243− int wait_delay = 5 * HZ;
1244− int ret;
1245−
1246− qedi = qedi_ep->qedi;
1247−
1248− ret = qedi_iscsi_offload_conn(qedi_ep);
1249− if (ret) {
1250− QEDI_ERR(&qedi->dbg_ctx,
1251− "offload error: iscsi_cid=%u, qedi_ep=%p, ret=%d\n",
1252− qedi_ep->iscsi_cid, qedi_ep, ret);
1253− qedi_ep->state = EP_STATE_OFLDCONN_FAILED;
1254− return;
1255− }
1256−
1257− ret = wait_event_interruptible_timeout(qedi_ep->tcp_ofld_wait,
1258− (qedi_ep->state ==
1259− EP_STATE_OFLDCONN_COMPL),
1260− wait_delay);
1261− if ((ret <= 0) || (qedi_ep->state != EP_STATE_OFLDCONN_COMPL)) {
1262− qedi_ep->state = EP_STATE_OFLDCONN_FAILED;
1263− QEDI_ERR(&qedi->dbg_ctx,
1264− "Offload conn TIMEOUT iscsi_cid=%u, qedi_ep=%p\n",
1265− qedi_ep->iscsi_cid, qedi_ep);
1266− }
1267−}
1268−
12691269 static int qedi_set_path(struct Scsi_Host *shost, struct iscsi_path *path_data)
12701270 {
12711271 struct qedi_ctx *qedi;
@@ -1381,7 +1381,6 @@ static int qedi_set_path(struct Scsi_Host *shost, struct iscsi_path *path_data) · 109 unmodified lines
13811381 qedi_ep->dst_addr, qedi_ep->dst_port);
13821382 }
13831383
1384− INIT_WORK(&qedi_ep->offload_work, qedi_offload_work);
13851384 queue_work(qedi->offload_thread, &qedi_ep->offload_work);
13861385
13871386 ret = 0;
drivers/scsi/scsi_debug.c+51−146
@@ -32,7 +32,6 @@ · 31 unmodified lines
3232 #include <linux/blkdev.h>
3333 #include <linux/crc-t10dif.h>
3434 #include <linux/spinlock.h>
35−#include <linux/mutex.h>
3635 #include <linux/interrupt.h>
3736 #include <linux/atomic.h>
3837 #include <linux/hrtimer.h>
@@ -732,9 +731,7 @@ static const struct opcode_info_t opcode_info_arr[SDEB_I_LAST_ELEM_P1 + 1] = { · 693 unmodified lines
732731 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} },
733732 };
734733
735−static atomic_t sdebug_num_hosts;
736−static DEFINE_MUTEX(add_host_mutex);
737−
734+static int sdebug_num_hosts;
738735 static int sdebug_add_host = DEF_NUM_HOST; /* in sysfs this is relative */
739736 static int sdebug_ato = DEF_ATO;
740737 static int sdebug_cdb_len = DEF_CDB_LEN;
@@ -781,7 +778,6 @@ static int sdebug_uuid_ctl = DEF_UUID_CTL; · 40 unmodified lines
781778 static bool sdebug_random = DEF_RANDOM;
782779 static bool sdebug_per_host_store = DEF_PER_HOST_STORE;
783780 static bool sdebug_removable = DEF_REMOVABLE;
784−static bool sdebug_deflect_incoming;
785781 static bool sdebug_clustering;
786782 static bool sdebug_host_lock = DEF_HOST_LOCK;
787783 static bool sdebug_strict = DEF_STRICT;
@@ -5122,10 +5118,6 @@ static int scsi_debug_slave_configure(struct scsi_device *sdp) · 4334 unmodified lines
51225118 sdp->host->host_no, sdp->channel, sdp->id, sdp->lun);
51235119 if (sdp->host->max_cmd_len != SDEBUG_MAX_CMD_LEN)
51245120 sdp->host->max_cmd_len = SDEBUG_MAX_CMD_LEN;
5125− if (smp_load_acquire(&sdebug_deflect_incoming)) {
5126− pr_info("Exit early due to deflect_incoming\n");
5127− return 1;
5128− }
51295121 if (devip == NULL) {
51305122 devip = find_build_dev_info(sdp);
51315123 if (devip == NULL)
@@ -5211,7 +5203,7 @@ static bool stop_queued_cmnd(struct scsi_cmnd *cmnd) · 79 unmodified lines
52115203 }
52125204
52135205 /* Deletes (stops) timers or work queues of all queued commands */
5214−static void stop_all_queued(bool done_with_no_conn)
5206+static void stop_all_queued(void)
52155207 {
52165208 unsigned long iflags;
52175209 int j, k;
@@ -5220,15 +5212,13 @@ static void stop_all_queued(bool done_with_no_conn) · 2 unmodified lines
52205212 struct sdebug_queued_cmd *sqcp;
52215213 struct sdebug_dev_info *devip;
52225214 struct sdebug_defer *sd_dp;
5223− struct scsi_cmnd *scp;
52245215
52255216 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) {
52265217 spin_lock_irqsave(&sqp->qc_lock, iflags);
52275218 for (k = 0; k < SDEBUG_CANQUEUE; ++k) {
52285219 if (test_bit(k, sqp->in_use_bm)) {
52295220 sqcp = &sqp->qc_arr[k];
5230− scp = sqcp->a_cmnd;
5231− if (!scp)
5221+ if (sqcp->a_cmnd == NULL)
52325222 continue;
52335223 devip = (struct sdebug_dev_info *)
52345224 sqcp->a_cmnd->device->hostdata;
@@ -5243,10 +5233,6 @@ static void stop_all_queued(bool done_with_no_conn) · 8 unmodified lines
52435233 l_defer_t = SDEB_DEFER_NONE;
52445234 spin_unlock_irqrestore(&sqp->qc_lock, iflags);
52455235 stop_qc_helper(sd_dp, l_defer_t);
5246− if (done_with_no_conn && l_defer_t != SDEB_DEFER_NONE) {
5247− scp->result = DID_NO_CONNECT << 16;
5248− scsi_done(scp);
5249− }
52505236 clear_bit(k, sqp->in_use_bm);
52515237 spin_lock_irqsave(&sqp->qc_lock, iflags);
52525238 }
@@ -5389,7 +5375,7 @@ static int scsi_debug_host_reset(struct scsi_cmnd *SCpnt) · 136 unmodified lines
53895375 }
53905376 }
53915377 spin_unlock(&sdebug_host_list_lock);
5392− stop_all_queued(false);
5378+ stop_all_queued();
53935379 if (SDEBUG_OPT_RESET_NOISE & sdebug_opts)
53945380 sdev_printk(KERN_INFO, SCpnt->device,
53955381 "%s: %d device(s) found\n", __func__, k);
@@ -5449,50 +5435,13 @@ static void sdebug_build_parts(unsigned char *ramp, unsigned long store_size) · 53 unmodified lines
54495435 }
54505436 }
54515437
5452−static void sdeb_block_all_queues(void)
5453−{
5454− int j;
5455− struct sdebug_queue *sqp;
5456−
5457− for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp)
5458− atomic_set(&sqp->blocked, (int)true);
5459−}
5460−
5461−static void sdeb_unblock_all_queues(void)
5438+static void block_unblock_all_queues(bool block)
54625439 {
54635440 int j;
54645441 struct sdebug_queue *sqp;
54655442
54665443 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp)
5467− atomic_set(&sqp->blocked, (int)false);
5468−}
5469−
5470−static void
5471−sdeb_add_n_hosts(int num_hosts)
5472−{
5473− if (num_hosts < 1)
5474− return;
5475− do {
5476− bool found;
5477− unsigned long idx;
5478− struct sdeb_store_info *sip;
5479− bool want_phs = (sdebug_fake_rw == 0) && sdebug_per_host_store;
5480−
5481− found = false;
5482− if (want_phs) {
5483− xa_for_each_marked(per_store_ap, idx, sip, SDEB_XA_NOT_IN_USE) {
5484− sdeb_most_recent_idx = (int)idx;
5485− found = true;
5486− break;
5487− }
5488− if (found) /* re-use case */
5489− sdebug_add_host_helper((int)idx);
5490− else
5491− sdebug_do_add_host(true /* make new store */);
5492− } else {
5493− sdebug_do_add_host(false);
5494− }
5495− } while (--num_hosts);
5444+ atomic_set(&sqp->blocked, (int)block);
54965445 }
54975446
54985447 /* Adjust (by rounding down) the sdebug_cmnd_count so abs(every_nth)-1
@@ -5505,10 +5454,10 @@ static void tweak_cmnd_count(void) · 6 unmodified lines
55055454 modulo = abs(sdebug_every_nth);
55065455 if (modulo < 2)
55075456 return;
5508− sdeb_block_all_queues();
5457+ block_unblock_all_queues(true);
55095458 count = atomic_read(&sdebug_cmnd_count);
55105459 atomic_set(&sdebug_cmnd_count, (count / modulo) * modulo);
5511− sdeb_unblock_all_queues();
5460+ block_unblock_all_queues(false);
55125461 }
55135462
55145463 static void clear_queue_stats(void)
@@ -5526,15 +5475,6 @@ static bool inject_on_this_cmd(void) · 11 unmodified lines
55265475 return (atomic_read(&sdebug_cmnd_count) % abs(sdebug_every_nth)) == 0;
55275476 }
55285477
5529−static int process_deflect_incoming(struct scsi_cmnd *scp)
5530−{
5531− u8 opcode = scp->cmnd[0];
5532−
5533− if (opcode == SYNCHRONIZE_CACHE || opcode == SYNCHRONIZE_CACHE_16)
5534− return 0;
5535− return DID_NO_CONNECT << 16;
5536−}
5537−
55385478 #define INCLUSIVE_TIMING_MAX_NS 1000000 /* 1 millisecond */
55395479
55405480 /* Complete the processing of the thread that queued a SCSI command to this
@@ -5544,7 +5484,8 @@ static int process_deflect_incoming(struct scsi_cmnd *scp) · 3 unmodified lines
55445484 */
55455485 static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip,
55465486 int scsi_result,
5547− int (*pfp)(struct scsi_cmnd *, struct sdebug_dev_info *),
5487+ int (*pfp)(struct scsi_cmnd *,
5488+ struct sdebug_dev_info *),
55485489 int delta_jiff, int ndelay)
55495490 {
55505491 bool new_sd_dp;
@@ -5565,27 +5506,13 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip, · 14 unmodified lines
55655506 }
55665507 sdp = cmnd->device;
55675508
5568− if (delta_jiff == 0) {
5569− sqp = get_queue(cmnd);
5570− if (atomic_read(&sqp->blocked)) {
5571− if (smp_load_acquire(&sdebug_deflect_incoming))
5572− return process_deflect_incoming(cmnd);
5573− else
5574− return SCSI_MLQUEUE_HOST_BUSY;
5575− }
5509+ if (delta_jiff == 0)
55765510 goto respond_in_thread;
5577− }
55785511
55795512 sqp = get_queue(cmnd);
55805513 spin_lock_irqsave(&sqp->qc_lock, iflags);
55815514 if (unlikely(atomic_read(&sqp->blocked))) {
55825515 spin_unlock_irqrestore(&sqp->qc_lock, iflags);
5583− if (smp_load_acquire(&sdebug_deflect_incoming)) {
5584− scsi_result = process_deflect_incoming(cmnd);
5585− goto respond_in_thread;
5586− }
5587− if (sdebug_verbose)
5588− pr_info("blocked --> SCSI_MLQUEUE_HOST_BUSY\n");
55895516 return SCSI_MLQUEUE_HOST_BUSY;
55905517 }
55915518 num_in_q = atomic_read(&devip->num_in_q);
@@ -5774,12 +5701,8 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip, · 182 unmodified lines
57745701 respond_in_thread: /* call back to mid-layer using invocation thread */
57755702 cmnd->result = pfp != NULL ? pfp(cmnd, devip) : 0;
57765703 cmnd->result &= ~SDEG_RES_IMMED_MASK;
5777− if (cmnd->result == 0 && scsi_result != 0) {
5704+ if (cmnd->result == 0 && scsi_result != 0)
57785705 cmnd->result = scsi_result;
5779− if (sdebug_verbose)
5780− pr_info("respond_in_thread: tag=0x%x, scp->result=0x%x\n",
5781− blk_mq_unique_tag(scsi_cmd_to_rq(cmnd)), scsi_result);
5782− }
57835706 scsi_done(cmnd);
57845707 return 0;
57855708 }
@@ -6064,7 +5987,7 @@ static ssize_t delay_store(struct device_driver *ddp, const char *buf, · 278 unmodified lines
60645987 int j, k;
60655988 struct sdebug_queue *sqp;
60665989
6067− sdeb_block_all_queues();
5990+ block_unblock_all_queues(true);
60685991 for (j = 0, sqp = sdebug_q_arr; j < submit_queues;
60695992 ++j, ++sqp) {
60705993 k = find_first_bit(sqp->in_use_bm,
@@ -6078,7 +6001,7 @@ static ssize_t delay_store(struct device_driver *ddp, const char *buf, · 7 unmodified lines
60786001 sdebug_jdelay = jdelay;
60796002 sdebug_ndelay = 0;
60806003 }
6081− sdeb_unblock_all_queues();
6004+ block_unblock_all_queues(false);
60826005 }
60836006 return res;
60846007 }
@@ -6104,7 +6027,7 @@ static ssize_t ndelay_store(struct device_driver *ddp, const char *buf, · 19 unmodified lines
61046027 int j, k;
61056028 struct sdebug_queue *sqp;
61066029
6107− sdeb_block_all_queues();
6030+ block_unblock_all_queues(true);
61086031 for (j = 0, sqp = sdebug_q_arr; j < submit_queues;
61096032 ++j, ++sqp) {
61106033 k = find_first_bit(sqp->in_use_bm,
@@ -6119,7 +6042,7 @@ static ssize_t ndelay_store(struct device_driver *ddp, const char *buf, · 8 unmodified lines
61196042 sdebug_jdelay = ndelay ? JDELAY_OVERRIDDEN
61206043 : DEF_JDELAY;
61216044 }
6122− sdeb_unblock_all_queues();
6045+ block_unblock_all_queues(false);
61236046 }
61246047 return res;
61256048 }
@@ -6433,7 +6356,7 @@ static ssize_t max_queue_store(struct device_driver *ddp, const char *buf, · 307 unmodified lines
64336356 if ((count > 0) && (1 == sscanf(buf, "%d", &n)) && (n > 0) &&
64346357 (n <= SDEBUG_CANQUEUE) &&
64356358 (sdebug_host_max_queue == 0)) {
6436− sdeb_block_all_queues();
6359+ block_unblock_all_queues(true);
64376360 k = 0;
64386361 for (j = 0, sqp = sdebug_q_arr; j < submit_queues;
64396362 ++j, ++sqp) {
@@ -6448,7 +6371,7 @@ static ssize_t max_queue_store(struct device_driver *ddp, const char *buf, · 8 unmodified lines
64486371 atomic_set(&retired_max_queue, k + 1);
64496372 else
64506373 atomic_set(&retired_max_queue, 0);
6451− sdeb_unblock_all_queues();
6374+ block_unblock_all_queues(false);
64526375 return count;
64536376 }
64546377 return -EINVAL;
@@ -6537,48 +6460,43 @@ static DRIVER_ATTR_RW(virtual_gb); · 82 unmodified lines
65376460 static ssize_t add_host_show(struct device_driver *ddp, char *buf)
65386461 {
65396462 /* absolute number of hosts currently active is what is shown */
6540− return scnprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&sdebug_num_hosts));
6463+ return scnprintf(buf, PAGE_SIZE, "%d\n", sdebug_num_hosts);
65416464 }
65426465
6543−/*
6544− * Accept positive and negative values. Hex values (only positive) may be prefixed by '0x'.
6545− * To remove all hosts use a large negative number (e.g. -9999). The value 0 does nothing.
6546− * Returns -EBUSY if another add_host sysfs invocation is active.
6547− */
65486466 static ssize_t add_host_store(struct device_driver *ddp, const char *buf,
65496467 size_t count)
65506468 {
6469+ bool found;
6470+ unsigned long idx;
6471+ struct sdeb_store_info *sip;
6472+ bool want_phs = (sdebug_fake_rw == 0) && sdebug_per_host_store;
65516473 int delta_hosts;
65526474
6553− if (count == 0 || kstrtoint(buf, 0, &delta_hosts))
6475+ if (sscanf(buf, "%d", &delta_hosts) != 1)
65546476 return -EINVAL;
6555− if (sdebug_verbose)
6556− pr_info("prior num_hosts=%d, num_to_add=%d\n",
6557− atomic_read(&sdebug_num_hosts), delta_hosts);
6558− if (delta_hosts == 0)
6559− return count;
6560− if (mutex_trylock(&add_host_mutex) == 0)
6561− return -EBUSY;
65626477 if (delta_hosts > 0) {
6563− sdeb_add_n_hosts(delta_hosts);
6564− } else if (delta_hosts < 0) {
6565− smp_store_release(&sdebug_deflect_incoming, true);
6566− sdeb_block_all_queues();
6567− if (delta_hosts >= atomic_read(&sdebug_num_hosts))
6568− stop_all_queued(true);
65696478 do {
6570− if (atomic_read(&sdebug_num_hosts) < 1) {
6571− free_all_queued();
6572− break;
6479+ found = false;
6480+ if (want_phs) {
6481+ xa_for_each_marked(per_store_ap, idx, sip,
6482+ SDEB_XA_NOT_IN_USE) {
6483+ sdeb_most_recent_idx = (int)idx;
6484+ found = true;
6485+ break;
6486+ }
6487+ if (found) /* re-use case */
6488+ sdebug_add_host_helper((int)idx);
6489+ else
6490+ sdebug_do_add_host(true);
6491+ } else {
6492+ sdebug_do_add_host(false);
65736493 }
6494+ } while (--delta_hosts);
6495+ } else if (delta_hosts < 0) {
6496+ do {
65746497 sdebug_do_remove_host(false);
65756498 } while (++delta_hosts);
6576− sdeb_unblock_all_queues();
6577− smp_store_release(&sdebug_deflect_incoming, false);
65786499 }
6579− mutex_unlock(&add_host_mutex);
6580− if (sdebug_verbose)
6581− pr_info("post num_hosts=%d\n", atomic_read(&sdebug_num_hosts));
65826500 return count;
65836501 }
65846502 static DRIVER_ATTR_RW(add_host);
@@ -7089,10 +7007,6 @@ static int __init scsi_debug_init(void) · 504 unmodified lines
70897007 sdebug_add_host = 0;
70907008
70917009 for (k = 0; k < hosts_to_add; k++) {
7092− if (smp_load_acquire(&sdebug_deflect_incoming)) {
7093− pr_info("exit early as sdebug_deflect_incoming is set\n");
7094− return 0;
7095− }
70967010 if (want_store && k == 0) {
70977011 ret = sdebug_add_host_helper(idx);
70987012 if (ret < 0) {
@@ -7110,12 +7024,8 @@ static int __init scsi_debug_init(void) · 11 unmodified lines
71107024 }
71117025 }
71127026 if (sdebug_verbose)
7113− pr_info("built %d host(s)\n", atomic_read(&sdebug_num_hosts));
7027+ pr_info("built %d host(s)\n", sdebug_num_hosts);
71147028
7115− /*
7116− * Even though all the hosts have been established, due to async device (LU) scanning
7117− * by the scsi mid-level, there may still be devices (LUs) being set up.
7118− */
71197029 return 0;
71207030
71217031 bus_unreg:
@@ -7131,17 +7041,12 @@ free_q_arr: · 9 unmodified lines
71317041
71327042 static void __exit scsi_debug_exit(void)
71337043 {
7134− int k;
7044+ int k = sdebug_num_hosts;
71357045
7136− /* Possible race with LUs still being set up; stop them asap */
7137− sdeb_block_all_queues();
7138− smp_store_release(&sdebug_deflect_incoming, true);
7139− stop_all_queued(false);
7140− for (k = 0; atomic_read(&sdebug_num_hosts) > 0; k++)
7046+ stop_all_queued();
7047+ for (; k; k--)
71417048 sdebug_do_remove_host(true);
71427049 free_all_queued();
7143− if (sdebug_verbose)
7144− pr_info("removed %d hosts\n", k);
71457050 driver_unregister(&sdebug_driverfs_driver);
71467051 bus_unregister(&pseudo_lld_bus);
71477052 root_device_unregister(pseudo_primary);
@@ -7311,13 +7216,13 @@ static int sdebug_add_host_helper(int per_host_idx) · 163 unmodified lines
73117216 sdbg_host->dev.bus = &pseudo_lld_bus;
73127217 sdbg_host->dev.parent = pseudo_primary;
73137218 sdbg_host->dev.release = &sdebug_release_adapter;
7314− dev_set_name(&sdbg_host->dev, "adapter%d", atomic_read(&sdebug_num_hosts));
7219+ dev_set_name(&sdbg_host->dev, "adapter%d", sdebug_num_hosts);
73157220
73167221 error = device_register(&sdbg_host->dev);
73177222 if (error)
73187223 goto clean;
73197224
7320− atomic_inc(&sdebug_num_hosts);
7225+ ++sdebug_num_hosts;
73217226 return 0;
73227227
73237228 clean:
@@ -7381,7 +7286,7 @@ static void sdebug_do_remove_host(bool the_end) · 57 unmodified lines
73817286 return;
73827287
73837288 device_unregister(&sdbg_host->dev);
7384− atomic_dec(&sdebug_num_hosts);
7289+ --sdebug_num_hosts;
73857290 }
73867291
73877292 static int sdebug_change_qdepth(struct scsi_device *sdev, int qdepth)
@@ -7389,10 +7294,10 @@ static int sdebug_change_qdepth(struct scsi_device *sdev, int qdepth) · 1 unmodified line
73897294 int num_in_q = 0;
73907295 struct sdebug_dev_info *devip;
73917296
7392− sdeb_block_all_queues();
7297+ block_unblock_all_queues(true);
73937298 devip = (struct sdebug_dev_info *)sdev->hostdata;
73947299 if (NULL == devip) {
7395− sdeb_unblock_all_queues();
7300+ block_unblock_all_queues(false);
73967301 return -ENODEV;
73977302 }
73987303 num_in_q = atomic_read(&devip->num_in_q);
@@ -7411,7 +7316,7 @@ static int sdebug_change_qdepth(struct scsi_device *sdev, int qdepth) · 12 unmodified lines
74117316 sdev_printk(KERN_INFO, sdev, "%s: qdepth=%d, num_in_q=%d\n",
74127317 __func__, qdepth, num_in_q);
74137318 }
7414− sdeb_unblock_all_queues();
7319+ block_unblock_all_queues(false);
74157320 return sdev->queue_depth;
74167321 }
74177322
drivers/scsi/scsi_transport_iscsi.c+140−99
@@ -86,6 +86,9 @@ struct iscsi_internal { · 85 unmodified lines
8686 struct transport_container session_cont;
8787 };
8888
89+static DEFINE_IDR(iscsi_ep_idr);
90+static DEFINE_MUTEX(iscsi_ep_idr_mutex);
91+
8992 static atomic_t iscsi_session_nr; /* sysfs session id for next new session */
9093
9194 static struct workqueue_struct *iscsi_conn_cleanup_workq;
@@ -168,6 +171,11 @@ struct device_attribute dev_attr_##_prefix##_##_name = \ · 76 unmodified lines
168171 static void iscsi_endpoint_release(struct device *dev)
169172 {
170173 struct iscsi_endpoint *ep = iscsi_dev_to_endpoint(dev);
174+
175+ mutex_lock(&iscsi_ep_idr_mutex);
176+ idr_remove(&iscsi_ep_idr, ep->id);
177+ mutex_unlock(&iscsi_ep_idr_mutex);
178+
171179 kfree(ep);
172180 }
173181
@@ -180,7 +188,7 @@ static ssize_t · 6 unmodified lines
180188 show_ep_handle(struct device *dev, struct device_attribute *attr, char *buf)
181189 {
182190 struct iscsi_endpoint *ep = iscsi_dev_to_endpoint(dev);
183− return sysfs_emit(buf, "%llu\n", (unsigned long long) ep->id);
191+ return sysfs_emit(buf, "%d\n", ep->id);
184192 }
185193 static ISCSI_ATTR(ep, handle, S_IRUGO, show_ep_handle, NULL);
186194
@@ -193,48 +201,32 @@ static struct attribute_group iscsi_endpoint_group = { · 6 unmodified lines
193201 .attrs = iscsi_endpoint_attrs,
194202 };
195203
196−#define ISCSI_MAX_EPID -1
197−
198−static int iscsi_match_epid(struct device *dev, const void *data)
199−{
200− struct iscsi_endpoint *ep = iscsi_dev_to_endpoint(dev);
201− const uint64_t *epid = data;
202−
203− return *epid == ep->id;
204−}
205−
206204 struct iscsi_endpoint *
207205 iscsi_create_endpoint(int dd_size)
208206 {
209− struct device *dev;
210207 struct iscsi_endpoint *ep;
211− uint64_t id;
212− int err;
213−
214− for (id = 1; id < ISCSI_MAX_EPID; id++) {
215− dev = class_find_device(&iscsi_endpoint_class, NULL, &id,
216− iscsi_match_epid);
217− if (!dev)
218− break;
219− else
220− put_device(dev);
221− }
222− if (id == ISCSI_MAX_EPID) {
223− printk(KERN_ERR "Too many connections. Max supported %u\n",
224− ISCSI_MAX_EPID - 1);
225− return NULL;
226− }
208+ int err, id;
227209
228210 ep = kzalloc(sizeof(*ep) + dd_size, GFP_KERNEL);
229211 if (!ep)
230212 return NULL;
231213
214+ mutex_lock(&iscsi_ep_idr_mutex);
215+ id = idr_alloc(&iscsi_ep_idr, ep, 0, -1, GFP_NOIO);
216+ if (id < 0) {
217+ mutex_unlock(&iscsi_ep_idr_mutex);
218+ printk(KERN_ERR "Could not allocate endpoint ID. Error %d.\n",
219+ id);
220+ goto free_ep;
221+ }
222+ mutex_unlock(&iscsi_ep_idr_mutex);
223+
232224 ep->id = id;
233225 ep->dev.class = &iscsi_endpoint_class;
234− dev_set_name(&ep->dev, "ep-%llu", (unsigned long long) id);
226+ dev_set_name(&ep->dev, "ep-%d", id);
235227 err = device_register(&ep->dev);
236228 if (err)
237− goto free_ep;
229+ goto free_id;
238230
239231 err = sysfs_create_group(&ep->dev.kobj, &iscsi_endpoint_group);
240232 if (err)
@@ -248,6 +240,10 @@ unregister_dev: · 7 unmodified lines
248240 device_unregister(&ep->dev);
249241 return NULL;
250242
243+free_id:
244+ mutex_lock(&iscsi_ep_idr_mutex);
245+ idr_remove(&iscsi_ep_idr, id);
246+ mutex_unlock(&iscsi_ep_idr_mutex);
251247 free_ep:
252248 kfree(ep);
253249 return NULL;
@@ -275,14 +271,17 @@ EXPORT_SYMBOL_GPL(iscsi_put_endpoint); · 21 unmodified lines
275271 */
276272 struct iscsi_endpoint *iscsi_lookup_endpoint(u64 handle)
277273 {
278− struct device *dev;
274+ struct iscsi_endpoint *ep;
279275
280− dev = class_find_device(&iscsi_endpoint_class, NULL, &handle,
281− iscsi_match_epid);
282− if (!dev)
283− return NULL;
276+ mutex_lock(&iscsi_ep_idr_mutex);
277+ ep = idr_find(&iscsi_ep_idr, handle);
278+ if (!ep)
279+ goto unlock;
284280
285− return iscsi_dev_to_endpoint(dev);
281+ get_device(&ep->dev);
282+unlock:
283+ mutex_unlock(&iscsi_ep_idr_mutex);
284+ return ep;
286285 }
287286 EXPORT_SYMBOL_GPL(iscsi_lookup_endpoint);
288287
@@ -2202,10 +2201,10 @@ static void iscsi_stop_conn(struct iscsi_cls_conn *conn, int flag) · 1913 unmodified lines
22022201
22032202 switch (flag) {
22042203 case STOP_CONN_RECOVER:
2205− conn->state = ISCSI_CONN_FAILED;
2204+ WRITE_ONCE(conn->state, ISCSI_CONN_FAILED);
22062205 break;
22072206 case STOP_CONN_TERM:
2208− conn->state = ISCSI_CONN_DOWN;
2207+ WRITE_ONCE(conn->state, ISCSI_CONN_DOWN);
22092208 break;
22102209 default:
22112210 iscsi_cls_conn_printk(KERN_ERR, conn, "invalid stop flag %d\n",
@@ -2217,6 +2216,49 @@ static void iscsi_stop_conn(struct iscsi_cls_conn *conn, int flag) · 5 unmodified lines
22172216 ISCSI_DBG_TRANS_CONN(conn, "Stopping conn done.\n");
22182217 }
22192218
2219+static void iscsi_ep_disconnect(struct iscsi_cls_conn *conn, bool is_active)
2220+{
2221+ struct iscsi_cls_session *session = iscsi_conn_to_session(conn);
2222+ struct iscsi_endpoint *ep;
2223+
2224+ ISCSI_DBG_TRANS_CONN(conn, "disconnect ep.\n");
2225+ WRITE_ONCE(conn->state, ISCSI_CONN_FAILED);
2226+
2227+ if (!conn->ep || !session->transport->ep_disconnect)
2228+ return;
2229+
2230+ ep = conn->ep;
2231+ conn->ep = NULL;
2232+
2233+ session->transport->unbind_conn(conn, is_active);
2234+ session->transport->ep_disconnect(ep);
2235+ ISCSI_DBG_TRANS_CONN(conn, "disconnect ep done.\n");
2236+}
2237+
2238+static void iscsi_if_disconnect_bound_ep(struct iscsi_cls_conn *conn,
2239+ struct iscsi_endpoint *ep,
2240+ bool is_active)
2241+{
2242+ /* Check if this was a conn error and the kernel took ownership */
2243+ spin_lock_irq(&conn->lock);
2244+ if (!test_bit(ISCSI_CLS_CONN_BIT_CLEANUP, &conn->flags)) {
2245+ spin_unlock_irq(&conn->lock);
2246+ iscsi_ep_disconnect(conn, is_active);
2247+ } else {
2248+ spin_unlock_irq(&conn->lock);
2249+ ISCSI_DBG_TRANS_CONN(conn, "flush kernel conn cleanup.\n");
2250+ mutex_unlock(&conn->ep_mutex);
2251+
2252+ flush_work(&conn->cleanup_work);
2253+ /*
2254+ * Userspace is now done with the EP so we can release the ref
2255+ * iscsi_cleanup_conn_work_fn took.
2256+ */
2257+ iscsi_put_endpoint(ep);
2258+ mutex_lock(&conn->ep_mutex);
2259+ }
2260+}
2261+
22202262 static int iscsi_if_stop_conn(struct iscsi_transport *transport,
22212263 struct iscsi_uevent *ev)
22222264 {
@@ -2237,12 +2279,25 @@ static int iscsi_if_stop_conn(struct iscsi_transport *transport, · 14 unmodified lines
22372279 cancel_work_sync(&conn->cleanup_work);
22382280 iscsi_stop_conn(conn, flag);
22392281 } else {
2282+ /*
2283+ * For offload, when iscsid is restarted it won't know about
2284+ * existing endpoints so it can't do a ep_disconnect. We clean
2285+ * it up here for userspace.
2286+ */
2287+ mutex_lock(&conn->ep_mutex);
2288+ if (conn->ep)
2289+ iscsi_if_disconnect_bound_ep(conn, conn->ep, true);
2290+ mutex_unlock(&conn->ep_mutex);
2291+
22402292 /*
22412293 * Figure out if it was the kernel or userspace initiating this.
22422294 */
2295+ spin_lock_irq(&conn->lock);
22432296 if (!test_and_set_bit(ISCSI_CLS_CONN_BIT_CLEANUP, &conn->flags)) {
2297+ spin_unlock_irq(&conn->lock);
22442298 iscsi_stop_conn(conn, flag);
22452299 } else {
2300+ spin_unlock_irq(&conn->lock);
22462301 ISCSI_DBG_TRANS_CONN(conn,
22472302 "flush kernel conn cleanup.\n");
22482303 flush_work(&conn->cleanup_work);
@@ -2251,31 +2306,14 @@ static int iscsi_if_stop_conn(struct iscsi_transport *transport, · 2 unmodified lines
22512306 * Only clear for recovery to avoid extra cleanup runs during
22522307 * termination.
22532308 */
2309+ spin_lock_irq(&conn->lock);
22542310 clear_bit(ISCSI_CLS_CONN_BIT_CLEANUP, &conn->flags);
2311+ spin_unlock_irq(&conn->lock);
22552312 }
22562313 ISCSI_DBG_TRANS_CONN(conn, "iscsi if conn stop done.\n");
22572314 return 0;
22582315 }
22592316
2260−static void iscsi_ep_disconnect(struct iscsi_cls_conn *conn, bool is_active)
2261−{
2262− struct iscsi_cls_session *session = iscsi_conn_to_session(conn);
2263− struct iscsi_endpoint *ep;
2264−
2265− ISCSI_DBG_TRANS_CONN(conn, "disconnect ep.\n");
2266− conn->state = ISCSI_CONN_FAILED;
2267−
2268− if (!conn->ep || !session->transport->ep_disconnect)
2269− return;
2270−
2271− ep = conn->ep;
2272− conn->ep = NULL;
2273−
2274− session->transport->unbind_conn(conn, is_active);
2275− session->transport->ep_disconnect(ep);
2276− ISCSI_DBG_TRANS_CONN(conn, "disconnect ep done.\n");
2277−}
2278−
22792317 static void iscsi_cleanup_conn_work_fn(struct work_struct *work)
22802318 {
22812319 struct iscsi_cls_conn *conn = container_of(work, struct iscsi_cls_conn,
@@ -2284,18 +2322,11 @@ static void iscsi_cleanup_conn_work_fn(struct work_struct *work) · 2 unmodified lines
22842322
22852323 mutex_lock(&conn->ep_mutex);
22862324 /*
2287− * If we are not at least bound there is nothing for us to do. Userspace
2288− * will do a ep_disconnect call if offload is used, but will not be
2289− * doing a stop since there is nothing to clean up, so we have to clear
2290− * the cleanup bit here.
2325+ * Get a ref to the ep, so we don't release its ID until after
2326+ * userspace is done referencing it in iscsi_if_disconnect_bound_ep.
22912327 */
2292− if (conn->state != ISCSI_CONN_BOUND && conn->state != ISCSI_CONN_UP) {
2293− ISCSI_DBG_TRANS_CONN(conn, "Got error while conn is already failed. Ignoring.\n");
2294− clear_bit(ISCSI_CLS_CONN_BIT_CLEANUP, &conn->flags);
2295− mutex_unlock(&conn->ep_mutex);
2296− return;
2297− }
2298−
2328+ if (conn->ep)
2329+ get_device(&conn->ep->dev);
22992330 iscsi_ep_disconnect(conn, false);
23002331
23012332 if (system_state != SYSTEM_RUNNING) {
@@ -2340,11 +2371,12 @@ iscsi_alloc_conn(struct iscsi_cls_session *session, int dd_size, uint32_t cid) · 38 unmodified lines
23402371 conn->dd_data = &conn[1];
23412372
23422373 mutex_init(&conn->ep_mutex);
2374+ spin_lock_init(&conn->lock);
23432375 INIT_LIST_HEAD(&conn->conn_list);
23442376 INIT_WORK(&conn->cleanup_work, iscsi_cleanup_conn_work_fn);
23452377 conn->transport = transport;
23462378 conn->cid = cid;
2347− conn->state = ISCSI_CONN_DOWN;
2379+ WRITE_ONCE(conn->state, ISCSI_CONN_DOWN);
23482380
23492381 /* this is released in the dev's release function */
23502382 if (!get_device(&session->dev))
@@ -2542,9 +2574,32 @@ void iscsi_conn_error_event(struct iscsi_cls_conn *conn, enum iscsi_err error) · 191 unmodified lines
25422574 struct iscsi_uevent *ev;
25432575 struct iscsi_internal *priv;
25442576 int len = nlmsg_total_size(sizeof(*ev));
2577+ unsigned long flags;
2578+ int state;
25452579
2546− if (!test_and_set_bit(ISCSI_CLS_CONN_BIT_CLEANUP, &conn->flags))
2547− queue_work(iscsi_conn_cleanup_workq, &conn->cleanup_work);
2580+ spin_lock_irqsave(&conn->lock, flags);
2581+ /*
2582+ * Userspace will only do a stop call if we are at least bound. And, we
2583+ * only need to do the in kernel cleanup if in the UP state so cmds can
2584+ * be released to upper layers. If in other states just wait for
2585+ * userspace to avoid races that can leave the cleanup_work queued.
2586+ */
2587+ state = READ_ONCE(conn->state);
2588+ switch (state) {
2589+ case ISCSI_CONN_BOUND:
2590+ case ISCSI_CONN_UP:
2591+ if (!test_and_set_bit(ISCSI_CLS_CONN_BIT_CLEANUP,
2592+ &conn->flags)) {
2593+ queue_work(iscsi_conn_cleanup_workq,
2594+ &conn->cleanup_work);
2595+ }
2596+ break;
2597+ default:
2598+ ISCSI_DBG_TRANS_CONN(conn, "Got conn error in state %d\n",
2599+ state);
2600+ break;
2601+ }
2602+ spin_unlock_irqrestore(&conn->lock, flags);
25482603
25492604 priv = iscsi_if_transport_lookup(conn->transport);
25502605 if (!priv)
@@ -2894,7 +2949,7 @@ iscsi_set_param(struct iscsi_transport *transport, struct iscsi_uevent *ev) · 343 unmodified lines
28942949 char *data = (char*)ev + sizeof(*ev);
28952950 struct iscsi_cls_conn *conn;
28962951 struct iscsi_cls_session *session;
2897− int err = 0, value = 0;
2952+ int err = 0, value = 0, state;
28982953
28992954 if (ev->u.set_param.len > PAGE_SIZE)
29002955 return -EINVAL;
@@ -2911,8 +2966,8 @@ iscsi_set_param(struct iscsi_transport *transport, struct iscsi_uevent *ev) · 10 unmodified lines
29112966 session->recovery_tmo = value;
29122967 break;
29132968 default:
2914− if ((conn->state == ISCSI_CONN_BOUND) ||
2915− (conn->state == ISCSI_CONN_UP)) {
2969+ state = READ_ONCE(conn->state);
2970+ if (state == ISCSI_CONN_BOUND || state == ISCSI_CONN_UP) {
29162971 err = transport->set_param(conn, ev->u.set_param.param,
29172972 data, ev->u.set_param.len);
29182973 } else {
@@ -2984,16 +3039,7 @@ static int iscsi_if_ep_disconnect(struct iscsi_transport *transport, · 65 unmodified lines
29843039 }
29853040
29863041 mutex_lock(&conn->ep_mutex);
2987− /* Check if this was a conn error and the kernel took ownership */
2988− if (test_bit(ISCSI_CLS_CONN_BIT_CLEANUP, &conn->flags)) {
2989− ISCSI_DBG_TRANS_CONN(conn, "flush kernel conn cleanup.\n");
2990− mutex_unlock(&conn->ep_mutex);
2991−
2992− flush_work(&conn->cleanup_work);
2993− goto put_ep;
2994− }
2995−
2996− iscsi_ep_disconnect(conn, false);
3042+ iscsi_if_disconnect_bound_ep(conn, ep, false);
29973043 mutex_unlock(&conn->ep_mutex);
29983044 put_ep:
29993045 iscsi_put_endpoint(ep);
@@ -3696,24 +3742,17 @@ static int iscsi_if_transport_conn(struct iscsi_transport *transport, · 696 unmodified lines
36963742 return -EINVAL;
36973743
36983744 mutex_lock(&conn->ep_mutex);
3745+ spin_lock_irq(&conn->lock);
36993746 if (test_bit(ISCSI_CLS_CONN_BIT_CLEANUP, &conn->flags)) {
3747+ spin_unlock_irq(&conn->lock);
37003748 mutex_unlock(&conn->ep_mutex);
37013749 ev->r.retcode = -ENOTCONN;
37023750 return 0;
37033751 }
3752+ spin_unlock_irq(&conn->lock);
37043753
37053754 switch (nlh->nlmsg_type) {
37063755 case ISCSI_UEVENT_BIND_CONN:
3707− if (conn->ep) {
3708− /*
3709− * For offload boot support where iscsid is restarted
3710− * during the pivot root stage, the ep will be intact
3711− * here when the new iscsid instance starts up and
3712− * reconnects.
3713− */
3714− iscsi_ep_disconnect(conn, true);
3715− }
3716−
37173756 session = iscsi_session_lookup(ev->u.b_conn.sid);
37183757 if (!session) {
37193758 err = -EINVAL;
@@ -3724,7 +3763,7 @@ static int iscsi_if_transport_conn(struct iscsi_transport *transport, · 4 unmodified lines
37243763 ev->u.b_conn.transport_eph,
37253764 ev->u.b_conn.is_leading);
37263765 if (!ev->r.retcode)
3727− conn->state = ISCSI_CONN_BOUND;
3766+ WRITE_ONCE(conn->state, ISCSI_CONN_BOUND);
37283767
37293768 if (ev->r.retcode || !transport->ep_connect)
37303769 break;
@@ -3743,7 +3782,8 @@ static int iscsi_if_transport_conn(struct iscsi_transport *transport, · 12 unmodified lines
37433782 case ISCSI_UEVENT_START_CONN:
37443783 ev->r.retcode = transport->start_conn(conn);
37453784 if (!ev->r.retcode)
3746− conn->state = ISCSI_CONN_UP;
3785+ WRITE_ONCE(conn->state, ISCSI_CONN_UP);
3786+
37473787 break;
37483788 case ISCSI_UEVENT_SEND_PDU:
37493789 pdu_len = nlh->nlmsg_len - sizeof(*nlh) - sizeof(*ev);
@@ -4050,10 +4090,11 @@ static ssize_t show_conn_state(struct device *dev, · 300 unmodified lines
40504090 {
40514091 struct iscsi_cls_conn *conn = iscsi_dev_to_conn(dev->parent);
40524092 const char *state = "unknown";
4093+ int conn_state = READ_ONCE(conn->state);
40534094
4054− if (conn->state >= 0 &&
4055− conn->state < ARRAY_SIZE(connection_state_names))
4056− state = connection_state_names[conn->state];
4095+ if (conn_state >= 0 &&
4096+ conn_state < ARRAY_SIZE(connection_state_names))
4097+ state = connection_state_names[conn_state];
40574098
40584099 return sysfs_emit(buf, "%s\n", state);
40594100 }
drivers/scsi/sr_ioctl.c+12−3
@@ -41,7 +41,7 @@ static int sr_read_tochdr(struct cdrom_device_info *cdi, · 40 unmodified lines
4141 int result;
4242 unsigned char *buffer;
4343
44− buffer = kmalloc(32, GFP_KERNEL);
44+ buffer = kzalloc(32, GFP_KERNEL);
4545 if (!buffer)
4646 return -ENOMEM;
4747
@@ -55,10 +55,13 @@ static int sr_read_tochdr(struct cdrom_device_info *cdi, · 7 unmodified lines
5555 cgc.data_direction = DMA_FROM_DEVICE;
5656
5757 result = sr_do_ioctl(cd, &cgc);
58+ if (result)
59+ goto err;
5860
5961 tochdr->cdth_trk0 = buffer[2];
6062 tochdr->cdth_trk1 = buffer[3];
6163
64+err:
6265 kfree(buffer);
6366 return result;
6467 }
@@ -71,7 +74,7 @@ static int sr_read_tocentry(struct cdrom_device_info *cdi, · 6 unmodified lines
7174 int result;
7275 unsigned char *buffer;
7376
74− buffer = kmalloc(32, GFP_KERNEL);
77+ buffer = kzalloc(32, GFP_KERNEL);
7578 if (!buffer)
7679 return -ENOMEM;
7780
@@ -86,6 +89,8 @@ static int sr_read_tocentry(struct cdrom_device_info *cdi, · 8 unmodified lines
8689 cgc.data_direction = DMA_FROM_DEVICE;
8790
8891 result = sr_do_ioctl(cd, &cgc);
92+ if (result)
93+ goto err;
8994
9095 tocentry->cdte_ctrl = buffer[5] & 0xf;
9196 tocentry->cdte_adr = buffer[5] >> 4;
@@ -98,6 +103,7 @@ static int sr_read_tocentry(struct cdrom_device_info *cdi, · 6 unmodified lines
98103 tocentry->cdte_addr.lba = (((((buffer[8] << 8) + buffer[9]) << 8)
99104 + buffer[10]) << 8) + buffer[11];
100105
106+err:
101107 kfree(buffer);
102108 return result;
103109 }
@@ -384,7 +390,7 @@ int sr_get_mcn(struct cdrom_device_info *cdi, struct cdrom_mcn *mcn) · 280 unmodified lines
384390 {
385391 Scsi_CD *cd = cdi->handle;
386392 struct packet_command cgc;
387− char *buffer = kmalloc(32, GFP_KERNEL);
393+ char *buffer = kzalloc(32, GFP_KERNEL);
388394 int result;
389395
390396 if (!buffer)
@@ -400,10 +406,13 @@ int sr_get_mcn(struct cdrom_device_info *cdi, struct cdrom_mcn *mcn) · 9 unmodified lines
400406 cgc.data_direction = DMA_FROM_DEVICE;
401407 cgc.timeout = IOCTL_TIMEOUT;
402408 result = sr_do_ioctl(cd, &cgc);
409+ if (result)
410+ goto err;
403411
404412 memcpy(mcn->medium_catalog_number, buffer + 9, 13);
405413 mcn->medium_catalog_number[13] = 0;
406414
415+err:
407416 kfree(buffer);
408417 return result;
409418 }
drivers/soc/imx/imx8m-blk-ctrl.c+1−1
@@ -50,7 +50,7 @@ struct imx8m_blk_ctrl_domain_data { · 49 unmodified lines
5050 u32 mipi_phy_rst_mask;
5151 };
5252
53−#define DOMAIN_MAX_CLKS 3
53+#define DOMAIN_MAX_CLKS 4
5454
5555 struct imx8m_blk_ctrl_domain {
5656 struct generic_pm_domain genpd;
drivers/spi/atmel-quadspi.c+3−0
@@ -277,6 +277,9 @@ static int atmel_qspi_find_mode(const struct spi_mem_op *op) · 276 unmodified lines
277277 static bool atmel_qspi_supports_op(struct spi_mem *mem,
278278 const struct spi_mem_op *op)
279279 {
280+ if (!spi_mem_default_supports_op(mem, op))
281+ return false;
282+
280283 if (atmel_qspi_find_mode(op) < 0)
281284 return false;
282285
drivers/spi/spi-cadence-quadspi.c+17−2
@@ -1415,9 +1415,24 @@ static bool cqspi_supports_mem_op(struct spi_mem *mem, · 1414 unmodified lines
14151415 all_false = !op->cmd.dtr && !op->addr.dtr && !op->dummy.dtr &&
14161416 !op->data.dtr;
14171417
1418− /* Mixed DTR modes not supported. */
1419− if (!(all_true || all_false))
1418+ if (all_true) {
1419+ /* Right now we only support 8-8-8 DTR mode. */
1420+ if (op->cmd.nbytes && op->cmd.buswidth != 8)
1421+ return false;
1422+ if (op->addr.nbytes && op->addr.buswidth != 8)
1423+ return false;
1424+ if (op->data.nbytes && op->data.buswidth != 8)
1425+ return false;
1426+ } else if (all_false) {
1427+ /* Only 1-1-X ops are supported without DTR */
1428+ if (op->cmd.nbytes && op->cmd.buswidth > 1)
1429+ return false;
1430+ if (op->addr.nbytes && op->addr.buswidth > 1)
1431+ return false;
1432+ } else {
1433+ /* Mixed DTR modes are not supported. */
14201434 return false;
1435+ }
14211436
14221437 return spi_mem_default_supports_op(mem, op);
14231438 }
drivers/spi/spi-intel-pci.c+1−0
@@ -72,6 +72,7 @@ static const struct pci_device_id intel_spi_pci_ids[] = { · 71 unmodified lines
7272 { PCI_VDEVICE(INTEL, 0x4da4), (unsigned long)&bxt_info },
7373 { PCI_VDEVICE(INTEL, 0x51a4), (unsigned long)&cnl_info },
7474 { PCI_VDEVICE(INTEL, 0x54a4), (unsigned long)&cnl_info },
75+ { PCI_VDEVICE(INTEL, 0x7a24), (unsigned long)&cnl_info },
7576 { PCI_VDEVICE(INTEL, 0x7aa4), (unsigned long)&cnl_info },
7677 { PCI_VDEVICE(INTEL, 0xa0a4), (unsigned long)&bxt_info },
7778 { PCI_VDEVICE(INTEL, 0xa1a4), (unsigned long)&bxt_info },
drivers/spi/spi-mtk-nor.c+11−1
@@ -960,7 +960,17 @@ static int __maybe_unused mtk_nor_suspend(struct device *dev) · 959 unmodified lines
960960
961961 static int __maybe_unused mtk_nor_resume(struct device *dev)
962962 {
963− return pm_runtime_force_resume(dev);
963+ struct spi_controller *ctlr = dev_get_drvdata(dev);
964+ struct mtk_nor *sp = spi_controller_get_devdata(ctlr);
965+ int ret;
966+
967+ ret = pm_runtime_force_resume(dev);
968+ if (ret)
969+ return ret;
970+
971+ mtk_nor_init(sp);
972+
973+ return 0;
964974 }
965975
966976 static const struct dev_pm_ops mtk_nor_pm_ops = {
drivers/target/target_core_pscsi.c+5−5
@@ -588,7 +588,7 @@ static void pscsi_destroy_device(struct se_device *dev) · 587 unmodified lines
588588 }
589589
590590 static void pscsi_complete_cmd(struct se_cmd *cmd, u8 scsi_status,
591− unsigned char *req_sense)
591+ unsigned char *req_sense, int valid_data)
592592 {
593593 struct pscsi_dev_virt *pdv = PSCSI_DEV(cmd->se_dev);
594594 struct scsi_device *sd = pdv->pdv_sd;
@@ -681,7 +681,7 @@ after_mode_select: · 86 unmodified lines
681681 * back despite framework assumption that a
682682 * check condition means there is no data
683683 */
684− if (sd->type == TYPE_TAPE &&
684+ if (sd->type == TYPE_TAPE && valid_data &&
685685 cmd->data_direction == DMA_FROM_DEVICE) {
686686 /*
687687 * is sense data valid, fixed format,
@@ -1032,6 +1032,7 @@ static void pscsi_req_done(struct request *req, blk_status_t status) · 344 unmodified lines
10321032 struct se_cmd *cmd = req->end_io_data;
10331033 struct scsi_cmnd *scmd = blk_mq_rq_to_pdu(req);
10341034 enum sam_status scsi_status = scmd->result & 0xff;
1035+ int valid_data = cmd->data_length - scmd->resid_len;
10351036 u8 *cdb = cmd->priv;
10361037
10371038 if (scsi_status != SAM_STAT_GOOD) {
@@ -1039,12 +1040,11 @@ static void pscsi_req_done(struct request *req, blk_status_t status) · 1 unmodified line
10391040 " 0x%02x Result: 0x%08x\n", cmd, cdb[0], scmd->result);
10401041 }
10411042
1042− pscsi_complete_cmd(cmd, scsi_status, scmd->sense_buffer);
1043+ pscsi_complete_cmd(cmd, scsi_status, scmd->sense_buffer, valid_data);
10431044
10441045 switch (host_byte(scmd->result)) {
10451046 case DID_OK:
1046− target_complete_cmd_with_length(cmd, scsi_status,
1047− cmd->data_length - scmd->resid_len);
1047+ target_complete_cmd_with_length(cmd, scsi_status, valid_data);
10481048 break;
10491049 default:
10501050 pr_debug("PSCSI Host Byte exception at cmd: %p CDB:"
drivers/tee/optee/ffa_abi.c+1−0
@@ -865,6 +865,7 @@ err_rhashtable_free: · 864 unmodified lines
865865 rhashtable_free_and_destroy(&optee->ffa.global_ids, rh_free_fn, NULL);
866866 optee_supp_uninit(&optee->supp);
867867 mutex_destroy(&optee->call_queue.mutex);
868+ mutex_destroy(&optee->ffa.mutex);
868869 err_unreg_supp_teedev:
869870 tee_device_unregister(optee->supp_teedev);
870871 err_unreg_teedev:
drivers/thermal/Kconfig+4−2
@@ -113,8 +113,10 @@ config THERMAL_DEFAULT_GOV_USER_SPACE · 112 unmodified lines
113113 bool "user_space"
114114 select THERMAL_GOV_USER_SPACE
115115 help
116− Select this if you want to let the user space manage the
117− platform thermals.
116+ The Userspace governor allows to get trip point crossed
117+ notification from the kernel via uevents. It is recommended
118+ to use the netlink interface instead which gives richer
119+ information about the thermal framework events.
118120
119121 config THERMAL_DEFAULT_GOV_POWER_ALLOCATOR
120122 bool "power_allocator"
drivers/thermal/gov_user_space.c+1−2
@@ -17,8 +17,7 @@ · 16 unmodified lines
1717
1818 static int user_space_bind(struct thermal_zone_device *tz)
1919 {
20− pr_warn_once("Userspace governor deprecated: use thermal netlink " \
21− "notification instead\n");
20+ pr_info_once("Consider using thermal netlink events interface\n");
2221
2322 return 0;
2423 }
drivers/thermal/intel/int340x_thermal/int3400_thermal.c+2−2
@@ -68,7 +68,7 @@ static int evaluate_odvp(struct int3400_thermal_priv *priv); · 67 unmodified lines
6868 struct odvp_attr {
6969 int odvp;
7070 struct int3400_thermal_priv *priv;
71− struct kobj_attribute attr;
71+ struct device_attribute attr;
7272 };
7373
7474 static ssize_t data_vault_read(struct file *file, struct kobject *kobj,
@@ -311,7 +311,7 @@ end: · 236 unmodified lines
311311 return result;
312312 }
313313
314−static ssize_t odvp_show(struct kobject *kobj, struct kobj_attribute *attr,
314+static ssize_t odvp_show(struct device *dev, struct device_attribute *attr,
315315 char *buf)
316316 {
317317 struct odvp_attr *odvp_attr;
drivers/thermal/thermal_sysfs.c+0−3
@@ -610,9 +610,6 @@ cur_state_store(struct device *dev, struct device_attribute *attr, · 609 unmodified lines
610610 unsigned long state;
611611 int result;
612612
613− dev_warn_once(&cdev->device,
614− "Setting cooling device state is deprecated\n");
615−
616613 if (sscanf(buf, "%ld\n", &state) != 1)
617614 return -EINVAL;
618615
drivers/tty/n_gsm.c+276−201
@@ -73,6 +73,8 @@ module_param(debug, int, 0600); · 72 unmodified lines
7373 */
7474 #define MAX_MRU 1500
7575 #define MAX_MTU 1500
76+/* SOF, ADDR, CTRL, LEN1, LEN2, ..., FCS, EOF */
77+#define PROT_OVERHEAD 7
7678 #define GSM_NET_TX_TIMEOUT (HZ*10)
7779
7880 /*
@@ -219,7 +221,6 @@ struct gsm_mux { · 140 unmodified lines
219221 int encoding;
220222 u8 control;
221223 u8 fcs;
222− u8 received_fcs;
223224 u8 *txframe; /* TX framing buffer */
224225
225226 /* Method for the receiver side */
@@ -231,6 +232,7 @@ struct gsm_mux { · 5 unmodified lines
231232 int initiator; /* Did we initiate connection */
232233 bool dead; /* Has the mux been shut down */
233234 struct gsm_dlci *dlci[NUM_DLCI];
235+ int old_c_iflag; /* termios c_iflag value before attach */
234236 bool constipated; /* Asked by remote to shut up */
235237
236238 spinlock_t tx_lock;
@@ -271,10 +273,6 @@ static DEFINE_SPINLOCK(gsm_mux_lock); · 34 unmodified lines
271273
272274 static struct tty_driver *gsm_tty_driver;
273275
274−/* Save dlci open address */
275−static int addr_open[256] = { 0 };
276−/* Save dlci open count */
277−static int addr_cnt;
278276 /*
279277 * This section of the driver logic implements the GSM encodings
280278 * both the basic and the 'advanced'. Reliable transport is not
@@ -369,6 +367,7 @@ static const u8 gsm_fcs8[256] = { · 88 unmodified lines
369367 #define GOOD_FCS 0xCF
370368
371369 static int gsmld_output(struct gsm_mux *gsm, u8 *data, int len);
370+static int gsm_modem_update(struct gsm_dlci *dlci, u8 brk);
372371
373372 /**
374373 * gsm_fcs_add - update FCS
@@ -832,7 +831,7 @@ static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci) · 457 unmodified lines
832831 break;
833832 case 2: /* Unstructed with modem bits.
834833 Always one byte as we never send inline break data */
835− *dp++ = gsm_encode_modem(dlci);
834+ *dp++ = (gsm_encode_modem(dlci) << 1) | EA;
836835 break;
837836 }
838837 WARN_ON(kfifo_out_locked(&dlci->fifo, dp , len, &dlci->lock) != len);
@@ -916,6 +915,66 @@ static int gsm_dlci_data_output_framed(struct gsm_mux *gsm, · 77 unmodified lines
916915 return size;
917916 }
918917
918+/**
919+ * gsm_dlci_modem_output - try and push modem status out of a DLCI
920+ * @gsm: mux
921+ * @dlci: the DLCI to pull modem status from
922+ * @brk: break signal
923+ *
924+ * Push an empty frame in to the transmit queue to update the modem status
925+ * bits and to transmit an optional break.
926+ *
927+ * Caller must hold the tx_lock of the mux.
928+ */
929+
930+static int gsm_dlci_modem_output(struct gsm_mux *gsm, struct gsm_dlci *dlci,
931+ u8 brk)
932+{
933+ u8 *dp = NULL;
934+ struct gsm_msg *msg;
935+ int size = 0;
936+
937+ /* for modem bits without break data */
938+ switch (dlci->adaption) {
939+ case 1: /* Unstructured */
940+ break;
941+ case 2: /* Unstructured with modem bits. */
942+ size++;
943+ if (brk > 0)
944+ size++;
945+ break;
946+ default:
947+ pr_err("%s: unsupported adaption %d\n", __func__,
948+ dlci->adaption);
949+ return -EINVAL;
950+ }
951+
952+ msg = gsm_data_alloc(gsm, dlci->addr, size, gsm->ftype);
953+ if (!msg) {
954+ pr_err("%s: gsm_data_alloc error", __func__);
955+ return -ENOMEM;
956+ }
957+ dp = msg->data;
958+ switch (dlci->adaption) {
959+ case 1: /* Unstructured */
960+ break;
961+ case 2: /* Unstructured with modem bits. */
962+ if (brk == 0) {
963+ *dp++ = (gsm_encode_modem(dlci) << 1) | EA;
964+ } else {
965+ *dp++ = gsm_encode_modem(dlci) << 1;
966+ *dp++ = (brk << 4) | 2 | EA; /* Length, Break, EA */
967+ }
968+ break;
969+ default:
970+ /* Handled above */
971+ break;
972+ }
973+
974+ __gsm_data_queue(dlci, msg);
975+ return size;
976+}
977+
919978 /**
920979 * gsm_dlci_data_sweep - look for data to send
921980 * @gsm: the GSM mux
@@ -1093,7 +1152,6 @@ static void gsm_control_modem(struct gsm_mux *gsm, const u8 *data, int clen) · 171 unmodified lines
10931152 {
10941153 unsigned int addr = 0;
10951154 unsigned int modem = 0;
1096− unsigned int brk = 0;
10971155 struct gsm_dlci *dlci;
10981156 int len = clen;
10991157 int slen;
@@ -1123,17 +1181,8 @@ static void gsm_control_modem(struct gsm_mux *gsm, const u8 *data, int clen) · 23 unmodified lines
11231181 return;
11241182 }
11251183 len--;
1126− if (len > 0) {
1127− while (gsm_read_ea(&brk, *dp++) == 0) {
1128− len--;
1129− if (len == 0)
1130− return;
1131− }
1132− modem <<= 7;
1133− modem |= (brk & 0x7f);
1134− }
11351184 tty = tty_port_tty_get(&dlci->port);
1136− gsm_process_modem(tty, dlci, modem, slen);
1185+ gsm_process_modem(tty, dlci, modem, slen - len);
11371186 if (tty) {
11381187 tty_wakeup(tty);
11391188 tty_kref_put(tty);
@@ -1193,7 +1242,6 @@ static void gsm_control_rls(struct gsm_mux *gsm, const u8 *data, int clen) · 53 unmodified lines
11931242 }
11941243
11951244 static void gsm_dlci_begin_close(struct gsm_dlci *dlci);
1196−static void gsm_dlci_close(struct gsm_dlci *dlci);
11971245
11981246 /**
11991247 * gsm_control_message - DLCI 0 control processing
@@ -1212,28 +1260,15 @@ static void gsm_control_message(struct gsm_mux *gsm, unsigned int command, · 12 unmodified lines
12121260 {
12131261 u8 buf[1];
12141262 unsigned long flags;
1215− struct gsm_dlci *dlci;
1216− int i;
1217− int address;
12181263
12191264 switch (command) {
12201265 case CMD_CLD: {
1221− if (addr_cnt > 0) {
1222− for (i = 0; i < addr_cnt; i++) {
1223− address = addr_open[i];
1224− dlci = gsm->dlci[address];
1225− gsm_dlci_close(dlci);
1226− addr_open[i] = 0;
1227− }
1228− }
1266+ struct gsm_dlci *dlci = gsm->dlci[0];
12291267 /* Modem wishes to close down */
1230− dlci = gsm->dlci[0];
12311268 if (dlci) {
12321269 dlci->dead = true;
12331270 gsm->dead = true;
1234− gsm_dlci_close(dlci);
1235− addr_cnt = 0;
1236− gsm_response(gsm, 0, UA|PF);
1271+ gsm_dlci_begin_close(dlci);
12371272 }
12381273 }
12391274 break;
@@ -1326,11 +1361,12 @@ static void gsm_control_response(struct gsm_mux *gsm, unsigned int command, · 86 unmodified lines
13261361
13271362 static void gsm_control_transmit(struct gsm_mux *gsm, struct gsm_control *ctrl)
13281363 {
1329− struct gsm_msg *msg = gsm_data_alloc(gsm, 0, ctrl->len + 1, gsm->ftype);
1364+ struct gsm_msg *msg = gsm_data_alloc(gsm, 0, ctrl->len + 2, gsm->ftype);
13301365 if (msg == NULL)
13311366 return;
1332− msg->data[0] = (ctrl->cmd << 1) | 2 | EA; /* command */
1333− memcpy(msg->data + 1, ctrl->data, ctrl->len);
1367+ msg->data[0] = (ctrl->cmd << 1) | CR | EA; /* command */
1368+ msg->data[1] = (ctrl->len << 1) | EA;
1369+ memcpy(msg->data + 2, ctrl->data, ctrl->len);
13341370 gsm_data_queue(gsm->dlci[0], msg);
13351371 }
13361372
@@ -1353,7 +1389,6 @@ static void gsm_control_retransmit(struct timer_list *t) · 16 unmodified lines
13531389 spin_lock_irqsave(&gsm->control_lock, flags);
13541390 ctrl = gsm->pending_cmd;
13551391 if (ctrl) {
1356− gsm->cretries--;
13571392 if (gsm->cretries == 0) {
13581393 gsm->pending_cmd = NULL;
13591394 ctrl->error = -ETIMEDOUT;
@@ -1362,6 +1397,7 @@ static void gsm_control_retransmit(struct timer_list *t) · 2 unmodified lines
13621397 wake_up(&gsm->event);
13631398 return;
13641399 }
1400+ gsm->cretries--;
13651401 gsm_control_transmit(gsm, ctrl);
13661402 mod_timer(&gsm->t2_timer, jiffies + gsm->t2 * HZ / 100);
13671403 }
@@ -1402,7 +1438,7 @@ retry: · 34 unmodified lines
14021438
14031439 /* If DLCI0 is in ADM mode skip retries, it won't respond */
14041440 if (gsm->dlci[0]->mode == DLCI_MODE_ADM)
1405− gsm->cretries = 1;
1441+ gsm->cretries = 0;
14061442 else
14071443 gsm->cretries = gsm->n2;
14081444
@@ -1450,20 +1486,22 @@ static int gsm_control_wait(struct gsm_mux *gsm, struct gsm_control *control) · 41 unmodified lines
14501486
14511487 static void gsm_dlci_close(struct gsm_dlci *dlci)
14521488 {
1489+ unsigned long flags;
1490+
14531491 del_timer(&dlci->t1);
14541492 if (debug & 8)
14551493 pr_debug("DLCI %d goes closed.\n", dlci->addr);
14561494 dlci->state = DLCI_CLOSED;
14571495 if (dlci->addr != 0) {
14581496 tty_port_tty_hangup(&dlci->port, false);
1497+ spin_lock_irqsave(&dlci->lock, flags);
14591498 kfifo_reset(&dlci->fifo);
1499+ spin_unlock_irqrestore(&dlci->lock, flags);
14601500 /* Ensure that gsmtty_open() can return. */
14611501 tty_port_set_initialized(&dlci->port, 0);
14621502 wake_up_interruptible(&dlci->port.open_wait);
14631503 } else
14641504 dlci->gsm->dead = true;
1465− /* Unregister gsmtty driver,report gsmtty dev remove uevent for user */
1466− tty_unregister_device(gsm_tty_driver, dlci->addr);
14671505 wake_up(&dlci->gsm->event);
14681506 /* A DLCI 0 close is a MUX termination so we need to kick that
14691507 back to userspace somehow */
@@ -1485,8 +1523,9 @@ static void gsm_dlci_open(struct gsm_dlci *dlci) · 15 unmodified lines
14851523 dlci->state = DLCI_OPEN;
14861524 if (debug & 8)
14871525 pr_debug("DLCI %d goes open.\n", dlci->addr);
1488− /* Register gsmtty driver,report gsmtty dev add uevent for user */
1489− tty_register_device(gsm_tty_driver, dlci->addr, NULL);
1526+ /* Send current modem state */
1527+ if (dlci->addr)
1528+ gsm_modem_update(dlci, 0);
14901529 wake_up(&dlci->gsm->event);
14911530 }
14921531
@@ -1623,6 +1662,7 @@ static void gsm_dlci_data(struct gsm_dlci *dlci, const u8 *data, int clen) · 130 unmodified lines
16231662 tty = tty_port_tty_get(port);
16241663 if (tty) {
16251664 gsm_process_modem(tty, dlci, modem, slen);
1665+ tty_wakeup(tty);
16261666 tty_kref_put(tty);
16271667 }
16281668 fallthrough;
@@ -1793,19 +1833,7 @@ static void gsm_queue(struct gsm_mux *gsm) · 164 unmodified lines
17931833 struct gsm_dlci *dlci;
17941834 u8 cr;
17951835 int address;
1796− int i, j, k, address_tmp;
1797− /* We have to sneak a look at the packet body to do the FCS.
1798− A somewhat layering violation in the spec */
17991836
1800− if ((gsm->control & ~PF) == UI)
1801− gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf, gsm->len);
1802− if (gsm->encoding == 0) {
1803− /* WARNING: gsm->received_fcs is used for
1804− gsm->encoding = 0 only.
1805− In this case it contain the last piece of data
1806− required to generate final CRC */
1807− gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs);
1808− }
18091837 if (gsm->fcs != GOOD_FCS) {
18101838 gsm->bad_fcs++;
18111839 if (debug & 4)
@@ -1836,11 +1864,6 @@ static void gsm_queue(struct gsm_mux *gsm) · 24 unmodified lines
18361864 else {
18371865 gsm_response(gsm, address, UA|PF);
18381866 gsm_dlci_open(dlci);
1839− /* Save dlci open address */
1840− if (address) {
1841− addr_open[addr_cnt] = address;
1842− addr_cnt++;
1843− }
18441867 }
18451868 break;
18461869 case DISC|PF:
@@ -1851,35 +1874,9 @@ static void gsm_queue(struct gsm_mux *gsm) · 4 unmodified lines
18511874 return;
18521875 }
18531876 /* Real close complete */
1854− if (!address) {
1855− if (addr_cnt > 0) {
1856− for (i = 0; i < addr_cnt; i++) {
1857− address = addr_open[i];
1858− dlci = gsm->dlci[address];
1859− gsm_dlci_close(dlci);
1860− addr_open[i] = 0;
1861− }
1862− }
1863− dlci = gsm->dlci[0];
1864− gsm_dlci_close(dlci);
1865− addr_cnt = 0;
1866− gsm_response(gsm, 0, UA|PF);
1867− } else {
1868− gsm_response(gsm, address, UA|PF);
1869− gsm_dlci_close(dlci);
1870− /* clear dlci address */
1871− for (j = 0; j < addr_cnt; j++) {
1872− address_tmp = addr_open[j];
1873− if (address_tmp == address) {
1874− for (k = j; k < addr_cnt; k++)
1875− addr_open[k] = addr_open[k+1];
1876− addr_cnt--;
1877− break;
1878− }
1879− }
1880− }
1877+ gsm_response(gsm, address, UA|PF);
1878+ gsm_dlci_close(dlci);
18811879 break;
1882− case UA:
18831880 case UA|PF:
18841881 if (cr == 0 || dlci == NULL)
18851882 break;
@@ -1993,19 +1990,25 @@ static void gsm0_receive(struct gsm_mux *gsm, unsigned char c) · 107 unmodified lines
19931990 break;
19941991 case GSM_DATA: /* Data */
19951992 gsm->buf[gsm->count++] = c;
1996− if (gsm->count == gsm->len)
1993+ if (gsm->count == gsm->len) {
1994+ /* Calculate final FCS for UI frames over all data */
1995+ if ((gsm->control & ~PF) != UIH) {
1996+ gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf,
1997+ gsm->count);
1998+ }
19971999 gsm->state = GSM_FCS;
2000+ }
19982001 break;
19992002 case GSM_FCS: /* FCS follows the packet */
2000− gsm->received_fcs = c;
2001− gsm_queue(gsm);
2003+ gsm->fcs = gsm_fcs_add(gsm->fcs, c);
20022004 gsm->state = GSM_SSOF;
20032005 break;
20042006 case GSM_SSOF:
2005− if (c == GSM0_SOF) {
2006− gsm->state = GSM_SEARCH;
2007− break;
2008− }
2007+ gsm->state = GSM_SEARCH;
2008+ if (c == GSM0_SOF)
2009+ gsm_queue(gsm);
2010+ else
2011+ gsm->bad_size++;
20092012 break;
20102013 default:
20112014 pr_debug("%s: unhandled state: %d\n", __func__, gsm->state);
@@ -2023,12 +2026,35 @@ static void gsm0_receive(struct gsm_mux *gsm, unsigned char c) · 11 unmodified lines
20232026
20242027 static void gsm1_receive(struct gsm_mux *gsm, unsigned char c)
20252028 {
2029+ /* handle XON/XOFF */
2030+ if ((c & ISO_IEC_646_MASK) == XON) {
2031+ gsm->constipated = true;
2032+ return;
2033+ } else if ((c & ISO_IEC_646_MASK) == XOFF) {
2034+ gsm->constipated = false;
2035+ /* Kick the link in case it is idling */
2036+ gsm_data_kick(gsm, NULL);
2037+ return;
2038+ }
20262039 if (c == GSM1_SOF) {
2027− /* EOF is only valid in frame if we have got to the data state
2028− and received at least one byte (the FCS) */
2029− if (gsm->state == GSM_DATA && gsm->count) {
2030− /* Extract the FCS */
2040+ /* EOF is only valid in frame if we have got to the data state */
2041+ if (gsm->state == GSM_DATA) {
2042+ if (gsm->count < 1) {
2043+ /* Missing FSC */
2044+ gsm->malformed++;
2045+ gsm->state = GSM_START;
2046+ return;
2047+ }
2048+ /* Remove the FCS from data */
20312049 gsm->count--;
2050+ if ((gsm->control & ~PF) != UIH) {
2051+ /* Calculate final FCS for UI frames over all
2052+ * data but FCS
2053+ */
2054+ gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf,
2055+ gsm->count);
2056+ }
2057+ /* Add the FCS itself to test against GOOD_FCS */
20322058 gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->buf[gsm->count]);
20332059 gsm->len = gsm->count;
20342060 gsm_queue(gsm);
@@ -2037,7 +2063,8 @@ static void gsm1_receive(struct gsm_mux *gsm, unsigned char c) · 2 unmodified lines
20372063 }
20382064 /* Any partial frame was a runt so go back to start */
20392065 if (gsm->state != GSM_START) {
2040− gsm->malformed++;
2066+ if (gsm->state != GSM_SEARCH)
2067+ gsm->malformed++;
20412068 gsm->state = GSM_START;
20422069 }
20432070 /* A SOF in GSM_START means we are still reading idling or
@@ -2106,74 +2133,43 @@ static void gsm_error(struct gsm_mux *gsm) · 62 unmodified lines
21062133 gsm->io_error++;
21072134 }
21082135
2109−static int gsm_disconnect(struct gsm_mux *gsm)
2110−{
2111− struct gsm_dlci *dlci = gsm->dlci[0];
2112− struct gsm_control *gc;
2113−
2114− if (!dlci)
2115− return 0;
2116−
2117− /* In theory disconnecting DLCI 0 is sufficient but for some
2118− modems this is apparently not the case. */
2119− gc = gsm_control_send(gsm, CMD_CLD, NULL, 0);
2120− if (gc)
2121− gsm_control_wait(gsm, gc);
2122−
2123− del_timer_sync(&gsm->t2_timer);
2124− /* Now we are sure T2 has stopped */
2125−
2126− gsm_dlci_begin_close(dlci);
2127− wait_event_interruptible(gsm->event,
2128− dlci->state == DLCI_CLOSED);
2129−
2130− if (signal_pending(current))
2131− return -EINTR;
2132−
2133− return 0;
2134−}
2135−
21362136 /**
21372137 * gsm_cleanup_mux - generic GSM protocol cleanup
21382138 * @gsm: our mux
2139+ * @disc: disconnect link?
21392140 *
21402141 * Clean up the bits of the mux which are the same for all framing
21412142 * protocols. Remove the mux from the mux table, stop all the timers
21422143 * and then shut down each device hanging up the channels as we go.
21432144 */
21442145
2145−static void gsm_cleanup_mux(struct gsm_mux *gsm)
2146+static void gsm_cleanup_mux(struct gsm_mux *gsm, bool disc)
21462147 {
21472148 int i;
21482149 struct gsm_dlci *dlci = gsm->dlci[0];
21492150 struct gsm_msg *txq, *ntxq;
21502151
21512152 gsm->dead = true;
2153+ mutex_lock(&gsm->mutex);
21522154
2153− spin_lock(&gsm_mux_lock);
2154− for (i = 0; i < MAX_MUX; i++) {
2155− if (gsm_mux[i] == gsm) {
2156− gsm_mux[i] = NULL;
2157− break;
2155+ if (dlci) {
2156+ if (disc && dlci->state != DLCI_CLOSED) {
2157+ gsm_dlci_begin_close(dlci);
2158+ wait_event(gsm->event, dlci->state == DLCI_CLOSED);
21582159 }
2160+ dlci->dead = true;
21592161 }
2160− spin_unlock(&gsm_mux_lock);
2161− /* open failed before registering => nothing to do */
2162− if (i == MAX_MUX)
2163− return;
21642162
2163+ /* Finish outstanding timers, making sure they are done */
21652164 del_timer_sync(&gsm->t2_timer);
2166− /* Now we are sure T2 has stopped */
2167− if (dlci)
2168− dlci->dead = true;
21692165
2170− /* Free up any link layer users */
2171− mutex_lock(&gsm->mutex);
2172− for (i = 0; i < NUM_DLCI; i++)
2166+ /* Free up any link layer users and finally the control channel */
2167+ for (i = NUM_DLCI - 1; i >= 0; i--)
21732168 if (gsm->dlci[i])
21742169 gsm_dlci_release(gsm->dlci[i]);
21752170 mutex_unlock(&gsm->mutex);
21762171 /* Now wipe the queues */
2172+ tty_ldisc_flush(gsm->tty);
21772173 list_for_each_entry_safe(txq, ntxq, &gsm->tx_list, list)
21782174 kfree(txq);
21792175 INIT_LIST_HEAD(&gsm->tx_list);
@@ -2191,7 +2187,6 @@ static void gsm_cleanup_mux(struct gsm_mux *gsm) · 11 unmodified lines
21912187 static int gsm_activate_mux(struct gsm_mux *gsm)
21922188 {
21932189 struct gsm_dlci *dlci;
2194− int i = 0;
21952190
21962191 timer_setup(&gsm->t2_timer, gsm_control_retransmit, 0);
21972192 init_waitqueue_head(&gsm->event);
@@ -2203,18 +2198,6 @@ static int gsm_activate_mux(struct gsm_mux *gsm) · 5 unmodified lines
22032198 else
22042199 gsm->receive = gsm1_receive;
22052200
2206− spin_lock(&gsm_mux_lock);
2207− for (i = 0; i < MAX_MUX; i++) {
2208− if (gsm_mux[i] == NULL) {
2209− gsm->num = i;
2210− gsm_mux[i] = gsm;
2211− break;
2212− }
2213− }
2214− spin_unlock(&gsm_mux_lock);
2215− if (i == MAX_MUX)
2216− return -EBUSY;
2217−
22182201 dlci = gsm_dlci_alloc(gsm, 0);
22192202 if (dlci == NULL)
22202203 return -ENOMEM;
@@ -2230,6 +2213,15 @@ static int gsm_activate_mux(struct gsm_mux *gsm) · 9 unmodified lines
22302213 */
22312214 static void gsm_free_mux(struct gsm_mux *gsm)
22322215 {
2216+ int i;
2217+
2218+ for (i = 0; i < MAX_MUX; i++) {
2219+ if (gsm == gsm_mux[i]) {
2220+ gsm_mux[i] = NULL;
2221+ break;
2222+ }
2223+ }
2224+ mutex_destroy(&gsm->mutex);
22332225 kfree(gsm->txframe);
22342226 kfree(gsm->buf);
22352227 kfree(gsm);
@@ -2249,12 +2241,20 @@ static void gsm_free_muxr(struct kref *ref) · 13 unmodified lines
22492241
22502242 static inline void mux_get(struct gsm_mux *gsm)
22512243 {
2244+ unsigned long flags;
2245+
2246+ spin_lock_irqsave(&gsm_mux_lock, flags);
22522247 kref_get(&gsm->ref);
2248+ spin_unlock_irqrestore(&gsm_mux_lock, flags);
22532249 }
22542250
22552251 static inline void mux_put(struct gsm_mux *gsm)
22562252 {
2253+ unsigned long flags;
2254+
2255+ spin_lock_irqsave(&gsm_mux_lock, flags);
22572256 kref_put(&gsm->ref, gsm_free_muxr);
2257+ spin_unlock_irqrestore(&gsm_mux_lock, flags);
22582258 }
22592259
22602260 static inline unsigned int mux_num_to_base(struct gsm_mux *gsm)
@@ -2275,6 +2275,7 @@ static inline unsigned int mux_line_to_num(unsigned int line) · 14 unmodified lines
22752275
22762276 static struct gsm_mux *gsm_alloc_mux(void)
22772277 {
2278+ int i;
22782279 struct gsm_mux *gsm = kzalloc(sizeof(struct gsm_mux), GFP_KERNEL);
22792280 if (gsm == NULL)
22802281 return NULL;
@@ -2283,7 +2284,7 @@ static struct gsm_mux *gsm_alloc_mux(void) · 2 unmodified lines
22832284 kfree(gsm);
22842285 return NULL;
22852286 }
2286− gsm->txframe = kmalloc(2 * MAX_MRU + 2, GFP_KERNEL);
2287+ gsm->txframe = kmalloc(2 * (MAX_MTU + PROT_OVERHEAD - 1), GFP_KERNEL);
22872288 if (gsm->txframe == NULL) {
22882289 kfree(gsm->buf);
22892290 kfree(gsm);
@@ -2304,6 +2305,26 @@ static struct gsm_mux *gsm_alloc_mux(void) · 14 unmodified lines
23042305 gsm->mtu = 64;
23052306 gsm->dead = true; /* Avoid early tty opens */
23062307
2308+ /* Store the instance to the mux array or abort if no space is
2309+ * available.
2310+ */
2311+ spin_lock(&gsm_mux_lock);
2312+ for (i = 0; i < MAX_MUX; i++) {
2313+ if (!gsm_mux[i]) {
2314+ gsm_mux[i] = gsm;
2315+ gsm->num = i;
2316+ break;
2317+ }
2318+ }
2319+ spin_unlock(&gsm_mux_lock);
2320+ if (i == MAX_MUX) {
2321+ mutex_destroy(&gsm->mutex);
2322+ kfree(gsm->txframe);
2323+ kfree(gsm->buf);
2324+ kfree(gsm);
2325+ return NULL;
2326+ }
2327+
23072328 return gsm;
23082329 }
23092330
@@ -2339,7 +2360,7 @@ static int gsm_config(struct gsm_mux *gsm, struct gsm_config *c) · 29 unmodified lines
23392360 /* Check the MRU/MTU range looks sane */
23402361 if (c->mru > MAX_MRU || c->mtu > MAX_MTU || c->mru < 8 || c->mtu < 8)
23412362 return -EINVAL;
2342− if (c->n2 < 3)
2363+ if (c->n2 > 255)
23432364 return -EINVAL;
23442365 if (c->encapsulation > 1) /* Basic, advanced, no I */
23452366 return -EINVAL;
@@ -2370,19 +2391,11 @@ static int gsm_config(struct gsm_mux *gsm, struct gsm_config *c) · 24 unmodified lines
23702391
23712392 /*
23722393 * Close down what is needed, restart and initiate the new
2373− * configuration
2394+ * configuration. On the first time there is no DLCI[0]
2395+ * and closing or cleaning up is not necessary.
23742396 */
2375−
2376− if (gsm->initiator && (need_close || need_restart)) {
2377− int ret;
2378−
2379− ret = gsm_disconnect(gsm);
2380−
2381− if (ret)
2382− return ret;
2383− }
2384− if (need_restart)
2385− gsm_cleanup_mux(gsm);
2397+ if (need_close || need_restart)
2398+ gsm_cleanup_mux(gsm, true);
23862399
23872400 gsm->initiator = c->initiator;
23882401 gsm->mru = c->mru;
@@ -2450,25 +2463,26 @@ static int gsmld_attach_gsm(struct tty_struct *tty, struct gsm_mux *gsm) · 61 unmodified lines
24502463 int ret, i;
24512464
24522465 gsm->tty = tty_kref_get(tty);
2466+ /* Turn off tty XON/XOFF handling to handle it explicitly. */
2467+ gsm->old_c_iflag = tty->termios.c_iflag;
2468+ tty->termios.c_iflag &= (IXON | IXOFF);
24532469 ret = gsm_activate_mux(gsm);
24542470 if (ret != 0)
24552471 tty_kref_put(gsm->tty);
24562472 else {
24572473 /* Don't register device 0 - this is the control channel and not
24582474 a usable tty interface */
2459− if (gsm->initiator) {
2460− base = mux_num_to_base(gsm); /* Base for this MUX */
2461− for (i = 1; i < NUM_DLCI; i++) {
2462− struct device *dev;
2475+ base = mux_num_to_base(gsm); /* Base for this MUX */
2476+ for (i = 1; i < NUM_DLCI; i++) {
2477+ struct device *dev;
24632478
2464− dev = tty_register_device(gsm_tty_driver,
2479+ dev = tty_register_device(gsm_tty_driver,
24652480 base + i, NULL);
2466− if (IS_ERR(dev)) {
2467− for (i--; i >= 1; i--)
2468− tty_unregister_device(gsm_tty_driver,
2469− base + i);
2470− return PTR_ERR(dev);
2471− }
2481+ if (IS_ERR(dev)) {
2482+ for (i--; i >= 1; i--)
2483+ tty_unregister_device(gsm_tty_driver,
2484+ base + i);
2485+ return PTR_ERR(dev);
24722486 }
24732487 }
24742488 }
@@ -2490,11 +2504,10 @@ static void gsmld_detach_gsm(struct tty_struct *tty, struct gsm_mux *gsm) · 15 unmodified lines
24902504 int i;
24912505
24922506 WARN_ON(tty != gsm->tty);
2493− if (gsm->initiator) {
2494− for (i = 1; i < NUM_DLCI; i++)
2495− tty_unregister_device(gsm_tty_driver, base + i);
2496− }
2497− gsm_cleanup_mux(gsm);
2507+ for (i = 1; i < NUM_DLCI; i++)
2508+ tty_unregister_device(gsm_tty_driver, base + i);
2509+ /* Restore tty XON/XOFF handling. */
2510+ gsm->tty->termios.c_iflag = gsm->old_c_iflag;
24982511 tty_kref_put(gsm->tty);
24992512 gsm->tty = NULL;
25002513 }
@@ -2559,6 +2572,12 @@ static void gsmld_close(struct tty_struct *tty) · 58 unmodified lines
25592572 {
25602573 struct gsm_mux *gsm = tty->disc_data;
25612574
2575+ /* The ldisc locks and closes the port before calling our close. This
2576+ * means we have no way to do a proper disconnect. We will not bother
2577+ * to do one.
2578+ */
2579+ gsm_cleanup_mux(gsm, false);
2580+
25622581 gsmld_detach_gsm(tty, gsm);
25632582
25642583 gsmld_flush_buffer(tty);
@@ -2597,7 +2616,7 @@ static int gsmld_open(struct tty_struct *tty) · 32 unmodified lines
25972616
25982617 ret = gsmld_attach_gsm(tty, gsm);
25992618 if (ret != 0) {
2600− gsm_cleanup_mux(gsm);
2619+ gsm_cleanup_mux(gsm, false);
26012620 mux_put(gsm);
26022621 }
26032622 return ret;
@@ -2954,26 +2973,78 @@ static struct tty_ldisc_ops tty_ldisc_packet = { · 350 unmodified lines
29542973
29552974 #define TX_SIZE 512
29562975
2957−static int gsmtty_modem_update(struct gsm_dlci *dlci, u8 brk)
2976+/**
2977+ * gsm_modem_upd_via_data - send modem bits via convergence layer
2978+ * @dlci: channel
2979+ * @brk: break signal
2980+ *
2981+ * Send an empty frame to signal mobile state changes and to transmit the
2982+ * break signal for adaption 2.
2983+ */
2984+
2985+static void gsm_modem_upd_via_data(struct gsm_dlci *dlci, u8 brk)
29582986 {
2959− u8 modembits[5];
2987+ struct gsm_mux *gsm = dlci->gsm;
2988+ unsigned long flags;
2989+
2990+ if (dlci->state != DLCI_OPEN || dlci->adaption != 2)
2991+ return;
2992+
2993+ spin_lock_irqsave(&gsm->tx_lock, flags);
2994+ gsm_dlci_modem_output(gsm, dlci, brk);
2995+ spin_unlock_irqrestore(&gsm->tx_lock, flags);
2996+}
2997+
2998+/**
2999+ * gsm_modem_upd_via_msc - send modem bits via control frame
3000+ * @dlci: channel
3001+ * @brk: break signal
3002+ */
3003+
3004+static int gsm_modem_upd_via_msc(struct gsm_dlci *dlci, u8 brk)
3005+{
3006+ u8 modembits[3];
29603007 struct gsm_control *ctrl;
29613008 int len = 2;
29623009
2963− if (brk)
2964− len++;
3010+ if (dlci->gsm->encoding != 0)
3011+ return 0;
29653012
2966− modembits[0] = len << 1 | EA; /* Data bytes */
2967− modembits[1] = dlci->addr << 2 | 3; /* DLCI, EA, 1 */
2968− modembits[2] = gsm_encode_modem(dlci) << 1 | EA;
2969− if (brk)
2970− modembits[3] = brk << 4 | 2 | EA; /* Valid, EA */
2971− ctrl = gsm_control_send(dlci->gsm, CMD_MSC, modembits, len + 1);
3013+ modembits[0] = (dlci->addr << 2) | 2 | EA; /* DLCI, Valid, EA */
3014+ if (!brk) {
3015+ modembits[1] = (gsm_encode_modem(dlci) << 1) | EA;
3016+ } else {
3017+ modembits[1] = gsm_encode_modem(dlci) << 1;
3018+ modembits[2] = (brk << 4) | 2 | EA; /* Length, Break, EA */
3019+ len++;
3020+ }
3021+ ctrl = gsm_control_send(dlci->gsm, CMD_MSC, modembits, len);
29723022 if (ctrl == NULL)
29733023 return -ENOMEM;
29743024 return gsm_control_wait(dlci->gsm, ctrl);
29753025 }
29763026
3027+/**
3028+ * gsm_modem_update - send modem status line state
3029+ * @dlci: channel
3030+ * @brk: break signal
3031+ */
3032+
3033+static int gsm_modem_update(struct gsm_dlci *dlci, u8 brk)
3034+{
3035+ if (dlci->adaption == 2) {
3036+ /* Send convergence layer type 2 empty data frame. */
3037+ gsm_modem_upd_via_data(dlci, brk);
3038+ return 0;
3039+ } else if (dlci->gsm->encoding == 0) {
3040+ /* Send as MSC control message. */
3041+ return gsm_modem_upd_via_msc(dlci, brk);
3042+ }
3043+
3044+ /* Modem status lines are not supported. */
3045+ return -EPROTONOSUPPORT;
3046+}
3047+
29773048 static int gsm_carrier_raised(struct tty_port *port)
29783049 {
29793050 struct gsm_dlci *dlci = container_of(port, struct gsm_dlci, port);
@@ -3006,7 +3077,7 @@ static void gsm_dtr_rts(struct tty_port *port, int onoff) · 26 unmodified lines
30063077 modem_tx &= ~(TIOCM_DTR | TIOCM_RTS);
30073078 if (modem_tx != dlci->modem_tx) {
30083079 dlci->modem_tx = modem_tx;
3009− gsmtty_modem_update(dlci, 0);
3080+ gsm_modem_update(dlci, 0);
30103081 }
30113082 }
30123083
@@ -3155,13 +3226,17 @@ static unsigned int gsmtty_chars_in_buffer(struct tty_struct *tty) · 142 unmodified lines
31553226 static void gsmtty_flush_buffer(struct tty_struct *tty)
31563227 {
31573228 struct gsm_dlci *dlci = tty->driver_data;
3229+ unsigned long flags;
3230+
31583231 if (dlci->state == DLCI_CLOSED)
31593232 return;
31603233 /* Caution needed: If we implement reliable transport classes
31613234 then the data being transmitted can't simply be junked once
31623235 it has first hit the stack. Until then we can just blow it
31633236 away */
3237+ spin_lock_irqsave(&dlci->lock, flags);
31643238 kfifo_reset(&dlci->fifo);
3239+ spin_unlock_irqrestore(&dlci->lock, flags);
31653240 /* Need to unhook this DLCI from the transmit queue logic */
31663241 }
31673242
@@ -3193,7 +3268,7 @@ static int gsmtty_tiocmset(struct tty_struct *tty, · 25 unmodified lines
31933268
31943269 if (modem_tx != dlci->modem_tx) {
31953270 dlci->modem_tx = modem_tx;
3196− return gsmtty_modem_update(dlci, 0);
3271+ return gsm_modem_update(dlci, 0);
31973272 }
31983273 return 0;
31993274 }
@@ -3254,7 +3329,7 @@ static void gsmtty_throttle(struct tty_struct *tty) · 54 unmodified lines
32543329 dlci->modem_tx &= ~TIOCM_RTS;
32553330 dlci->throttled = true;
32563331 /* Send an MSC with RTS cleared */
3257− gsmtty_modem_update(dlci, 0);
3332+ gsm_modem_update(dlci, 0);
32583333 }
32593334
32603335 static void gsmtty_unthrottle(struct tty_struct *tty)
@@ -3266,7 +3341,7 @@ static void gsmtty_unthrottle(struct tty_struct *tty) · 5 unmodified lines
32663341 dlci->modem_tx |= TIOCM_RTS;
32673342 dlci->throttled = false;
32683343 /* Send an MSC with RTS set */
3269− gsmtty_modem_update(dlci, 0);
3344+ gsm_modem_update(dlci, 0);
32703345 }
32713346
32723347 static int gsmtty_break_ctl(struct tty_struct *tty, int state)
@@ -3284,7 +3359,7 @@ static int gsmtty_break_ctl(struct tty_struct *tty, int state) · 11 unmodified lines
32843359 if (encode > 0x0F)
32853360 encode = 0x0F; /* Best effort */
32863361 }
3287− return gsmtty_modem_update(dlci, encode);
3362+ return gsm_modem_update(dlci, encode);
32883363 }
32893364
32903365 static void gsmtty_cleanup(struct tty_struct *tty)
drivers/tty/serial/8250/8250_pci.c+4−4
@@ -2667,7 +2667,7 @@ enum pci_board_num_t { · 2666 unmodified lines
26672667 pbn_panacom2,
26682668 pbn_panacom4,
26692669 pbn_plx_romulus,
2670− pbn_endrun_2_4000000,
2670+ pbn_endrun_2_3906250,
26712671 pbn_oxsemi,
26722672 pbn_oxsemi_1_3906250,
26732673 pbn_oxsemi_2_3906250,
@@ -3195,10 +3195,10 @@ static struct pciserial_board pci_boards[] = { · 521 unmodified lines
31953195 * signal now many ports are available
31963196 * 2 port 952 Uart support
31973197 */
3198− [pbn_endrun_2_4000000] = {
3198+ [pbn_endrun_2_3906250] = {
31993199 .flags = FL_BASE0,
32003200 .num_ports = 2,
3201− .base_baud = 4000000,
3201+ .base_baud = 3906250,
32023202 .uart_offset = 0x200,
32033203 .first_offset = 0x1000,
32043204 },
@@ -4115,7 +4115,7 @@ static const struct pci_device_id serial_pci_tbl[] = { · 910 unmodified lines
41154115 */
41164116 { PCI_VENDOR_ID_ENDRUN, PCI_DEVICE_ID_ENDRUN_1588,
41174117 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4118− pbn_endrun_2_4000000 },
4118+ pbn_endrun_2_3906250 },
41194119 /*
41204120 * Quatech cards. These actually have configurable clocks but for
41214121 * now we just use the default.
drivers/tty/serial/8250/8250_port.c+3−3
@@ -1675,11 +1675,11 @@ static void serial8250_start_tx(struct uart_port *port) · 1674 unmodified lines
16751675 struct uart_8250_port *up = up_to_u8250p(port);
16761676 struct uart_8250_em485 *em485 = up->em485;
16771677
1678− serial8250_rpm_get_tx(up);
1679−
16801678 if (!port->x_char && uart_circ_empty(&port->state->xmit))
16811679 return;
16821680
1681+ serial8250_rpm_get_tx(up);
1682+
16831683 if (em485 &&
16841684 em485->active_timer == &em485->start_tx_timer)
16851685 return;
@@ -3329,7 +3329,7 @@ static void serial8250_console_restore(struct uart_8250_port *up) · 1643 unmodified lines
33293329
33303330 serial8250_set_divisor(port, baud, quot, frac);
33313331 serial_port_out(port, UART_LCR, up->lcr);
3332− serial8250_out_MCR(up, UART_MCR_DTR | UART_MCR_RTS);
3332+ serial8250_out_MCR(up, up->mcr | UART_MCR_DTR | UART_MCR_RTS);
33333333 }
33343334
33353335 /*
drivers/tty/serial/amba-pl011.c+7−2
@@ -1255,13 +1255,18 @@ static inline bool pl011_dma_rx_running(struct uart_amba_port *uap) · 1254 unmodified lines
12551255
12561256 static void pl011_rs485_tx_stop(struct uart_amba_port *uap)
12571257 {
1258+ /*
1259+ * To be on the safe side only time out after twice as many iterations
1260+ * as fifo size.
1261+ */
1262+ const int MAX_TX_DRAIN_ITERS = uap->port.fifosize * 2;
12581263 struct uart_port *port = &uap->port;
12591264 int i = 0;
12601265 u32 cr;
12611266
12621267 /* Wait until hardware tx queue is empty */
12631268 while (!pl011_tx_empty(port)) {
1264− if (i == port->fifosize) {
1269+ if (i > MAX_TX_DRAIN_ITERS) {
12651270 dev_warn(port->dev,
12661271 "timeout while draining hardware tx queue\n");
12671272 break;
@@ -2052,7 +2057,7 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios, · 784 unmodified lines
20522057 * with the given baud rate. We use this as the poll interval when we
20532058 * wait for the tx queue to empty.
20542059 */
2055− uap->rs485_tx_drain_interval = (bits * 1000 * 1000) / baud;
2060+ uap->rs485_tx_drain_interval = DIV_ROUND_UP(bits * 1000 * 1000, baud);
20562061
20572062 pl011_setup_status_masks(port, termios);
20582063
drivers/tty/serial/imx.c+1−1
@@ -1448,7 +1448,7 @@ static int imx_uart_startup(struct uart_port *port) · 1447 unmodified lines
14481448 imx_uart_writel(sport, ucr1, UCR1);
14491449
14501450 ucr4 = imx_uart_readl(sport, UCR4) & ~(UCR4_OREN | UCR4_INVR);
1451− if (!sport->dma_is_enabled)
1451+ if (!dma_is_inited)
14521452 ucr4 |= UCR4_OREN;
14531453 if (sport->inverted_rx)
14541454 ucr4 |= UCR4_INVR;
drivers/tty/serial/sc16is7xx.c+2−4
@@ -1238,12 +1238,10 @@ static void sc16is7xx_shutdown(struct uart_port *port) · 1237 unmodified lines
12381238
12391239 /* Disable all interrupts */
12401240 sc16is7xx_port_write(port, SC16IS7XX_IER_REG, 0);
1241− /* Disable TX/RX, clear auto RS485 and RTS invert */
1241+ /* Disable TX/RX */
12421242 sc16is7xx_port_update(port, SC16IS7XX_EFCR_REG,
12431243 SC16IS7XX_EFCR_RXDISABLE_BIT |
1244− SC16IS7XX_EFCR_TXDISABLE_BIT |
1245− SC16IS7XX_EFCR_AUTO_RS485_BIT |
1246− SC16IS7XX_EFCR_RTS_INVERT_BIT,
1244+ SC16IS7XX_EFCR_TXDISABLE_BIT,
12471245 SC16IS7XX_EFCR_RXDISABLE_BIT |
12481246 SC16IS7XX_EFCR_TXDISABLE_BIT);
12491247
drivers/usb/cdns3/cdns3-gadget.c+5−2
@@ -2684,6 +2684,7 @@ int __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep) · 2683 unmodified lines
26842684 struct usb_request *request;
26852685 struct cdns3_request *priv_req;
26862686 struct cdns3_trb *trb = NULL;
2687+ struct cdns3_trb trb_tmp;
26872688 int ret;
26882689 int val;
26892690
@@ -2693,8 +2694,10 @@ int __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep) · 3 unmodified lines
26932694 if (request) {
26942695 priv_req = to_cdns3_request(request);
26952696 trb = priv_req->trb;
2696− if (trb)
2697+ if (trb) {
2698+ trb_tmp = *trb;
26972699 trb->control = trb->control ^ cpu_to_le32(TRB_CYCLE);
2700+ }
26982701 }
26992702
27002703 writel(EP_CMD_CSTALL | EP_CMD_EPRST, &priv_dev->regs->ep_cmd);
@@ -2709,7 +2712,7 @@ int __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep) · 8 unmodified lines
27092712
27102713 if (request) {
27112714 if (trb)
2712− trb->control = trb->control ^ cpu_to_le32(TRB_CYCLE);
2715+ *trb = trb_tmp;
27132716
27142717 cdns3_rearm_transfer(priv_ep, 1);
27152718 }
drivers/usb/core/devio.c+9−5
@@ -1209,12 +1209,16 @@ static int do_proc_control(struct usb_dev_state *ps, · 1208 unmodified lines
12091209
12101210 usb_unlock_device(dev);
12111211 i = usbfs_start_wait_urb(urb, tmo, &actlen);
1212+
1213+ /* Linger a bit, prior to the next control message. */
1214+ if (dev->quirks & USB_QUIRK_DELAY_CTRL_MSG)
1215+ msleep(200);
12121216 usb_lock_device(dev);
12131217 snoop_urb(dev, NULL, pipe, actlen, i, COMPLETE, tbuf, actlen);
12141218 if (!i && actlen) {
12151219 if (copy_to_user(ctrl->data, tbuf, actlen)) {
12161220 ret = -EFAULT;
1217− goto recv_fault;
1221+ goto done;
12181222 }
12191223 }
12201224 } else {
@@ -1231,6 +1235,10 @@ static int do_proc_control(struct usb_dev_state *ps, · 10 unmodified lines
12311235
12321236 usb_unlock_device(dev);
12331237 i = usbfs_start_wait_urb(urb, tmo, &actlen);
1238+
1239+ /* Linger a bit, prior to the next control message. */
1240+ if (dev->quirks & USB_QUIRK_DELAY_CTRL_MSG)
1241+ msleep(200);
12341242 usb_lock_device(dev);
12351243 snoop_urb(dev, NULL, pipe, actlen, i, COMPLETE, NULL, 0);
12361244 }
@@ -1242,10 +1250,6 @@ static int do_proc_control(struct usb_dev_state *ps, · 5 unmodified lines
12421250 }
12431251 ret = (i < 0 ? i : actlen);
12441252
1245− recv_fault:
1246− /* Linger a bit, prior to the next control message. */
1247− if (dev->quirks & USB_QUIRK_DELAY_CTRL_MSG)
1248− msleep(200);
12491253 done:
12501254 kfree(dr);
12511255 usb_free_urb(urb);
drivers/usb/core/quirks.c+6−0
@@ -404,6 +404,9 @@ static const struct usb_device_id usb_quirk_list[] = { · 403 unmodified lines
404404 { USB_DEVICE(0x0b05, 0x17e0), .driver_info =
405405 USB_QUIRK_IGNORE_REMOTE_WAKEUP },
406406
407+ /* Realtek Semiconductor Corp. Mass Storage Device (Multicard Reader)*/
408+ { USB_DEVICE(0x0bda, 0x0151), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS },
409+
407410 /* Realtek hub in Dell WD19 (Type-C) */
408411 { USB_DEVICE(0x0bda, 0x0487), .driver_info = USB_QUIRK_NO_LPM },
409412
@@ -507,6 +510,9 @@ static const struct usb_device_id usb_quirk_list[] = { · 97 unmodified lines
507510 /* DJI CineSSD */
508511 { USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM },
509512
513+ /* VCOM device */
514+ { USB_DEVICE(0x4296, 0x7570), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS },
515+
510516 /* INTEL VALUE SSD */
511517 { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
512518
drivers/usb/dwc3/core.c+29−5
@@ -274,7 +274,8 @@ int dwc3_core_soft_reset(struct dwc3 *dwc) · 273 unmodified lines
274274
275275 reg = dwc3_readl(dwc->regs, DWC3_DCTL);
276276 reg |= DWC3_DCTL_CSFTRST;
277− dwc3_writel(dwc->regs, DWC3_DCTL, reg);
277+ reg &= ~DWC3_DCTL_RUN_STOP;
278+ dwc3_gadget_dctl_write_safe(dwc, reg);
278279
279280 /*
280281 * For DWC_usb31 controller 1.90a and later, the DCTL.CSFRST bit
@@ -1377,10 +1378,10 @@ static void dwc3_get_properties(struct dwc3 *dwc) · 1096 unmodified lines
13771378 u8 lpm_nyet_threshold;
13781379 u8 tx_de_emphasis;
13791380 u8 hird_threshold;
1380− u8 rx_thr_num_pkt_prd;
1381− u8 rx_max_burst_prd;
1382− u8 tx_thr_num_pkt_prd;
1383− u8 tx_max_burst_prd;
1381+ u8 rx_thr_num_pkt_prd = 0;
1382+ u8 rx_max_burst_prd = 0;
1383+ u8 tx_thr_num_pkt_prd = 0;
1384+ u8 tx_max_burst_prd = 0;
13841385 u8 tx_fifo_resize_max_num;
13851386 const char *usb_psy_name;
13861387 int ret;
@@ -1690,21 +1691,44 @@ static int dwc3_probe(struct platform_device *pdev) · 303 unmodified lines
16901691 /*
16911692 * Clocks are optional, but new DT platforms should support all
16921693 * clocks as required by the DT-binding.
1694+ * Some devices have different clock names in legacy device trees,
1695+ * check for them to retain backwards compatibility.
16931696 */
16941697 dwc->bus_clk = devm_clk_get_optional(dev, "bus_early");
16951698 if (IS_ERR(dwc->bus_clk))
16961699 return dev_err_probe(dev, PTR_ERR(dwc->bus_clk),
16971700 "could not get bus clock\n");
16981701
1702+ if (dwc->bus_clk == NULL) {
1703+ dwc->bus_clk = devm_clk_get_optional(dev, "bus_clk");
1704+ if (IS_ERR(dwc->bus_clk))
1705+ return dev_err_probe(dev, PTR_ERR(dwc->bus_clk),
1706+ "could not get bus clock\n");
1707+ }
1708+
16991709 dwc->ref_clk = devm_clk_get_optional(dev, "ref");
17001710 if (IS_ERR(dwc->ref_clk))
17011711 return dev_err_probe(dev, PTR_ERR(dwc->ref_clk),
17021712 "could not get ref clock\n");
17031713
1714+ if (dwc->ref_clk == NULL) {
1715+ dwc->ref_clk = devm_clk_get_optional(dev, "ref_clk");
1716+ if (IS_ERR(dwc->ref_clk))
1717+ return dev_err_probe(dev, PTR_ERR(dwc->ref_clk),
1718+ "could not get ref clock\n");
1719+ }
1720+
17041721 dwc->susp_clk = devm_clk_get_optional(dev, "suspend");
17051722 if (IS_ERR(dwc->susp_clk))
17061723 return dev_err_probe(dev, PTR_ERR(dwc->susp_clk),
17071724 "could not get suspend clock\n");
1725+
1726+ if (dwc->susp_clk == NULL) {
1727+ dwc->susp_clk = devm_clk_get_optional(dev, "suspend_clk");
1728+ if (IS_ERR(dwc->susp_clk))
1729+ return dev_err_probe(dev, PTR_ERR(dwc->susp_clk),
1730+ "could not get suspend clock\n");
1731+ }
17081732 }
17091733
17101734 ret = reset_control_deassert(dwc->reset);
drivers/usb/dwc3/drd.c+5−6
@@ -584,16 +584,15 @@ int dwc3_drd_init(struct dwc3 *dwc) · 583 unmodified lines
584584 {
585585 int ret, irq;
586586
587+ if (ROLE_SWITCH &&
588+ device_property_read_bool(dwc->dev, "usb-role-switch"))
589+ return dwc3_setup_role_switch(dwc);
590+
587591 dwc->edev = dwc3_get_extcon(dwc);
588592 if (IS_ERR(dwc->edev))
589593 return PTR_ERR(dwc->edev);
590594
591− if (ROLE_SWITCH &&
592− device_property_read_bool(dwc->dev, "usb-role-switch")) {
593− ret = dwc3_setup_role_switch(dwc);
594− if (ret < 0)
595− return ret;
596− } else if (dwc->edev) {
595+ if (dwc->edev) {
597596 dwc->edev_nb.notifier_call = dwc3_drd_notifier;
598597 ret = extcon_register_notifier(dwc->edev, EXTCON_USB_HOST,
599598 &dwc->edev_nb);
drivers/usb/dwc3/dwc3-pci.c+8−0
@@ -45,6 +45,8 @@ · 44 unmodified lines
4545 #define PCI_DEVICE_ID_INTEL_ADLM 0x54ee
4646 #define PCI_DEVICE_ID_INTEL_ADLS 0x7ae1
4747 #define PCI_DEVICE_ID_INTEL_RPLS 0x7a61
48+#define PCI_DEVICE_ID_INTEL_MTLP 0x7ec1
49+#define PCI_DEVICE_ID_INTEL_MTL 0x7e7e
4850 #define PCI_DEVICE_ID_INTEL_TGL 0x9a15
4951 #define PCI_DEVICE_ID_AMD_MR 0x163a
5052
@@ -456,6 +458,12 @@ static const struct pci_device_id dwc3_pci_id_table[] = { · 405 unmodified lines
456458 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_RPLS),
457459 (kernel_ulong_t) &dwc3_pci_intel_swnode, },
458460
461+ { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MTLP),
462+ (kernel_ulong_t) &dwc3_pci_intel_swnode, },
463+
464+ { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MTL),
465+ (kernel_ulong_t) &dwc3_pci_intel_swnode, },
466+
459467 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGL),
460468 (kernel_ulong_t) &dwc3_pci_intel_swnode, },
461469
drivers/usb/dwc3/gadget.c+30−1
@@ -3274,6 +3274,7 @@ static int dwc3_gadget_ep_cleanup_completed_request(struct dwc3_ep *dep, · 3273 unmodified lines
32743274 const struct dwc3_event_depevt *event,
32753275 struct dwc3_request *req, int status)
32763276 {
3277+ int request_status;
32773278 int ret;
32783279
32793280 if (req->request.num_mapped_sgs)
@@ -3294,7 +3295,35 @@ static int dwc3_gadget_ep_cleanup_completed_request(struct dwc3_ep *dep, · 14 unmodified lines
32943295 req->needs_extra_trb = false;
32953296 }
32963297
3297− dwc3_gadget_giveback(dep, req, status);
3298+ /*
3299+ * The event status only reflects the status of the TRB with IOC set.
3300+ * For the requests that don't set interrupt on completion, the driver
3301+ * needs to check and return the status of the completed TRBs associated
3302+ * with the request. Use the status of the last TRB of the request.
3303+ */
3304+ if (req->request.no_interrupt) {
3305+ struct dwc3_trb *trb;
3306+
3307+ trb = dwc3_ep_prev_trb(dep, dep->trb_dequeue);
3308+ switch (DWC3_TRB_SIZE_TRBSTS(trb->size)) {
3309+ case DWC3_TRBSTS_MISSED_ISOC:
3310+ /* Isoc endpoint only */
3311+ request_status = -EXDEV;
3312+ break;
3313+ case DWC3_TRB_STS_XFER_IN_PROG:
3314+ /* Applicable when End Transfer with ForceRM=0 */
3315+ case DWC3_TRBSTS_SETUP_PENDING:
3316+ /* Control endpoint only */
3317+ case DWC3_TRBSTS_OK:
3318+ default:
3319+ request_status = 0;
3320+ break;
3321+ }
3322+ } else {
3323+ request_status = status;
3324+ }
3325+
3326+ dwc3_gadget_giveback(dep, req, request_status);
32983327
32993328 out:
33003329 return ret;
drivers/usb/gadget/configfs.c+2−0
@@ -1438,6 +1438,8 @@ static void configfs_composite_unbind(struct usb_gadget *gadget) · 1437 unmodified lines
14381438 usb_ep_autoconfig_reset(cdev->gadget);
14391439 spin_lock_irqsave(&gi->spinlock, flags);
14401440 cdev->gadget = NULL;
1441+ cdev->deactivations = 0;
1442+ gadget->deactivated = false;
14411443 set_gadget_data(gadget, NULL);
14421444 spin_unlock_irqrestore(&gi->spinlock, flags);
14431445 }
drivers/usb/gadget/function/uvc_queue.c+2−0
@@ -264,6 +264,8 @@ void uvcg_queue_cancel(struct uvc_video_queue *queue, int disconnect) · 263 unmodified lines
264264 buf->state = UVC_BUF_STATE_ERROR;
265265 vb2_buffer_done(&buf->buf.vb2_buf, VB2_BUF_STATE_ERROR);
266266 }
267+ queue->buf_used = 0;
268+
267269 /* This must be protected by the irqlock spinlock to avoid race
268270 * conditions between uvc_queue_buffer and the disconnection event that
269271 * could result in an interruptible wait in uvc_dequeue_buffer. Do not
drivers/usb/host/ehci-hcd.c+23−0
@@ -1103,6 +1103,26 @@ static void ehci_remove_device(struct usb_hcd *hcd, struct usb_device *udev) · 1102 unmodified lines
11031103
11041104 #ifdef CONFIG_PM
11051105
1106+/* Clear wakeup signal locked in zhaoxin platform when device plug in. */
1107+static void ehci_zx_wakeup_clear(struct ehci_hcd *ehci)
1108+{
1109+ u32 __iomem *reg = &ehci->regs->port_status[4];
1110+ u32 t1 = ehci_readl(ehci, reg);
1111+
1112+ t1 &= (u32)~0xf0000;
1113+ t1 |= PORT_TEST_FORCE;
1114+ ehci_writel(ehci, t1, reg);
1115+ t1 = ehci_readl(ehci, reg);
1116+ msleep(1);
1117+ t1 &= (u32)~0xf0000;
1118+ ehci_writel(ehci, t1, reg);
1119+ ehci_readl(ehci, reg);
1120+ msleep(1);
1121+ t1 = ehci_readl(ehci, reg);
1122+ ehci_writel(ehci, t1 | PORT_CSC, reg);
1123+ ehci_readl(ehci, reg);
1124+}
1125+
11061126 /* suspend/resume, section 4.3 */
11071127
11081128 /* These routines handle the generic parts of controller suspend/resume */
@@ -1154,6 +1174,9 @@ int ehci_resume(struct usb_hcd *hcd, bool force_reset) · 45 unmodified lines
11541174 if (ehci->shutdown)
11551175 return 0; /* Controller is dead */
11561176
1177+ if (ehci->zx_wakeup_clear_needed)
1178+ ehci_zx_wakeup_clear(ehci);
1179+
11571180 /*
11581181 * If CF is still set and reset isn't forced
11591182 * then we maintained suspend power.
drivers/usb/host/ehci-pci.c+4−0
@@ -231,6 +231,10 @@ static int ehci_pci_setup(struct usb_hcd *hcd) · 230 unmodified lines
231231 ehci->is_aspeed = 1;
232232 }
233233 break;
234+ case PCI_VENDOR_ID_ZHAOXIN:
235+ if (pdev->device == 0x3104 && (pdev->revision & 0xf0) == 0x90)
236+ ehci->zx_wakeup_clear_needed = 1;
237+ break;
234238 }
235239
236240 /* optional debug port, normally in the first BAR */
drivers/usb/host/ehci.h+1−0
@@ -220,6 +220,7 @@ struct ehci_hcd { /* one per controller */ · 219 unmodified lines
220220 unsigned imx28_write_fix:1; /* For Freescale i.MX28 */
221221 unsigned spurious_oc:1;
222222 unsigned is_aspeed:1;
223+ unsigned zx_wakeup_clear_needed:1;
223224
224225 /* required for usb32 quirk */
225226 #define OHCI_CTRL_HCFS (3 << 6)
drivers/usb/host/xhci-hub.c+1−1
@@ -1434,7 +1434,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, · 1433 unmodified lines
14341434 }
14351435 spin_unlock_irqrestore(&xhci->lock, flags);
14361436 if (!wait_for_completion_timeout(&bus_state->u3exit_done[wIndex],
1437− msecs_to_jiffies(100)))
1437+ msecs_to_jiffies(500)))
14381438 xhci_dbg(xhci, "missing U0 port change event for port %d-%d\n",
14391439 hcd->self.busnum, wIndex + 1);
14401440 spin_lock_irqsave(&xhci->lock, flags);
drivers/usb/host/xhci-pci.c+3−1
@@ -59,6 +59,7 @@ · 58 unmodified lines
5959 #define PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI 0x9a13
6060 #define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI 0x1138
6161 #define PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI 0x461e
62+#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI 0x51ed
6263
6364 #define PCI_DEVICE_ID_AMD_RENOIR_XHCI 0x1639
6465 #define PCI_DEVICE_ID_AMD_PROMONTORYA_4 0x43b9
@@ -266,7 +267,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) · 201 unmodified lines
266267 pdev->device == PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI ||
267268 pdev->device == PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI ||
268269 pdev->device == PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI ||
269− pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI))
270+ pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI ||
271+ pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI))
270272 xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
271273
272274 if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
drivers/usb/host/xhci-ring.c+1−0
@@ -3141,6 +3141,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd) · 3140 unmodified lines
31413141 if (event_loop++ < TRBS_PER_SEGMENT / 2)
31423142 continue;
31433143 xhci_update_erst_dequeue(xhci, event_ring_deq);
3144+ event_ring_deq = xhci->event_ring->dequeue;
31443145
31453146 /* ring is half-full, force isoc trbs to interrupt more often */
31463147 if (xhci->isoc_bei_interval > AVOID_BEI_INTERVAL_MIN)
drivers/usb/host/xhci-tegra.c+2−2
@@ -1034,13 +1034,13 @@ static int tegra_xusb_unpowergate_partitions(struct tegra_xusb *tegra) · 1033 unmodified lines
10341034 int rc;
10351035
10361036 if (tegra->use_genpd) {
1037− rc = pm_runtime_get_sync(tegra->genpd_dev_ss);
1037+ rc = pm_runtime_resume_and_get(tegra->genpd_dev_ss);
10381038 if (rc < 0) {
10391039 dev_err(dev, "failed to enable XUSB SS partition\n");
10401040 return rc;
10411041 }
10421042
1043− rc = pm_runtime_get_sync(tegra->genpd_dev_host);
1043+ rc = pm_runtime_resume_and_get(tegra->genpd_dev_host);
10441044 if (rc < 0) {
10451045 dev_err(dev, "failed to enable XUSB Host partition\n");
10461046 pm_runtime_put_sync(tegra->genpd_dev_ss);
drivers/usb/host/xhci.c+11−0
@@ -781,6 +781,17 @@ void xhci_shutdown(struct usb_hcd *hcd) · 780 unmodified lines
781781 if (xhci->quirks & XHCI_SPURIOUS_REBOOT)
782782 usb_disable_xhci_ports(to_pci_dev(hcd->self.sysdev));
783783
784+ /* Don't poll the roothubs after shutdown. */
785+ xhci_dbg(xhci, "%s: stopping usb%d port polling.\n",
786+ __func__, hcd->self.busnum);
787+ clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
788+ del_timer_sync(&hcd->rh_timer);
789+
790+ if (xhci->shared_hcd) {
791+ clear_bit(HCD_FLAG_POLL_RH, &xhci->shared_hcd->flags);
792+ del_timer_sync(&xhci->shared_hcd->rh_timer);
793+ }
794+
784795 spin_lock_irq(&xhci->lock);
785796 xhci_halt(xhci);
786797 /* Workaround for spurious wakeups at shutdown with HSW */
drivers/usb/misc/qcom_eud.c+5−5
@@ -186,16 +186,16 @@ static int eud_probe(struct platform_device *pdev) · 185 unmodified lines
186186
187187 chip->dev = &pdev->dev;
188188
189− ret = devm_add_action_or_reset(chip->dev, eud_role_switch_release, chip);
190− if (ret)
191− return dev_err_probe(chip->dev, ret,
192− "failed to add role switch release action\n");
193−
194189 chip->role_sw = usb_role_switch_get(&pdev->dev);
195190 if (IS_ERR(chip->role_sw))
196191 return dev_err_probe(chip->dev, PTR_ERR(chip->role_sw),
197192 "failed to get role switch\n");
198193
194+ ret = devm_add_action_or_reset(chip->dev, eud_role_switch_release, chip);
195+ if (ret)
196+ return dev_err_probe(chip->dev, ret,
197+ "failed to add role switch release action\n");
198+
199199 chip->base = devm_platform_ioremap_resource(pdev, 0);
200200 if (IS_ERR(chip->base))
201201 return PTR_ERR(chip->base);
drivers/usb/misc/uss720.c+1−2
@@ -71,6 +71,7 @@ static void destroy_priv(struct kref *kref) · 70 unmodified lines
7171
7272 dev_dbg(&priv->usbdev->dev, "destroying priv datastructure\n");
7373 usb_put_dev(priv->usbdev);
74+ priv->usbdev = NULL;
7475 kfree(priv);
7576 }
7677
@@ -736,7 +737,6 @@ static int uss720_probe(struct usb_interface *intf, · 659 unmodified lines
736737 parport_announce_port(pp);
737738
738739 usb_set_intfdata(intf, pp);
739− usb_put_dev(usbdev);
740740 return 0;
741741
742742 probe_abort:
@@ -754,7 +754,6 @@ static void uss720_disconnect(struct usb_interface *intf) · 11 unmodified lines
754754 usb_set_intfdata(intf, NULL);
755755 if (pp) {
756756 priv = pp->private_data;
757− priv->usbdev = NULL;
758757 priv->pp = NULL;
759758 dev_dbg(&intf->dev, "parport_remove_port\n");
760759 parport_remove_port(pp);
drivers/usb/mtu3/mtu3_dr.c+2−4
@@ -21,10 +21,8 @@ static inline struct ssusb_mtk *otg_sx_to_ssusb(struct otg_switch_mtk *otg_sx) · 20 unmodified lines
2121
2222 static void toggle_opstate(struct ssusb_mtk *ssusb)
2323 {
24− if (!ssusb->otg_switch.is_u3_drd) {
25− mtu3_setbits(ssusb->mac_base, U3D_DEVICE_CONTROL, DC_SESSION);
26− mtu3_setbits(ssusb->mac_base, U3D_POWER_MANAGEMENT, SOFT_CONN);
27− }
24+ mtu3_setbits(ssusb->mac_base, U3D_DEVICE_CONTROL, DC_SESSION);
25+ mtu3_setbits(ssusb->mac_base, U3D_POWER_MANAGEMENT, SOFT_CONN);
2826 }
2927
3028 /* only port0 supports dual-role mode */
drivers/usb/phy/phy-generic.c+7−0
@@ -268,6 +268,13 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop) · 267 unmodified lines
268268 return -EPROBE_DEFER;
269269 }
270270
271+ nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus");
272+ if (PTR_ERR(nop->vbus_draw) == -ENODEV)
273+ nop->vbus_draw = NULL;
274+ if (IS_ERR(nop->vbus_draw))
275+ return dev_err_probe(dev, PTR_ERR(nop->vbus_draw),
276+ "could not get vbus regulator\n");
277+
271278 nop->dev = dev;
272279 nop->phy.dev = nop->dev;
273280 nop->phy.label = "nop-xceiv";
drivers/usb/serial/cp210x.c+2−0
@@ -194,6 +194,8 @@ static const struct usb_device_id id_table[] = { · 193 unmodified lines
194194 { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */
195195 { USB_DEVICE(0x17A8, 0x0001) }, /* Kamstrup Optical Eye/3-wire */
196196 { USB_DEVICE(0x17A8, 0x0005) }, /* Kamstrup M-Bus Master MultiPort 250D */
197+ { USB_DEVICE(0x17A8, 0x0101) }, /* Kamstrup 868 MHz wM-Bus C-Mode Meter Reader (Int Ant) */
198+ { USB_DEVICE(0x17A8, 0x0102) }, /* Kamstrup 868 MHz wM-Bus C-Mode Meter Reader (Ext Ant) */
197199 { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */
198200 { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
199201 { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
drivers/usb/serial/option.c+12−0
@@ -432,6 +432,8 @@ static void option_instat_callback(struct urb *urb); · 431 unmodified lines
432432 #define CINTERION_PRODUCT_CLS8 0x00b0
433433 #define CINTERION_PRODUCT_MV31_MBIM 0x00b3
434434 #define CINTERION_PRODUCT_MV31_RMNET 0x00b7
435+#define CINTERION_PRODUCT_MV32_WA 0x00f1
436+#define CINTERION_PRODUCT_MV32_WB 0x00f2
435437
436438 /* Olivetti products */
437439 #define OLIVETTI_VENDOR_ID 0x0b3c
@@ -1217,6 +1219,10 @@ static const struct usb_device_id option_ids[] = { · 779 unmodified lines
12171219 .driver_info = NCTRL(0) | RSVD(1) },
12181220 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1056, 0xff), /* Telit FD980 */
12191221 .driver_info = NCTRL(2) | RSVD(3) },
1222+ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1057, 0xff), /* Telit FN980 */
1223+ .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
1224+ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1058, 0xff), /* Telit FN980 (PCIe) */
1225+ .driver_info = NCTRL(0) | RSVD(1) },
12201226 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1060, 0xff), /* Telit LN920 (rmnet) */
12211227 .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
12221228 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1061, 0xff), /* Telit LN920 (MBIM) */
@@ -1233,6 +1239,8 @@ static const struct usb_device_id option_ids[] = { · 10 unmodified lines
12331239 .driver_info = NCTRL(2) | RSVD(3) },
12341240 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1073, 0xff), /* Telit FN990 (ECM) */
12351241 .driver_info = NCTRL(0) | RSVD(1) },
1242+ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1075, 0xff), /* Telit FN990 (PCIe) */
1243+ .driver_info = RSVD(0) },
12361244 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910),
12371245 .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) },
12381246 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
@@ -1969,6 +1977,10 @@ static const struct usb_device_id option_ids[] = { · 730 unmodified lines
19691977 .driver_info = RSVD(3)},
19701978 { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_RMNET, 0xff),
19711979 .driver_info = RSVD(0)},
1980+ { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WA, 0xff),
1981+ .driver_info = RSVD(3)},
1982+ { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WB, 0xff),
1983+ .driver_info = RSVD(3)},
19721984 { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100),
19731985 .driver_info = RSVD(4) },
19741986 { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD120),
drivers/usb/serial/whiteheat.c+2−3
@@ -584,9 +584,8 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command, · 583 unmodified lines
584584 switch (command) {
585585 case WHITEHEAT_GET_DTR_RTS:
586586 info = usb_get_serial_port_data(port);
587− memcpy(&info->mcr, command_info->result_buffer,
588− sizeof(struct whiteheat_dr_info));
589− break;
587+ info->mcr = command_info->result_buffer[0];
588+ break;
590589 }
591590 }
592591 exit:
drivers/usb/typec/Kconfig+1−0
@@ -56,6 +56,7 @@ config TYPEC_RT1719 · 55 unmodified lines
5656 tristate "Richtek RT1719 Sink Only Type-C controller driver"
5757 depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH
5858 depends on I2C
59+ depends on POWER_SUPPLY
5960 select REGMAP_I2C
6061 help
6162 Say Y or M here if your system has Richtek RT1719 sink only
drivers/usb/typec/ucsi/ucsi.c+17−7
@@ -949,6 +949,8 @@ static int ucsi_dr_swap(struct typec_port *port, enum typec_data_role role) · 948 unmodified lines
949949 role == TYPEC_HOST))
950950 goto out_unlock;
951951
952+ reinit_completion(&con->complete);
953+
952954 command = UCSI_SET_UOR | UCSI_CONNECTOR_NUMBER(con->num);
953955 command |= UCSI_SET_UOR_ROLE(role);
954956 command |= UCSI_SET_UOR_ACCEPT_ROLE_SWAPS;
@@ -956,14 +958,18 @@ static int ucsi_dr_swap(struct typec_port *port, enum typec_data_role role) · 1 unmodified line
956958 if (ret < 0)
957959 goto out_unlock;
958960
961+ mutex_unlock(&con->lock);
962+
959963 if (!wait_for_completion_timeout(&con->complete,
960− msecs_to_jiffies(UCSI_SWAP_TIMEOUT_MS)))
961− ret = -ETIMEDOUT;
964+ msecs_to_jiffies(UCSI_SWAP_TIMEOUT_MS)))
965+ return -ETIMEDOUT;
966+
967+ return 0;
962968
963969 out_unlock:
964970 mutex_unlock(&con->lock);
965971
966− return ret < 0 ? ret : 0;
972+ return ret;
967973 }
968974
969975 static int ucsi_pr_swap(struct typec_port *port, enum typec_role role)
@@ -985,6 +991,8 @@ static int ucsi_pr_swap(struct typec_port *port, enum typec_role role) · 15 unmodified lines
985991 if (cur_role == role)
986992 goto out_unlock;
987993
994+ reinit_completion(&con->complete);
995+
988996 command = UCSI_SET_PDR | UCSI_CONNECTOR_NUMBER(con->num);
989997 command |= UCSI_SET_PDR_ROLE(role);
990998 command |= UCSI_SET_PDR_ACCEPT_ROLE_SWAPS;
@@ -992,11 +1000,13 @@ static int ucsi_pr_swap(struct typec_port *port, enum typec_role role) · 1 unmodified line
9921000 if (ret < 0)
9931001 goto out_unlock;
9941002
1003+ mutex_unlock(&con->lock);
1004+
9951005 if (!wait_for_completion_timeout(&con->complete,
996− msecs_to_jiffies(UCSI_SWAP_TIMEOUT_MS))) {
997− ret = -ETIMEDOUT;
998− goto out_unlock;
999− }
1006+ msecs_to_jiffies(UCSI_SWAP_TIMEOUT_MS)))
1007+ return -ETIMEDOUT;
1008+
1009+ mutex_lock(&con->lock);
10001010
10011011 /* Something has gone wrong while swapping the role */
10021012 if (UCSI_CONSTAT_PWR_OPMODE(con->status.flags) !=
drivers/vfio/pci/vfio_pci_core.c+74−50
@@ -36,6 +36,10 @@ static bool nointxmask; · 35 unmodified lines
3636 static bool disable_vga;
3737 static bool disable_idle_d3;
3838
39+/* List of PF's that vfio_pci_core_sriov_configure() has been called on */
40+static DEFINE_MUTEX(vfio_pci_sriov_pfs_mutex);
41+static LIST_HEAD(vfio_pci_sriov_pfs);
42+
3943 static inline bool vfio_vga_disabled(void)
4044 {
4145 #ifdef CONFIG_VFIO_PCI_VGA
@@ -434,47 +438,17 @@ out: · 392 unmodified lines
434438 }
435439 EXPORT_SYMBOL_GPL(vfio_pci_core_disable);
436440
437−static struct vfio_pci_core_device *get_pf_vdev(struct vfio_pci_core_device *vdev)
438−{
439− struct pci_dev *physfn = pci_physfn(vdev->pdev);
440− struct vfio_device *pf_dev;
441−
442− if (!vdev->pdev->is_virtfn)
443− return NULL;
444−
445− pf_dev = vfio_device_get_from_dev(&physfn->dev);
446− if (!pf_dev)
447− return NULL;
448−
449− if (pci_dev_driver(physfn) != pci_dev_driver(vdev->pdev)) {
450− vfio_device_put(pf_dev);
451− return NULL;
452− }
453−
454− return container_of(pf_dev, struct vfio_pci_core_device, vdev);
455−}
456−
457−static void vfio_pci_vf_token_user_add(struct vfio_pci_core_device *vdev, int val)
458−{
459− struct vfio_pci_core_device *pf_vdev = get_pf_vdev(vdev);
460−
461− if (!pf_vdev)
462− return;
463−
464− mutex_lock(&pf_vdev->vf_token->lock);
465− pf_vdev->vf_token->users += val;
466− WARN_ON(pf_vdev->vf_token->users < 0);
467− mutex_unlock(&pf_vdev->vf_token->lock);
468−
469− vfio_device_put(&pf_vdev->vdev);
470−}
471−
472441 void vfio_pci_core_close_device(struct vfio_device *core_vdev)
473442 {
474443 struct vfio_pci_core_device *vdev =
475444 container_of(core_vdev, struct vfio_pci_core_device, vdev);
476445
477− vfio_pci_vf_token_user_add(vdev, -1);
446+ if (vdev->sriov_pf_core_dev) {
447+ mutex_lock(&vdev->sriov_pf_core_dev->vf_token->lock);
448+ WARN_ON(!vdev->sriov_pf_core_dev->vf_token->users);
449+ vdev->sriov_pf_core_dev->vf_token->users--;
450+ mutex_unlock(&vdev->sriov_pf_core_dev->vf_token->lock);
451+ }
478452 vfio_spapr_pci_eeh_release(vdev->pdev);
479453 vfio_pci_core_disable(vdev);
480454
@@ -495,7 +469,12 @@ void vfio_pci_core_finish_enable(struct vfio_pci_core_device *vdev) · 14 unmodified lines
495469 {
496470 vfio_pci_probe_mmaps(vdev);
497471 vfio_spapr_pci_eeh_open(vdev->pdev);
498− vfio_pci_vf_token_user_add(vdev, 1);
472+
473+ if (vdev->sriov_pf_core_dev) {
474+ mutex_lock(&vdev->sriov_pf_core_dev->vf_token->lock);
475+ vdev->sriov_pf_core_dev->vf_token->users++;
476+ mutex_unlock(&vdev->sriov_pf_core_dev->vf_token->lock);
477+ }
499478 }
500479 EXPORT_SYMBOL_GPL(vfio_pci_core_finish_enable);
501480
@@ -1583,11 +1562,8 @@ static int vfio_pci_validate_vf_token(struct vfio_pci_core_device *vdev, · 1081 unmodified lines
15831562 *
15841563 * If the VF token is provided but unused, an error is generated.
15851564 */
1586− if (!vdev->pdev->is_virtfn && !vdev->vf_token && !vf_token)
1587− return 0; /* No VF token provided or required */
1588−
15891565 if (vdev->pdev->is_virtfn) {
1590− struct vfio_pci_core_device *pf_vdev = get_pf_vdev(vdev);
1566+ struct vfio_pci_core_device *pf_vdev = vdev->sriov_pf_core_dev;
15911567 bool match;
15921568
15931569 if (!pf_vdev) {
@@ -1600,7 +1576,6 @@ static int vfio_pci_validate_vf_token(struct vfio_pci_core_device *vdev, · 6 unmodified lines
16001576 }
16011577
16021578 if (!vf_token) {
1603− vfio_device_put(&pf_vdev->vdev);
16041579 pci_info_ratelimited(vdev->pdev,
16051580 "VF token required to access device\n");
16061581 return -EACCES;
@@ -1610,8 +1585,6 @@ static int vfio_pci_validate_vf_token(struct vfio_pci_core_device *vdev, · 3 unmodified lines
16101585 match = uuid_equal(uuid, &pf_vdev->vf_token->uuid);
16111586 mutex_unlock(&pf_vdev->vf_token->lock);
16121587
1613− vfio_device_put(&pf_vdev->vdev);
1614−
16151588 if (!match) {
16161589 pci_info_ratelimited(vdev->pdev,
16171590 "Incorrect VF token provided for device\n");
@@ -1732,8 +1705,30 @@ static int vfio_pci_bus_notifier(struct notifier_block *nb, · 114 unmodified lines
17321705 static int vfio_pci_vf_init(struct vfio_pci_core_device *vdev)
17331706 {
17341707 struct pci_dev *pdev = vdev->pdev;
1708+ struct vfio_pci_core_device *cur;
1709+ struct pci_dev *physfn;
17351710 int ret;
17361711
1712+ if (pdev->is_virtfn) {
1713+ /*
1714+ * If this VF was created by our vfio_pci_core_sriov_configure()
1715+ * then we can find the PF vfio_pci_core_device now, and due to
1716+ * the locking in pci_disable_sriov() it cannot change until
1717+ * this VF device driver is removed.
1718+ */
1719+ physfn = pci_physfn(vdev->pdev);
1720+ mutex_lock(&vfio_pci_sriov_pfs_mutex);
1721+ list_for_each_entry(cur, &vfio_pci_sriov_pfs, sriov_pfs_item) {
1722+ if (cur->pdev == physfn) {
1723+ vdev->sriov_pf_core_dev = cur;
1724+ break;
1725+ }
1726+ }
1727+ mutex_unlock(&vfio_pci_sriov_pfs_mutex);
1728+ return 0;
1729+ }
1730+
1731+ /* Not a SRIOV PF */
17371732 if (!pdev->is_physfn)
17381733 return 0;
17391734
@@ -1805,6 +1800,7 @@ void vfio_pci_core_init_device(struct vfio_pci_core_device *vdev, · 65 unmodified lines
18051800 INIT_LIST_HEAD(&vdev->ioeventfds_list);
18061801 mutex_init(&vdev->vma_lock);
18071802 INIT_LIST_HEAD(&vdev->vma_list);
1803+ INIT_LIST_HEAD(&vdev->sriov_pfs_item);
18081804 init_rwsem(&vdev->memory_lock);
18091805 }
18101806 EXPORT_SYMBOL_GPL(vfio_pci_core_init_device);
@@ -1896,7 +1892,7 @@ void vfio_pci_core_unregister_device(struct vfio_pci_core_device *vdev) · 85 unmodified lines
18961892 {
18971893 struct pci_dev *pdev = vdev->pdev;
18981894
1899− pci_disable_sriov(pdev);
1895+ vfio_pci_core_sriov_configure(pdev, 0);
19001896
19011897 vfio_unregister_group_dev(&vdev->vdev);
19021898
@@ -1935,21 +1931,49 @@ EXPORT_SYMBOL_GPL(vfio_pci_core_aer_err_detected); · 32 unmodified lines
19351931
19361932 int vfio_pci_core_sriov_configure(struct pci_dev *pdev, int nr_virtfn)
19371933 {
1934+ struct vfio_pci_core_device *vdev;
19381935 struct vfio_device *device;
19391936 int ret = 0;
19401937
1938+ device_lock_assert(&pdev->dev);
1939+
19411940 device = vfio_device_get_from_dev(&pdev->dev);
19421941 if (!device)
19431942 return -ENODEV;
19441943
1945− if (nr_virtfn == 0)
1946− pci_disable_sriov(pdev);
1947− else
1944+ vdev = container_of(device, struct vfio_pci_core_device, vdev);
1945+
1946+ if (nr_virtfn) {
1947+ mutex_lock(&vfio_pci_sriov_pfs_mutex);
1948+ /*
1949+ * The thread that adds the vdev to the list is the only thread
1950+ * that gets to call pci_enable_sriov() and we will only allow
1951+ * it to be called once without going through
1952+ * pci_disable_sriov()
1953+ */
1954+ if (!list_empty(&vdev->sriov_pfs_item)) {
1955+ ret = -EINVAL;
1956+ goto out_unlock;
1957+ }
1958+ list_add_tail(&vdev->sriov_pfs_item, &vfio_pci_sriov_pfs);
1959+ mutex_unlock(&vfio_pci_sriov_pfs_mutex);
19481960 ret = pci_enable_sriov(pdev, nr_virtfn);
1961+ if (ret)
1962+ goto out_del;
1963+ ret = nr_virtfn;
1964+ goto out_put;
1965+ }
19491966
1950− vfio_device_put(device);
1967+ pci_disable_sriov(pdev);
19511968
1952− return ret < 0 ? ret : nr_virtfn;
1969+out_del:
1970+ mutex_lock(&vfio_pci_sriov_pfs_mutex);
1971+ list_del_init(&vdev->sriov_pfs_item);
1972+out_unlock:
1973+ mutex_unlock(&vfio_pci_sriov_pfs_mutex);
1974+out_put:
1975+ vfio_device_put(device);
1976+ return ret;
19531977 }
19541978 EXPORT_SYMBOL_GPL(vfio_pci_core_sriov_configure);
19551979
drivers/video/fbdev/arkfb.c+3−0
@@ -566,6 +566,9 @@ static int arkfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) · 565 unmodified lines
566566 {
567567 int rv, mem, step;
568568
569+ if (!var->pixclock)
570+ return -EINVAL;
571+
569572 /* Find appropriate format */
570573 rv = svga_match_format (arkfb_formats, var, NULL);
571574 if (rv < 0)
drivers/video/fbdev/aty/aty128fb.c+0−1
@@ -68,7 +68,6 @@ · 67 unmodified lines
6868 #ifdef CONFIG_PPC_PMAC
6969 #include <asm/machdep.h>
7070 #include <asm/pmac_feature.h>
71−#include <asm/prom.h>
7271 #include "../macmodes.h"
7372 #endif
7473
drivers/video/fbdev/aty/atyfb_base.c+0−1
@@ -79,7 +79,6 @@ · 78 unmodified lines
7979
8080 #ifdef __powerpc__
8181 #include <asm/machdep.h>
82−#include <asm/prom.h>
8382 #include "../macmodes.h"
8483 #endif
8584 #ifdef __sparc__
drivers/video/fbdev/aty/radeon_pm.c+0−1
@@ -22,7 +22,6 @@ · 21 unmodified lines
2222
2323 #ifdef CONFIG_PPC_PMAC
2424 #include <asm/machdep.h>
25−#include <asm/prom.h>
2625 #include <asm/pmac_feature.h>
2726 #endif
2827
drivers/video/fbdev/aty/radeonfb.h+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
2121
2222 #include <asm/io.h>
2323
24−#if defined(CONFIG_PPC) || defined(CONFIG_SPARC)
24+#ifdef CONFIG_SPARC
2525 #include <asm/prom.h>
2626 #endif
2727
drivers/video/fbdev/clps711x-fb.c+1−2
@@ -268,8 +268,7 @@ static int clps711x_fb_probe(struct platform_device *pdev) · 267 unmodified lines
268268 goto out_fb_release;
269269 }
270270
271− cfb->syscon =
272− syscon_regmap_lookup_by_compatible("cirrus,ep7209-syscon1");
271+ cfb->syscon = syscon_regmap_lookup_by_phandle(np, "syscon");
273272 if (IS_ERR(cfb->syscon)) {
274273 ret = PTR_ERR(cfb->syscon);
275274 goto out_fb_release;
drivers/video/fbdev/controlfb.c+0−3
@@ -47,9 +47,6 @@ · 46 unmodified lines
4747 #include <linux/nvram.h>
4848 #include <linux/adb.h>
4949 #include <linux/cuda.h>
50−#ifdef CONFIG_PPC_PMAC
51−#include <asm/prom.h>
52−#endif
5350 #ifdef CONFIG_BOOTX_TEXT
5451 #include <asm/btext.h>
5552 #endif
drivers/video/fbdev/i740fb.c+4−1
@@ -657,6 +657,9 @@ static int i740fb_decode_var(const struct fb_var_screeninfo *var, · 656 unmodified lines
657657
658658 static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
659659 {
660+ if (!var->pixclock)
661+ return -EINVAL;
662+
660663 switch (var->bits_per_pixel) {
661664 case 8:
662665 var->red.offset = var->green.offset = var->blue.offset = 0;
@@ -740,7 +743,7 @@ static int i740fb_set_par(struct fb_info *info) · 77 unmodified lines
740743 if (i)
741744 return i;
742745
743− memset(info->screen_base, 0, info->screen_size);
746+ memset_io(info->screen_base, 0, info->screen_size);
744747
745748 vga_protect(par);
746749
drivers/video/fbdev/imxfb.c+2−0
@@ -925,10 +925,12 @@ static int imxfb_probe(struct platform_device *pdev) · 924 unmodified lines
925925 sizeof(struct imx_fb_videomode), GFP_KERNEL);
926926 if (!fbi->mode) {
927927 ret = -ENOMEM;
928+ of_node_put(display_np);
928929 goto failed_of_parse;
929930 }
930931
931932 ret = imxfb_of_read_mode(&pdev->dev, display_np, fbi->mode);
933+ of_node_put(display_np);
932934 if (ret)
933935 goto failed_of_parse;
934936 }
drivers/video/fbdev/kyro/fbdev.c+2−0
@@ -494,6 +494,8 @@ static int kyrofb_set_par(struct fb_info *info) · 493 unmodified lines
494494 info->var.hsync_len +
495495 info->var.left_margin)) / 1000;
496496
497+ if (!lineclock)
498+ return -EINVAL;
497499
498500 /* time for a frame in ns (precision in 32bpp) */
499501 frameclock = lineclock * (info->var.yres +
drivers/video/fbdev/matrox/matroxfb_base.h+0−1
@@ -47,7 +47,6 @@ · 46 unmodified lines
4747 #include <asm/unaligned.h>
4848
4949 #if defined(CONFIG_PPC_PMAC)
50−#include <asm/prom.h>
5150 #include "../macmodes.h"
5251 #endif
5352
drivers/video/fbdev/mb862xx/mb862xxfbdrv.c+2−0
@@ -18,6 +18,8 @@ · 17 unmodified lines
1818 #include <linux/interrupt.h>
1919 #include <linux/pci.h>
2020 #if defined(CONFIG_OF)
21+#include <linux/of_address.h>
22+#include <linux/of_irq.h>
2123 #include <linux/of_platform.h>
2224 #endif
2325 #include "mb862xxfb.h"
drivers/video/fbdev/mmp/core.c+5−6
@@ -127,19 +127,18 @@ EXPORT_SYMBOL_GPL(mmp_unregister_panel); · 126 unmodified lines
127127 */
128128 struct mmp_path *mmp_get_path(const char *name)
129129 {
130− struct mmp_path *path;
131− int found = 0;
130+ struct mmp_path *path = NULL, *iter;
132131
133132 mutex_lock(&disp_lock);
134− list_for_each_entry(path, &path_list, node) {
135− if (!strcmp(name, path->name)) {
136− found = 1;
133+ list_for_each_entry(iter, &path_list, node) {
134+ if (!strcmp(name, iter->name)) {
135+ path = iter;
137136 break;
138137 }
139138 }
140139 mutex_unlock(&disp_lock);
141140
142− return found ? path : NULL;
141+ return path;
143142 }
144143 EXPORT_SYMBOL_GPL(mmp_get_path);
145144
drivers/video/fbdev/neofb.c+1−1
@@ -585,7 +585,7 @@ neofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) · 584 unmodified lines
585585
586586 DBG("neofb_check_var");
587587
588− if (var->pixclock && PICOS2KHZ(var->pixclock) > par->maxClock)
588+ if (!var->pixclock || PICOS2KHZ(var->pixclock) > par->maxClock)
589589 return -EINVAL;
590590
591591 /* Is the mode larger than the LCD panel? */
drivers/video/fbdev/omap/hwa742.c+3−3
@@ -964,7 +964,7 @@ static int hwa742_init(struct omapfb_device *fbdev, int ext_mode, · 963 unmodified lines
964964 if ((r = calc_extif_timings(ext_clk, &extif_mem_div)) < 0)
965965 goto err3;
966966 hwa742.extif->set_timings(&hwa742.reg_timings);
967− clk_enable(hwa742.sys_ck);
967+ clk_prepare_enable(hwa742.sys_ck);
968968
969969 calc_hwa742_clk_rates(ext_clk, &sys_clk, &pix_clk);
970970 if ((r = calc_extif_timings(sys_clk, &extif_mem_div)) < 0)
@@ -1023,7 +1023,7 @@ static int hwa742_init(struct omapfb_device *fbdev, int ext_mode, · 52 unmodified lines
10231023
10241024 return 0;
10251025 err4:
1026− clk_disable(hwa742.sys_ck);
1026+ clk_disable_unprepare(hwa742.sys_ck);
10271027 err3:
10281028 hwa742.extif->cleanup();
10291029 err2:
@@ -1037,7 +1037,7 @@ static void hwa742_cleanup(void) · 7 unmodified lines
10371037 hwa742_set_update_mode(OMAPFB_UPDATE_DISABLED);
10381038 hwa742.extif->cleanup();
10391039 hwa742.int_ctrl->cleanup();
1040− clk_disable(hwa742.sys_ck);
1040+ clk_disable_unprepare(hwa742.sys_ck);
10411041 }
10421042
10431043 struct lcd_ctrl hwa742_ctrl = {
drivers/video/fbdev/omap/lcdc.c+3−3
@@ -711,7 +711,7 @@ static int omap_lcdc_init(struct omapfb_device *fbdev, int ext_mode, · 710 unmodified lines
711711 dev_err(fbdev->dev, "failed to adjust LCD rate\n");
712712 goto fail1;
713713 }
714− clk_enable(lcdc.lcd_ck);
714+ clk_prepare_enable(lcdc.lcd_ck);
715715
716716 r = request_irq(OMAP_LCDC_IRQ, lcdc_irq_handler, 0, MODULE_NAME, fbdev);
717717 if (r) {
@@ -746,7 +746,7 @@ fail4: · 28 unmodified lines
746746 fail3:
747747 free_irq(OMAP_LCDC_IRQ, lcdc.fbdev);
748748 fail2:
749− clk_disable(lcdc.lcd_ck);
749+ clk_disable_unprepare(lcdc.lcd_ck);
750750 fail1:
751751 clk_put(lcdc.lcd_ck);
752752 fail0:
@@ -760,7 +760,7 @@ static void omap_lcdc_cleanup(void) · 7 unmodified lines
760760 free_fbmem();
761761 omap_free_lcd_dma();
762762 free_irq(OMAP_LCDC_IRQ, lcdc.fbdev);
763− clk_disable(lcdc.lcd_ck);
763+ clk_disable_unprepare(lcdc.lcd_ck);
764764 clk_put(lcdc.lcd_ck);
765765 }
766766
drivers/video/fbdev/omap/sossi.c+3−2
@@ -598,7 +598,7 @@ static int sossi_init(struct omapfb_device *fbdev) · 597 unmodified lines
598598 l &= ~CONF_SOSSI_RESET_R;
599599 omap_writel(l, MOD_CONF_CTRL_1);
600600
601− clk_enable(sossi.fck);
601+ clk_prepare_enable(sossi.fck);
602602 l = omap_readl(ARM_IDLECT2);
603603 l &= ~(1 << 8); /* DMACK_REQ */
604604 omap_writel(l, ARM_IDLECT2);
@@ -649,7 +649,7 @@ static int sossi_init(struct omapfb_device *fbdev) · 44 unmodified lines
649649 return 0;
650650
651651 err:
652− clk_disable(sossi.fck);
652+ clk_disable_unprepare(sossi.fck);
653653 clk_put(sossi.fck);
654654 return r;
655655 }
@@ -657,6 +657,7 @@ err: · 1 unmodified line
657657 static void sossi_cleanup(void)
658658 {
659659 omap_lcdc_free_dma_callback();
660+ clk_unprepare(sossi.fck);
660661 clk_put(sossi.fck);
661662 iounmap(sossi.base);
662663 }
drivers/video/fbdev/platinumfb.c+1−1
@@ -30,9 +30,9 @@ · 29 unmodified lines
3030 #include <linux/fb.h>
3131 #include <linux/init.h>
3232 #include <linux/nvram.h>
33+#include <linux/of_address.h>
3334 #include <linux/of_device.h>
3435 #include <linux/of_platform.h>
35−#include <asm/prom.h>
3636
3737 #include "macmodes.h"
3838 #include "platinumfb.h"
drivers/video/fbdev/pm2fb.c+2−6
@@ -1504,9 +1504,7 @@ static const struct fb_ops pm2fb_ops = { · 1503 unmodified lines
15041504
15051505
15061506 /**
1507− * Device initialisation
1508− *
1509− * Initialise and allocate resource for PCI device.
1507+ * pm2fb_probe - Initialise and allocate resource for PCI device.
15101508 *
15111509 * @pdev: PCI device.
15121510 * @id: PCI device ID.
@@ -1711,9 +1709,7 @@ static int pm2fb_probe(struct pci_dev *pdev, const struct pci_device_id *id) · 198 unmodified lines
17111709 }
17121710
17131711 /**
1714− * Device removal.
1715− *
1716− * Release all device resources.
1712+ * pm2fb_remove - Release all device resources.
17171713 *
17181714 * @pdev: PCI device to clean up.
17191715 */
drivers/video/fbdev/pxafb.c+2−2
@@ -2256,10 +2256,10 @@ static int pxafb_probe(struct platform_device *dev) · 2255 unmodified lines
22562256 goto failed;
22572257 for (i = 0; i < inf->num_modes; i++)
22582258 inf->modes[i] = pdata->modes[i];
2259+ } else {
2260+ inf = of_pxafb_of_mach_info(&dev->dev);
22592261 }
22602262
2261− if (!pdata)
2262− inf = of_pxafb_of_mach_info(&dev->dev);
22632263 if (IS_ERR_OR_NULL(inf))
22642264 goto failed;
22652265
drivers/video/fbdev/s3fb.c+3−0
@@ -549,6 +549,9 @@ static int s3fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) · 548 unmodified lines
549549 int rv, mem, step;
550550 u16 m, n, r;
551551
552+ if (!var->pixclock)
553+ return -EINVAL;
554+
552555 /* Find appropriate format */
553556 rv = svga_match_format (s3fb_formats, var, NULL);
554557
drivers/video/fbdev/sh_mobile_lcdcfb.c+0−3
@@ -531,9 +531,6 @@ static void sh_mobile_lcdc_display_off(struct sh_mobile_lcdc_chan *ch) · 530 unmodified lines
531531 ch->tx_dev->ops->display_off(ch->tx_dev);
532532 }
533533
534−static int sh_mobile_lcdc_check_var(struct fb_var_screeninfo *var,
535− struct fb_info *info);
536−
537534 /* -----------------------------------------------------------------------------
538535 * Format helpers
539536 */
drivers/video/fbdev/sis/sis_main.c+1−1
@@ -4463,7 +4463,7 @@ static void sisfb_post_sis300(struct pci_dev *pdev) · 4462 unmodified lines
44634463 SiS_SetReg(SISCR, 0x37, 0x02);
44644464 SiS_SetReg(SISPART2, 0x00, 0x1c);
44654465 v4 = 0x00; v5 = 0x00; v6 = 0x10;
4466− if(ivideo->SiS_Pr.UseROM) {
4466+ if (ivideo->SiS_Pr.UseROM && bios) {
44674467 v4 = bios[0xf5];
44684468 v5 = bios[0xf6];
44694469 v6 = bios[0xf7];
drivers/video/fbdev/tridentfb.c+3−0
@@ -996,6 +996,9 @@ static int tridentfb_check_var(struct fb_var_screeninfo *var, · 995 unmodified lines
996996 int ramdac = 230000; /* 230MHz for most 3D chips */
997997 debug("enter\n");
998998
999+ if (!var->pixclock)
1000+ return -EINVAL;
1001+
9991002 /* check color depth */
10001003 if (bpp == 24)
10011004 bpp = var->bits_per_pixel = 32;
drivers/video/fbdev/udlfb.c+12−2
@@ -1650,8 +1650,9 @@ static int dlfb_usb_probe(struct usb_interface *intf, · 1649 unmodified lines
16501650 const struct device_attribute *attr;
16511651 struct dlfb_data *dlfb;
16521652 struct fb_info *info;
1653− int retval = -ENOMEM;
1653+ int retval;
16541654 struct usb_device *usbdev = interface_to_usbdev(intf);
1655+ struct usb_endpoint_descriptor *out;
16551656
16561657 /* usb initialization */
16571658 dlfb = kzalloc(sizeof(*dlfb), GFP_KERNEL);
@@ -1665,6 +1666,12 @@ static int dlfb_usb_probe(struct usb_interface *intf, · 7 unmodified lines
16651666 dlfb->udev = usb_get_dev(usbdev);
16661667 usb_set_intfdata(intf, dlfb);
16671668
1669+ retval = usb_find_common_endpoints(intf->cur_altsetting, NULL, &out, NULL, NULL);
1670+ if (retval) {
1671+ dev_err(&intf->dev, "Device should have at lease 1 bulk endpoint!\n");
1672+ goto error;
1673+ }
1674+
16681675 dev_dbg(&intf->dev, "console enable=%d\n", console);
16691676 dev_dbg(&intf->dev, "fb_defio enable=%d\n", fb_defio);
16701677 dev_dbg(&intf->dev, "shadow enable=%d\n", shadow);
@@ -1674,6 +1681,7 @@ static int dlfb_usb_probe(struct usb_interface *intf, · 3 unmodified lines
16741681 if (!dlfb_parse_vendor_descriptor(dlfb, intf)) {
16751682 dev_err(&intf->dev,
16761683 "firmware not recognized, incompatible device?\n");
1684+ retval = -ENODEV;
16771685 goto error;
16781686 }
16791687
@@ -1687,8 +1695,10 @@ static int dlfb_usb_probe(struct usb_interface *intf, · 7 unmodified lines
16871695
16881696 /* allocates framebuffer driver structure, not framebuffer memory */
16891697 info = framebuffer_alloc(0, &dlfb->udev->dev);
1690− if (!info)
1698+ if (!info) {
1699+ retval = -ENOMEM;
16911700 goto error;
1701+ }
16921702
16931703 dlfb->info = info;
16941704 info->par = dlfb;
drivers/video/fbdev/valkyriefb.c+1−2
@@ -54,10 +54,9 @@ · 53 unmodified lines
5454 #include <linux/nvram.h>
5555 #include <linux/adb.h>
5656 #include <linux/cuda.h>
57+#include <linux/of_address.h>
5758 #ifdef CONFIG_MAC
5859 #include <asm/macintosh.h>
59−#else
60−#include <asm/prom.h>
6160 #endif
6261
6362 #include "macmodes.h"
drivers/video/fbdev/vt8623fb.c+3−0
@@ -321,6 +321,9 @@ static int vt8623fb_check_var(struct fb_var_screeninfo *var, struct fb_info *inf · 320 unmodified lines
321321 {
322322 int rv, mem, step;
323323
324+ if (!var->pixclock)
325+ return -EINVAL;
326+
324327 /* Find appropriate format */
325328 rv = svga_match_format (vt8623fb_formats, var, NULL);
326329 if (rv < 0)
drivers/video/of_display_timing.c+1−1
@@ -199,7 +199,7 @@ struct display_timings *of_get_display_timings(const struct device_node *np) · 198 unmodified lines
199199 struct display_timing *dt;
200200 int r;
201201
202− dt = kzalloc(sizeof(*dt), GFP_KERNEL);
202+ dt = kmalloc(sizeof(*dt), GFP_KERNEL);
203203 if (!dt) {
204204 pr_err("%pOF: could not allocate display_timing struct\n",
205205 np);
drivers/xen/balloon.c+23−31
@@ -689,29 +689,34 @@ void xen_free_ballooned_pages(unsigned int nr_pages, struct page **pages) · 688 unmodified lines
689689 }
690690 EXPORT_SYMBOL(xen_free_ballooned_pages);
691691
692−#if defined(CONFIG_XEN_PV) && !defined(CONFIG_XEN_UNPOPULATED_ALLOC)
693−static void __init balloon_add_region(unsigned long start_pfn,
694− unsigned long pages)
692+static void __init balloon_add_regions(void)
695693 {
694+#if defined(CONFIG_XEN_PV)
695+ unsigned long start_pfn, pages;
696696 unsigned long pfn, extra_pfn_end;
697+ unsigned int i;
697698
698− /*
699− * If the amount of usable memory has been limited (e.g., with
700− * the 'mem' command line parameter), don't add pages beyond
701− * this limit.
702− */
703− extra_pfn_end = min(max_pfn, start_pfn + pages);
699+ for (i = 0; i < XEN_EXTRA_MEM_MAX_REGIONS; i++) {
700+ pages = xen_extra_mem[i].n_pfns;
701+ if (!pages)
702+ continue;
704703
705− for (pfn = start_pfn; pfn < extra_pfn_end; pfn++) {
706− /* totalram_pages and totalhigh_pages do not
707− include the boot-time balloon extension, so
708− don't subtract from it. */
709− balloon_append(pfn_to_page(pfn));
710− }
704+ start_pfn = xen_extra_mem[i].start_pfn;
711705
712− balloon_stats.total_pages += extra_pfn_end - start_pfn;
713−}
706+ /*
707+ * If the amount of usable memory has been limited (e.g., with
708+ * the 'mem' command line parameter), don't add pages beyond
709+ * this limit.
710+ */
711+ extra_pfn_end = min(max_pfn, start_pfn + pages);
712+
713+ for (pfn = start_pfn; pfn < extra_pfn_end; pfn++)
714+ balloon_append(pfn_to_page(pfn));
715+
716+ balloon_stats.total_pages += extra_pfn_end - start_pfn;
717+ }
714718 #endif
719+}
715720
716721 static int __init balloon_init(void)
717722 {
@@ -745,20 +750,7 @@ static int __init balloon_init(void) · 27 unmodified lines
745750 register_sysctl_table(xen_root);
746751 #endif
747752
748−#if defined(CONFIG_XEN_PV) && !defined(CONFIG_XEN_UNPOPULATED_ALLOC)
749− {
750− int i;
751−
752− /*
753− * Initialize the balloon with pages from the extra memory
754− * regions (see arch/x86/xen/setup.c).
755− */
756− for (i = 0; i < XEN_EXTRA_MEM_MAX_REGIONS; i++)
757− if (xen_extra_mem[i].n_pfns)
758− balloon_add_region(xen_extra_mem[i].start_pfn,
759− xen_extra_mem[i].n_pfns);
760− }
761−#endif
753+ balloon_add_regions();
762754
763755 task = kthread_run(balloon_thread, NULL, "xen-balloon");
764756 if (IS_ERR(task)) {
drivers/xen/gntalloc.c+2−2
@@ -178,9 +178,9 @@ static void __del_gref(struct gntalloc_gref *gref) · 177 unmodified lines
178178 unsigned long addr;
179179
180180 if (gref->notify.flags & UNMAP_NOTIFY_CLEAR_BYTE) {
181− uint8_t *tmp = kmap(gref->page);
181+ uint8_t *tmp = kmap_local_page(gref->page);
182182 tmp[gref->notify.pgoff] = 0;
183− kunmap(gref->page);
183+ kunmap_local(tmp);
184184 }
185185 if (gref->notify.flags & UNMAP_NOTIFY_SEND_EVENT) {
186186 notify_remote_via_evtchn(gref->notify.event);
drivers/xen/unpopulated-alloc.c+0−33
@@ -230,39 +230,6 @@ void xen_free_unpopulated_pages(unsigned int nr_pages, struct page **pages) · 229 unmodified lines
230230 }
231231 EXPORT_SYMBOL(xen_free_unpopulated_pages);
232232
233−#ifdef CONFIG_XEN_PV
234−static int __init init(void)
235−{
236− unsigned int i;
237−
238− if (!xen_domain())
239− return -ENODEV;
240−
241− if (!xen_pv_domain())
242− return 0;
243−
244− /*
245− * Initialize with pages from the extra memory regions (see
246− * arch/x86/xen/setup.c).
247− */
248− for (i = 0; i < XEN_EXTRA_MEM_MAX_REGIONS; i++) {
249− unsigned int j;
250−
251− for (j = 0; j < xen_extra_mem[i].n_pfns; j++) {
252− struct page *pg =
253− pfn_to_page(xen_extra_mem[i].start_pfn + j);
254−
255− pg->zone_device_data = page_list;
256− page_list = pg;
257− list_count++;
258− }
259− }
260−
261− return 0;
262−}
263−subsys_initcall(init);
264−#endif
265−
266233 static int __init unpopulated_init(void)
267234 {
268235 int ret;
fs/afs/write.c+1−2
@@ -616,8 +616,7 @@ static ssize_t afs_write_back_from_locked_folio(struct address_space *mapping, · 615 unmodified lines
616616 _debug("write discard %x @%llx [%llx]", len, start, i_size);
617617
618618 /* The dirty region was entirely beyond the EOF. */
619− fscache_clear_page_bits(afs_vnode_cache(vnode),
620− mapping, start, len, caching);
619+ fscache_clear_page_bits(mapping, start, len, caching);
621620 afs_pages_written_back(vnode, start, len);
622621 ret = 0;
623622 }
fs/binfmt_elf.c+2−2
@@ -1117,11 +1117,11 @@ out_free_interp: · 1116 unmodified lines
11171117 * independently randomized mmap region (0 load_bias
11181118 * without MAP_FIXED nor MAP_FIXED_NOREPLACE).
11191119 */
1120− alignment = maximum_alignment(elf_phdata, elf_ex->e_phnum);
1121− if (interpreter || alignment > ELF_MIN_ALIGN) {
1120+ if (interpreter) {
11221121 load_bias = ELF_ET_DYN_BASE;
11231122 if (current->flags & PF_RANDOMIZE)
11241123 load_bias += arch_mmap_rnd();
1124+ alignment = maximum_alignment(elf_phdata, elf_ex->e_phnum);
11251125 if (alignment)
11261126 load_bias &= ~(alignment - 1);
11271127 elf_flags |= MAP_FIXED_NOREPLACE;
fs/btrfs/block-group.c+27−13
@@ -2503,12 +2503,6 @@ struct btrfs_block_group *btrfs_make_block_group(struct btrfs_trans_handle *tran · 2502 unmodified lines
25032503 return ERR_PTR(ret);
25042504 }
25052505
2506− /*
2507− * New block group is likely to be used soon. Try to activate it now.
2508− * Failure is OK for now.
2509− */
2510− btrfs_zone_activate(cache);
2511−
25122506 ret = exclude_super_stripes(cache);
25132507 if (ret) {
25142508 /* We may have excluded something, so call this just in case */
@@ -2946,7 +2940,6 @@ int btrfs_start_dirty_block_groups(struct btrfs_trans_handle *trans) · 431 unmodified lines
29462940 struct btrfs_path *path = NULL;
29472941 LIST_HEAD(dirty);
29482942 struct list_head *io = &cur_trans->io_bgs;
2949− int num_started = 0;
29502943 int loops = 0;
29512944
29522945 spin_lock(&cur_trans->dirty_bgs_lock);
@@ -3012,7 +3005,6 @@ again: · 59 unmodified lines
30123005 cache->io_ctl.inode = NULL;
30133006 ret = btrfs_write_out_cache(trans, cache, path);
30143007 if (ret == 0 && cache->io_ctl.inode) {
3015− num_started++;
30163008 should_put = 0;
30173009
30183010 /*
@@ -3113,7 +3105,6 @@ int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans) · 94 unmodified lines
31133105 int should_put;
31143106 struct btrfs_path *path;
31153107 struct list_head *io = &cur_trans->io_bgs;
3116− int num_started = 0;
31173108
31183109 path = btrfs_alloc_path();
31193110 if (!path)
@@ -3171,7 +3162,6 @@ int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans) · 51 unmodified lines
31713162 cache->io_ctl.inode = NULL;
31723163 ret = btrfs_write_out_cache(trans, cache, path);
31733164 if (ret == 0 && cache->io_ctl.inode) {
3174− num_started++;
31753165 should_put = 0;
31763166 list_add_tail(&cache->io_list, io);
31773167 } else {
@@ -3455,7 +3445,7 @@ int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans, u64 type) · 277 unmodified lines
34553445 return btrfs_chunk_alloc(trans, alloc_flags, CHUNK_ALLOC_FORCE);
34563446 }
34573447
3458−static int do_chunk_alloc(struct btrfs_trans_handle *trans, u64 flags)
3448+static struct btrfs_block_group *do_chunk_alloc(struct btrfs_trans_handle *trans, u64 flags)
34593449 {
34603450 struct btrfs_block_group *bg;
34613451 int ret;
@@ -3542,7 +3532,11 @@ static int do_chunk_alloc(struct btrfs_trans_handle *trans, u64 flags) · 80 unmodified lines
35423532 out:
35433533 btrfs_trans_release_chunk_metadata(trans);
35443534
3545− return ret;
3535+ if (ret)
3536+ return ERR_PTR(ret);
3537+
3538+ btrfs_get_block_group(bg);
3539+ return bg;
35463540 }
35473541
35483542 /*
@@ -3657,10 +3651,17 @@ int btrfs_chunk_alloc(struct btrfs_trans_handle *trans, u64 flags, · 108 unmodified lines
36573651 {
36583652 struct btrfs_fs_info *fs_info = trans->fs_info;
36593653 struct btrfs_space_info *space_info;
3654+ struct btrfs_block_group *ret_bg;
36603655 bool wait_for_alloc = false;
36613656 bool should_alloc = false;
3657+ bool from_extent_allocation = false;
36623658 int ret = 0;
36633659
3660+ if (force == CHUNK_ALLOC_FORCE_FOR_EXTENT) {
3661+ from_extent_allocation = true;
3662+ force = CHUNK_ALLOC_FORCE;
3663+ }
3664+
36643665 /* Don't re-enter if we're already allocating a chunk */
36653666 if (trans->allocating_chunk)
36663667 return -ENOSPC;
@@ -3750,9 +3751,22 @@ int btrfs_chunk_alloc(struct btrfs_trans_handle *trans, u64 flags, · 83 unmodified lines
37503751 force_metadata_allocation(fs_info);
37513752 }
37523753
3753− ret = do_chunk_alloc(trans, flags);
3754+ ret_bg = do_chunk_alloc(trans, flags);
37543755 trans->allocating_chunk = false;
37553756
3757+ if (IS_ERR(ret_bg)) {
3758+ ret = PTR_ERR(ret_bg);
3759+ } else if (from_extent_allocation) {
3760+ /*
3761+ * New block group is likely to be used soon. Try to activate
3762+ * it now. Failure is OK for now.
3763+ */
3764+ btrfs_zone_activate(ret_bg);
3765+ }
3766+
3767+ if (!ret)
3768+ btrfs_put_block_group(ret_bg);
3769+
37563770 spin_lock(&space_info->lock);
37573771 if (ret < 0) {
37583772 if (ret == -ENOSPC)
fs/btrfs/block-group.h+4−0
@@ -35,11 +35,15 @@ enum btrfs_discard_state { · 34 unmodified lines
3535 * the FS with empty chunks
3636 *
3737 * CHUNK_ALLOC_FORCE means it must try to allocate one
38+ *
39+ * CHUNK_ALLOC_FORCE_FOR_EXTENT like CHUNK_ALLOC_FORCE but called from
40+ * find_free_extent() that also activaes the zone
3841 */
3942 enum btrfs_chunk_alloc_enum {
4043 CHUNK_ALLOC_NO_FORCE,
4144 CHUNK_ALLOC_LIMITED,
4245 CHUNK_ALLOC_FORCE,
46+ CHUNK_ALLOC_FORCE_FOR_EXTENT,
4347 };
4448
4549 struct btrfs_caching_control {
fs/btrfs/compression.c+8−0
@@ -537,6 +537,9 @@ blk_status_t btrfs_submit_compressed_write(struct btrfs_inode *inode, u64 start, · 536 unmodified lines
537537 cb->orig_bio = NULL;
538538 cb->nr_pages = nr_pages;
539539
540+ if (blkcg_css)
541+ kthread_associate_blkcg(blkcg_css);
542+
540543 while (cur_disk_bytenr < disk_start + compressed_len) {
541544 u64 offset = cur_disk_bytenr - disk_start;
542545 unsigned int index = offset >> PAGE_SHIFT;
@@ -555,6 +558,8 @@ blk_status_t btrfs_submit_compressed_write(struct btrfs_inode *inode, u64 start, · 12 unmodified lines
555558 bio = NULL;
556559 goto finish_cb;
557560 }
561+ if (blkcg_css)
562+ bio->bi_opf |= REQ_CGROUP_PUNT;
558563 }
559564 /*
560565 * We should never reach next_stripe_start start as we will
@@ -612,6 +617,9 @@ blk_status_t btrfs_submit_compressed_write(struct btrfs_inode *inode, u64 start, · 51 unmodified lines
612617 return 0;
613618
614619 finish_cb:
620+ if (blkcg_css)
621+ kthread_associate_blkcg(NULL);
622+
615623 if (bio) {
616624 bio->bi_status = ret;
617625 bio_endio(bio);
fs/btrfs/ctree.h+1−0
@@ -1060,6 +1060,7 @@ struct btrfs_fs_info { · 1059 unmodified lines
10601060 */
10611061 spinlock_t relocation_bg_lock;
10621062 u64 data_reloc_bg;
1063+ struct mutex zoned_data_reloc_io_lock;
10631064
10641065 u64 nr_global_roots;
10651066
fs/btrfs/dev-replace.c+6−1
@@ -734,7 +734,12 @@ static int btrfs_dev_replace_start(struct btrfs_fs_info *fs_info, · 733 unmodified lines
734734
735735 btrfs_wait_ordered_roots(fs_info, U64_MAX, 0, (u64)-1);
736736
737− /* Commit dev_replace state and reserve 1 item for it. */
737+ /*
738+ * Commit dev_replace state and reserve 1 item for it.
739+ * This is crucial to ensure we won't miss copying extents for new block
740+ * groups that are allocated after we started the device replace, and
741+ * must be done after setting up the device replace state.
742+ */
738743 trans = btrfs_start_transaction(root, 1);
739744 if (IS_ERR(trans)) {
740745 ret = PTR_ERR(trans);
fs/btrfs/disk-io.c+4−2
@@ -1850,9 +1850,10 @@ again: · 1849 unmodified lines
18501850
18511851 ret = btrfs_insert_fs_root(fs_info, root);
18521852 if (ret) {
1853− btrfs_put_root(root);
1854− if (ret == -EEXIST)
1853+ if (ret == -EEXIST) {
1854+ btrfs_put_root(root);
18551855 goto again;
1856+ }
18561857 goto fail;
18571858 }
18581859 return root;
@@ -3156,6 +3157,7 @@ void btrfs_init_fs_info(struct btrfs_fs_info *fs_info) · 1297 unmodified lines
31563157 mutex_init(&fs_info->reloc_mutex);
31573158 mutex_init(&fs_info->delalloc_root_mutex);
31583159 mutex_init(&fs_info->zoned_meta_io_lock);
3160+ mutex_init(&fs_info->zoned_data_reloc_io_lock);
31593161 seqlock_init(&fs_info->profiles_lock);
31603162
31613163 INIT_LIST_HEAD(&fs_info->dirty_cowonly_roots);
fs/btrfs/extent-tree.c+1−1
@@ -4082,7 +4082,7 @@ static int find_free_extent_update_loop(struct btrfs_fs_info *fs_info, · 4081 unmodified lines
40824082 }
40834083
40844084 ret = btrfs_chunk_alloc(trans, ffe_ctl->flags,
4085− CHUNK_ALLOC_FORCE);
4085+ CHUNK_ALLOC_FORCE_FOR_EXTENT);
40864086
40874087 /* Do not bail out on ENOSPC since we can do more. */
40884088 if (ret == -ENOSPC)
fs/btrfs/extent_io.c+29−15
@@ -2658,6 +2658,7 @@ int btrfs_repair_one_sector(struct inode *inode, · 2657 unmodified lines
26582658
26592659 repair_bio = btrfs_bio_alloc(1);
26602660 repair_bbio = btrfs_bio(repair_bio);
2661+ repair_bbio->file_offset = start;
26612662 repair_bio->bi_opf = REQ_OP_READ;
26622663 repair_bio->bi_end_io = failed_bio->bi_end_io;
26632664 repair_bio->bi_iter.bi_sector = failrec->logical >> 9;
@@ -3333,24 +3334,37 @@ static int alloc_new_bio(struct btrfs_inode *inode, · 669 unmodified lines

52 more lines aren’t shown here.

fs/btrfs/inode.c+12−15

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

fs/btrfs/ioctl.c+0−2

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

fs/btrfs/scrub.c+25−1

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

fs/btrfs/tree-log.c+1−0

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

fs/btrfs/volumes.c+2−0

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

fs/btrfs/volumes.h+3−0

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

fs/btrfs/zoned.h+2−2

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

fs/cachefiles/namei.c+24−9

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

fs/cachefiles/xattr.c+1−1

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

fs/ceph/caps.c+7−0

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

fs/ceph/mds_client.c+0−6

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

fs/cifs/cifsfs.c+16−14

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

fs/cifs/connect.c+11−2

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

fs/cifs/dfs_cache.c+12−7

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

fs/cifs/link.c+3−0

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

fs/cifs/smb2ops.c+14−3

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

fs/cifs/trace.h+7−0

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

fs/cifs/transport.c+3−4

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

fs/erofs/zdata.c+4−8

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

fs/erofs/zdata.h+1−1

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

fs/ext4/ext4.h+6−1

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

fs/ext4/extents.c+25−7

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

fs/ext4/inode.c+16−2

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

fs/ext4/ioctl.c+16−0

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

fs/ext4/namei.c+2−2

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

fs/ext4/page-io.c+3−1

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

fs/ext4/super.c+29−11

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

fs/f2fs/checkpoint.c+3−3

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

fs/f2fs/data.c+21−12

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

fs/f2fs/f2fs.h+0−9

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

fs/f2fs/inode.c+2−1

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

fs/f2fs/segment.c+0−95

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

fs/f2fs/super.c+1−31

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

fs/fscache/Kconfig+0−3

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

fs/fscache/cache.c+1−1

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

fs/fscache/cookie.c+3−1

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

fs/fscache/internal.h+4−0

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

fs/fscache/io.c+2−3

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

fs/gfs2/file.c+1−5

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

fs/hugetlbfs/inode.c+5−4

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

fs/io-wq.h+0−1

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

fs/io_uring.c+70−44

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

fs/jbd2/commit.c+3−1

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

fs/kernfs/dir.c+6−1

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

fs/ksmbd/misc.c+31−9

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

fs/ksmbd/misc.h+2−1

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

fs/ksmbd/oplock.c+0−30

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

fs/ksmbd/oplock.h+0−2

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

fs/ksmbd/smb2pdu.c+16−18

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

fs/ksmbd/vfs.c+2−4

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

fs/ksmbd/vfs_cache.c+1−1

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

fs/ksmbd/vfs_cache.h+0−1

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

fs/namei.c+10−12

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

fs/namespace.c+13−1

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

fs/nfsd/filecache.c+15−10

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

fs/nfsd/nfs2acl.c+12−12

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

fs/pipe.c+5−4

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

fs/posix_acl.c+10−0

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

fs/stat.c+10−9

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

fs/xattr.c+4−2

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

fs/xfs/xfs_buf.c+3−3

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

fs/xfs/xfs_buf.h+21−21

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

fs/xfs/xfs_inode.c+13−11

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

fs/xfs/xfs_trans.h+1−1

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

fs/zonefs/super.c+41−5

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

include/asm-generic/bug.h+6−5

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

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

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

include/dt-bindings/clock/microchip,mpfs-clock.h+4−1

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

include/linux/cpu.h+1−1

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

include/linux/dma-buf-map.h+0−266

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

include/linux/fscache.h+1−3

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

include/linux/gpio/consumer.h+7−1

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

include/linux/hugetlb.h+6−0

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

include/linux/kernel.h+1−10

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

include/linux/kfence.h+24−0

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

include/linux/kvm_host.h+25−1

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

include/linux/memcontrol.h+5−0

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

include/linux/mm.h+8−0

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

include/linux/mtd/mtd.h+2−4

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

include/linux/netdevice.h+9−12

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

include/linux/posix_acl_xattr.h+4−0

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

include/linux/sched.h+1−0

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

include/linux/sched/mm.h+8−0

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

include/linux/sunrpc/svc.h+1−0

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

include/linux/t10-pi.h+9−0

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

include/linux/timex.h+1−1

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

include/linux/usb/pd_bdo.h+1−1

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

include/linux/vfio_pci_core.h+2−0

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

include/linux/vmalloc.h+2−2

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

include/memory/renesas-rpc-if.h+1−0

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

include/net/bluetooth/hci.h+1−0

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

include/net/bluetooth/hci_core.h+1−1

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

include/net/esp.h+0−2

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

include/net/flow_dissector.h+2−0

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

include/net/ip6_tunnel.h+1−1

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

include/net/ip_tunnels.h+10−3

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

include/net/netns/ipv6.h+2−2

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

include/net/tcp.h+8−0

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

include/net/xsk_buff_pool.h+1−0

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

include/scsi/libiscsi.h+5−4

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

include/scsi/scsi_transport_iscsi.h+3−1

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

include/sound/core.h+1−0

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

include/sound/memalloc.h+5−0

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

include/sound/soc-component.h+4−0

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

include/trace/events/sunrpc.h+4−3

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

include/uapi/linux/elf.h+1−1

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

include/uapi/linux/fb.h+1−1

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

include/uapi/linux/input-event-codes.h+21−0

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

include/uapi/linux/io_uring.h+1−0

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

include/uapi/linux/kvm.h+9−1

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

include/uapi/linux/stddef.h+4−0

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

kernel/cpu.c+18−18

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

kernel/dma/direct.h+2−1

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

kernel/events/core.c+1−1

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

kernel/events/internal.h+5−0

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

kernel/events/ring_buffer.c+0−5

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

kernel/irq/affinity.c+3−2

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

kernel/irq_work.c+1−1

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

kernel/kcov.c+5−2

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

kernel/kprobes.c+1−1

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

kernel/sched/fair.c+5−5

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

kernel/smp.c+1−1

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

kernel/time/tick-sched.c+3−3

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

kernel/time/timer.c+7−4

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

lib/hexdump.c+31−10

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

lib/strncpy_from_user.c+1−1

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

lib/strnlen_user.c+1−1

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

lib/xarray.c+2−0

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

mm/compaction.c+5−5

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

mm/filemap.c+0−6

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

mm/hugetlb.c+20−7

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

mm/kasan/hw_tags.c+3−2

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

mm/kasan/kasan.h+6−4

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

mm/kasan/quarantine.c+7−0

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

mm/kfence/core.c+0−21

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

mm/kfence/kfence.h+21−0

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

mm/kfence/report.c+47−0

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

mm/kmemleak.c+4−4

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

mm/memcontrol.c+11−1

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

mm/memory-failure.c+116−42

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

mm/mmap.c+0−8

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

mm/mmu_notifier.c+13−1

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

mm/nommu.c+2−0

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

mm/oom_kill.c+40−14

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

mm/page_alloc.c+2−2

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

mm/page_io.c+0−54

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

mm/secretmem.c+17−0

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

mm/shmem.c+20−11

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

mm/slab.c+1−1

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

mm/slab.h+1−1

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

mm/slab_common.c+9−0

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

mm/slob.c+1−1

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

mm/slub.c+1−1

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

mm/userfaultfd.c+9−6

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

mm/util.c+9−2

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

mm/vmalloc.c+31−33

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

mm/workingset.c+1−1

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

net/bluetooth/hci_conn.c+24−8

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

net/bluetooth/hci_event.c+47−33

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

net/bluetooth/hci_sync.c+10−1

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

net/bpf/test_run.c+3−2

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

net/bridge/br_switchdev.c+2−0

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

net/can/isotp.c+9−1

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

net/ceph/osd_client.c+5−1

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

net/core/dev.c+5−9

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

net/core/flow_dissector.c+2−1

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

net/core/lwt_bpf.c+3−4

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

net/core/rtnetlink.c+3−0

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

net/dsa/dsa2.c+10−13

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

net/dsa/port.c+2−0

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

net/dsa/slave.c+1−1

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

net/dsa/tag_hellcreek.c+8−0

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

net/ipv4/esp4.c+2−3

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

net/ipv4/ip_gre.c+7−9

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

net/ipv4/ip_tunnel.c+5−4

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

net/ipv4/netfilter/nf_flow_table_ipv4.c+0−0

Empty file deleted.

net/ipv4/syncookies.c+7−1

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

net/ipv4/tcp_input.c+13−2

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

net/ipv4/tcp_minisocks.c+1−1

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

net/ipv4/tcp_output.c+1−0

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

net/ipv4/tcp_rate.c+8−3

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

net/ipv6/esp6.c+2−3

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

net/ipv6/ip6_gre.c+16−12

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

net/ipv6/ip6_output.c+1−1

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

net/ipv6/netfilter.c+8−2

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

net/ipv6/route.c+6−5

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

net/ipv6/syncookies.c+2−1

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

net/l3mdev/l3mdev.c+1−1

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

net/mac80211/debugfs_sta.c+1−1

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

net/mctp/device.c+1−1

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

net/netfilter/ipvs/ip_vs_conn.c+1−1

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

net/netfilter/nf_conntrack_proto_tcp.c+6−15

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

net/netfilter/nf_conntrack_standalone.c+1−1

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

net/netfilter/nf_tables_api.c+1−1

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

net/netfilter/nft_set_rbtree.c+5−1

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

net/netfilter/nft_socket.c+41−18

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

net/netlink/af_netlink.c+7−0

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

net/nfc/nci/core.c+4−0

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

net/openvswitch/flow_netlink.c+1−1

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

net/packet/af_packet.c+9−4

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

net/rxrpc/net_ns.c+2−0

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

net/sched/cls_api.c+1−1

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

net/sched/cls_flower.c+13−5

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

net/sched/cls_u32.c+14−10

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

net/sched/sch_taprio.c+2−1

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

net/sctp/sm_sideeffect.c+4−0

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

net/sctp/sm_statefuns.c+3−3

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

net/sctp/socket.c+1−1

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

net/smc/af_smc.c+110−45

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

net/smc/smc.h+29−0

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

net/smc/smc_clc.c+4−2

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

net/smc/smc_close.c+4−1

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

net/smc/smc_pnet.c+3−2

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

net/sunrpc/svc_xprt.c+3−0

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

net/sunrpc/xprtrdma/svc_rdma_recvfrom.c+1−1

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

net/tls/tls_device.c+7−5

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

net/wireless/nl80211.c+2−1

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

net/wireless/scan.c+2−0

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

net/xdp/xsk.c+14−1

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

net/xdp/xsk_buff_pool.c+12−4

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

net/xfrm/xfrm_policy.c+3−1

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

scripts/Makefile.build+1−1

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

scripts/gcc-plugins/latent_entropy_plugin.c+27−17

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

scripts/link-vmlinux.sh+1−1

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

sound/core/init.c+28−0

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

sound/core/memalloc.c+110−1

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

sound/core/pcm_misc.c+1−1

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

sound/drivers/mtpav.c+2−2

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

sound/hda/hdac_i915.c+18−10

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

sound/hda/intel-dsp-config.c+25−2

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

sound/isa/galaxy/galaxy.c+6−1

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

sound/isa/sc6000.c+6−1

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

sound/oss/dmasound/dmasound.h+0−6

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

sound/oss/dmasound/dmasound_core.c+2−24

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

sound/pci/ad1889.c+8−2

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

sound/pci/ali5451/ali5451.c+8−2

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

sound/pci/als300.c+6−2

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

sound/pci/als4000.c+8−2

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

sound/pci/atiixp.c+8−2

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

sound/pci/atiixp_modem.c+8−2

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

sound/pci/au88x0/au88x0.c+7−1

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

sound/pci/aw2/aw2-alsa.c+6−2

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

sound/pci/azt3328.c+7−1

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

sound/pci/bt87x.c+8−2

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

sound/pci/ca0106/ca0106_main.c+8−2

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

sound/pci/cmipci.c+6−2

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

sound/pci/cs4281.c+8−2

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

sound/pci/cs5535audio/cs5535audio.c+8−2

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

sound/pci/echoaudio/echoaudio.c+7−2

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

sound/pci/emu10k1/emu10k1x.c+8−2

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

sound/pci/ens1370.c+8−2

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

sound/pci/es1938.c+8−2

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

sound/pci/es1968.c+8−2

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

sound/pci/fm801.c+8−2

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

sound/pci/hda/patch_hdmi.c+5−2

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

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

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

sound/pci/ice1712/ice1724.c+8−2

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

sound/pci/intel8x0.c+8−2

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

sound/pci/intel8x0m.c+8−2

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

sound/pci/korg1212/korg1212.c+6−2

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

sound/pci/lola/lola.c+8−2

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

sound/pci/lx6464es/lx6464es.c+6−2

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

sound/pci/maestro3.c+7−1

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

sound/pci/nm256/nm256.c+1−1

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

sound/pci/oxygen/oxygen_lib.c+11−1

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

sound/pci/riptide/riptide.c+7−1

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

sound/pci/rme32.c+7−1

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

sound/pci/rme96.c+8−2

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

sound/pci/rme9652/hdsp.c+6−2

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

sound/pci/rme9652/hdspm.c+6−2

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

sound/pci/rme9652/rme9652.c+6−2

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

sound/pci/sis7019.c+10−4

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

sound/pci/sonicvibes.c+8−2

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

sound/pci/via82xx.c+8−2

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

sound/pci/via82xx_modem.c+8−2

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

sound/soc/atmel/sam9g20_wm8731.c+0−61

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

sound/soc/codecs/cs35l41-lib.c+6−4

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

sound/soc/codecs/lpass-rx-macro.c+10−4

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

sound/soc/codecs/lpass-tx-macro.c+10−4

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

sound/soc/codecs/lpass-va-macro.c+6−2

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

sound/soc/codecs/msm8916-wcd-digital.c+8−1

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

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

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

sound/soc/codecs/rt5682.c+13−7

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

sound/soc/codecs/rt5682s.c+4−7

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

sound/soc/codecs/rt711.c+7−0

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

sound/soc/codecs/wcd934x.c+1−25

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

sound/soc/codecs/wm8731.c+11−8

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

sound/soc/fsl/fsl_sai.c+1−1

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

sound/soc/generic/simple-card-utils.c+4−2

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

sound/soc/intel/boards/sof_es8336.c+89−28

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

sound/soc/intel/boards/sof_rt5682.c+13−0

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

sound/soc/intel/common/soc-acpi-intel-tgl-match.c+2−2

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

sound/soc/meson/aiu-acodec-ctrl.c+3−0

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

sound/soc/meson/aiu-codec-ctrl.c+3−0

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

sound/soc/meson/aiu.c+3−0

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

sound/soc/soc-core.c+5−0

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

sound/soc/soc-dapm.c+2−4

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

sound/soc/soc-pcm.c+1−1

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

sound/soc/soc-topology.c+2−2

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

sound/soc/sof/sof-pci-dev.c+8−1

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

sound/soc/sof/topology.c+49−1

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

sound/usb/midi.c+1−0

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

sound/usb/mixer_maps.c+4−0

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

sound/usb/pcm.c+14−2

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

sound/usb/usbaudio.h+1−1

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

sound/x86/intel_hdmi_audio.c+6−1

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

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

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

tools/include/linux/slab.h+7−1

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

tools/lib/perf/evlist.c+1−2

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

tools/objtool/check.c+49−45

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

tools/objtool/elf.c+166−23

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

tools/objtool/include/objtool/elf.h+2−2

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

tools/objtool/include/objtool/objtool.h+1−1

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

tools/objtool/objtool.c+0−1

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

tools/perf/arch/arm64/util/arm-spe.c+10−0

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

tools/perf/arch/arm64/util/machine.c+0−21

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

tools/perf/arch/powerpc/util/Build+0−1

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

tools/perf/arch/powerpc/util/machine.c+0−25

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

tools/perf/arch/s390/util/machine.c+0−16

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

tools/perf/bench/numa.c+101−35

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

tools/perf/builtin-record.c+17−5

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

tools/perf/builtin-report.c+14−0

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

tools/perf/builtin-script.c+1−1

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

tools/perf/tests/attr/README+1−0

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

tools/perf/tests/attr/test-record-spe-physical-address+12−0

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

tools/perf/tests/perf-time-to-tsc.c+4−0

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

tools/perf/util/arm-spe.c+3−2

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

tools/perf/util/c++/clang.cpp+4−0

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

tools/perf/util/header.c+51−0

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

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

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

tools/perf/util/parse-events.c+3−2

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

tools/perf/util/session.c+1−1

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

tools/perf/util/stat.c+2−1

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

tools/perf/util/symbol-elf.c+1−1

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

tools/perf/util/symbol.c+27−10

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

tools/perf/util/symbol.h+1−2

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

tools/power/x86/intel-speed-select/Makefile+1−1

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

tools/testing/radix-tree/linux.c+2−1

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

tools/testing/selftests/drivers/net/mlxsw/spectrum-2/vxlan_flooding_ipv6.sh+17−0

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

tools/testing/selftests/drivers/net/mlxsw/vxlan_flooding.sh+17−0

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

tools/testing/selftests/kvm/.gitignore+2−0

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

tools/testing/selftests/kvm/Makefile+1−0

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

tools/testing/selftests/kvm/aarch64/arch_timer.c+11−4

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

tools/testing/selftests/kvm/aarch64/get-reg-list.c+10−4

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

tools/testing/selftests/kvm/aarch64/vcpu_width_config.c+122−0

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

tools/testing/selftests/kvm/dirty_log_perf_test.c+31−3

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

tools/testing/selftests/kvm/include/riscv/processor.h+3−1

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

tools/testing/selftests/kvm/include/x86_64/processor.h+17−0

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

tools/testing/selftests/kvm/kvm_page_table_test.c+1−1

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

tools/testing/selftests/kvm/lib/riscv/processor.c+1−1

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

tools/testing/selftests/kvm/lib/x86_64/processor.c+82−120

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

tools/testing/selftests/kvm/x86_64/amx_test.c+0−1

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

tools/testing/selftests/kvm/x86_64/emulator_error_test.c+0−1

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

tools/testing/selftests/kvm/x86_64/smm_test.c+0−2

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

tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c+0−1

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

tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c+0−1

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

tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c+0−1

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

tools/testing/selftests/mqueue/mq_perf_tests.c+17−8

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

tools/testing/selftests/vm/mremap_test.c+80−5

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

tools/testing/selftests/vm/run_vmtests.sh+8−3

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

tools/testing/selftests/wireguard/qemu/arch/i686.config+1−0

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

tools/testing/selftests/wireguard/qemu/arch/x86_64.config+1−0

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

virt/kvm/dirty_ring.c+1−1

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

virt/kvm/kvm_main.c+36−8

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

virt/kvm/kvm_mm.h+1−1

This diff is large: its 6 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