History

Merge tag 'v5.12-rc8' into sched/core, to pick up fixes

Ingo Molnar committed 5 years ago

Commit d0d252b2 parents 9406415 bf05bf11874 files · +16503 −9476Browse files

Unified · Split

1874 files
  1. .mailmap +10 −0
  2. Documentation/ABI/testing/debugfs-moxtet +2 −2
  3. Documentation/ABI/testing/debugfs-turris-mox-rwtm +1 −1
  4. Documentation/ABI/testing/sysfs-bus-moxtet-devices +3 −3
  5. Documentation/ABI/testing/sysfs-class-led-driver-turris-omnia +1 −1
  6. Documentation/ABI/testing/sysfs-firmware-turris-mox-rwtm +5 −5
  7. Documentation/ABI/testing/sysfs-fs-xfs +1 −1
  8. Documentation/arm64/acpi_object_usage.rst +5 −5
  9. Documentation/arm64/silicon-errata.rst +3 −0
  10. Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt +1 −1
  11. Documentation/devicetree/bindings/i2c/i2c-gpio.yaml +1 −1
  12. Documentation/devicetree/bindings/i2c/i2c-imx.yaml +1 −1
  13. Documentation/devicetree/bindings/iio/adc/ingenic,adc.yaml +3 −2
  14. Documentation/devicetree/bindings/input/adc-joystick.yaml +3 −1
  15. Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.txt +4 −1
  16. Documentation/devicetree/bindings/interrupt-controller/ingenic,intc.yaml +1 −0
  17. Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml +1 −1
  18. Documentation/devicetree/bindings/mfd/ab8500.txt +3 −1
  19. Documentation/devicetree/bindings/mfd/motorola-cpcap.txt +8 −8
  20. Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml +1 −1
  21. Documentation/devicetree/bindings/net/ethernet-controller.yaml +1 −1
  22. Documentation/devicetree/bindings/net/micrel-ksz90x1.txt +94 −2
  23. Documentation/devicetree/bindings/sound/fsl,spdif.yaml +4 −0
  24. Documentation/gpu/todo.rst +21 −0
  25. Documentation/networking/bonding.rst +1 −1
  26. Documentation/networking/device_drivers/ethernet/amazon/ena.rst +1 −1
  27. Documentation/networking/devlink/devlink-dpipe.rst +1 −1
  28. Documentation/networking/devlink/devlink-port.rst +2 −2
  29. Documentation/networking/ethtool-netlink.rst +5 −5
  30. Documentation/networking/ip-sysctl.rst +0 −15
  31. Documentation/networking/netdev-FAQ.rst +6 −66
  32. Documentation/networking/seg6-sysctl.rst +13 −0
  33. Documentation/networking/xfrm_device.rst +1 −1
  34. Documentation/process/stable-kernel-rules.rst +0 −6
  35. Documentation/process/submitting-patches.rst +0 −5
  36. Documentation/virt/kvm/api.rst +9 −3
  37. MAINTAINERS +61 −45
  38. Makefile +4 −2
  39. arch/Kconfig +1 −2
  40. arch/arc/boot/dts/haps_hs.dts +1 −1
  41. arch/arc/kernel/signal.c +2 −2
  42. arch/arc/kernel/unwind.c +14 −13
  43. arch/arm/Kconfig +8 −1
  44. arch/arm/boot/dts/am33xx.dtsi +3 −0
  45. arch/arm/boot/dts/armada-385-turris-omnia.dts +3 −1
  46. arch/arm/boot/dts/at91-sam9x60ek.dts +0 −8
  47. arch/arm/boot/dts/at91-sama5d27_som1.dtsi +2 −2
  48. arch/arm/boot/dts/bcm2711.dtsi +0 −12
  49. arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi +2 −0
  50. arch/arm/boot/dts/imx6ul-14x14-evk.dtsi +16 −6
  51. arch/arm/boot/dts/imx6ull-myir-mys-6ulx-eval.dts +1 −0
  52. arch/arm/boot/dts/omap3.dtsi +3 −0
  53. arch/arm/boot/dts/omap4.dtsi +5 −0
  54. arch/arm/boot/dts/omap44xx-clocks.dtsi +0 −8
  55. arch/arm/boot/dts/omap5.dtsi +5 −0
  56. arch/arm/boot/dts/sam9x60.dtsi +9 −0
  57. arch/arm/mach-footbridge/cats-pci.c +2 −2
  58. arch/arm/mach-footbridge/ebsa285-pci.c +2 −2
  59. arch/arm/mach-footbridge/netwinder-pci.c +1 −1
  60. arch/arm/mach-footbridge/personal-pci.c +2 −3
  61. arch/arm/mach-imx/avic.c +15 −1
  62. arch/arm/mach-imx/common.h +0 −1
  63. arch/arm/mach-imx/mach-imx1.c +0 −11
  64. arch/arm/mach-imx/mach-imx25.c +0 −12
  65. arch/arm/mach-imx/mach-imx27.c +0 −12
  66. arch/arm/mach-imx/mach-imx31.c +0 −1
  67. arch/arm/mach-imx/mach-imx35.c +0 −1
  68. arch/arm/mach-imx/mm-imx3.c +0 −24
  69. arch/arm/mach-keystone/keystone.c +2 −2
  70. arch/arm/mach-omap1/ams-delta-fiq-handler.S +1 −0
  71. arch/arm/mach-omap2/board-generic.c +1 −1
  72. arch/arm/mach-omap2/omap-secure.c +39 −0
  73. arch/arm/mach-omap2/omap-secure.h +1 −0
  74. arch/arm/mach-omap2/pmic-cpcap.c +2 −2
  75. arch/arm/mach-omap2/sr_device.c +58 −17
  76. arch/arm/mach-pxa/mainstone.c +6 −2
  77. arch/arm/mm/mmu.c +1 −2
  78. arch/arm/mm/pmsa-v7.c +3 −1
  79. arch/arm/mm/pmsa-v8.c +3 −1
  80. arch/arm/probes/uprobes/core.c +2 −2
  81. arch/arm/xen/p2m.c +2 −3
  82. arch/arm64/Kconfig +17 −11
  83. arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts +4 −0
  84. arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi +1 −1
  85. arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts +0 −4
  86. arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +2 −2
  87. arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi +1 −0
  88. arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi +1 −0
  89. arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi +1 −0
  90. arch/arm64/boot/dts/freescale/imx8mm-pinfunc.h +1 −1
  91. arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts +1 −1
  92. arch/arm64/boot/dts/freescale/imx8mp-phycore-som.dtsi +1 −1
  93. arch/arm64/boot/dts/freescale/imx8mq-pinfunc.h +1 −1
  94. arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts +1 −1
  95. arch/arm64/boot/dts/marvell/armada-cp11x.dtsi +3 −3
  96. arch/arm64/include/asm/alternative-macros.h +4 −4
  97. arch/arm64/include/asm/checksum.h +1 −1
  98. arch/arm64/include/asm/cpucaps.h +2 −1
  99. arch/arm64/include/asm/kvm_arm.h +1 −0
  100. arch/arm64/include/asm/kvm_asm.h +4 −4
  101. arch/arm64/include/asm/kvm_hyp.h +7 −1
  102. arch/arm64/include/asm/memory.h +5 −0
  103. arch/arm64/include/asm/mmu_context.h +0 −17
  104. arch/arm64/include/asm/pgtable-prot.h +0 −1
  105. arch/arm64/include/asm/pgtable.h +3 −0
  106. arch/arm64/include/asm/processor.h +2 −0
  107. arch/arm64/include/asm/sysreg.h +14 −6
  108. arch/arm64/include/asm/thread_info.h +2 −0
  109. arch/arm64/include/asm/word-at-a-time.h +5 −5
  110. arch/arm64/kernel/cpu_errata.c +8 −0
  111. arch/arm64/kernel/cpufeature.c +4 −2
  112. arch/arm64/kernel/cpuinfo.c +1 −1
  113. arch/arm64/kernel/crash_dump.c +2 −0
  114. arch/arm64/kernel/entry.S +6 −4
  115. arch/arm64/kernel/head.S +5 −3
  116. arch/arm64/kernel/idreg-override.c +23 −20
  117. arch/arm64/kernel/image-vars.h +3 −0
  118. arch/arm64/kernel/perf_event.c +1 −1
  119. arch/arm64/kernel/probes/kprobes.c +4 −2
  120. arch/arm64/kernel/process.c +2 −0
  121. arch/arm64/kernel/sleep.S +1 −1
  122. arch/arm64/kernel/stacktrace.c +5 −4
  123. arch/arm64/kvm/arm.c +6 −1
  124. arch/arm64/kvm/debug.c +2 −0
  125. arch/arm64/kvm/hyp/entry.S +5 −3
  126. arch/arm64/kvm/hyp/include/hyp/switch.h +6 −3
  127. arch/arm64/kvm/hyp/nvhe/debug-sr.c +10 −2
  128. arch/arm64/kvm/hyp/nvhe/host.S +8 −7
  129. arch/arm64/kvm/hyp/nvhe/hyp-main.c +6 −6
  130. arch/arm64/kvm/hyp/nvhe/switch.c +11 −3
  131. arch/arm64/kvm/hyp/nvhe/tlb.c +2 −1
  132. arch/arm64/kvm/hyp/pgtable.c +1 −0
  133. arch/arm64/kvm/hyp/vgic-v3-sr.c +47 −2
  134. arch/arm64/kvm/hyp/vhe/tlb.c +2 −1
  135. arch/arm64/kvm/mmu.c +1 −2
  136. arch/arm64/kvm/perf.c +10 −0
  137. arch/arm64/kvm/pmu-emul.c +0 −10
  138. arch/arm64/kvm/reset.c +14 −8
  139. arch/arm64/kvm/vgic/vgic-v3.c +9 −3
  140. arch/arm64/mm/init.c +26 −3
  141. arch/arm64/mm/mmu.c +22 −4
  142. arch/csky/Kconfig +1 −1
  143. arch/csky/include/asm/page.h +1 −1
  144. arch/csky/kernel/probes/ftrace.c +1 −1
  145. arch/ia64/configs/generic_defconfig +0 −2
  146. arch/ia64/include/asm/ptrace.h +1 −7
  147. arch/ia64/include/asm/syscall.h +1 −1
  148. arch/ia64/kernel/err_inject.c +11 −11
  149. arch/ia64/kernel/mca.c +1 −1
  150. arch/ia64/kernel/ptrace.c +18 −6
  151. arch/ia64/mm/discontig.c +3 −3
  152. arch/m68k/include/asm/page_mm.h +2 −2
  153. arch/m68k/include/asm/page_no.h +2 −2
  154. arch/mips/boot/compressed/decompress.c +8 −0
  155. arch/mips/crypto/Makefile +2 −2
  156. arch/mips/include/asm/traps.h +3 −0
  157. arch/mips/kernel/cpu-probe.c +6 −0
  158. arch/mips/kernel/cpu-r3k-probe.c +3 −0
  159. arch/mips/kernel/setup.c +1 −1
  160. arch/mips/kernel/traps.c +5 −5
  161. arch/mips/kernel/vmlinux.lds.S +6 −0
  162. arch/nds32/mm/cacheflush.c +1 −1
  163. arch/parisc/Kconfig +5 −2
  164. arch/parisc/include/asm/cmpxchg.h +1 −1
  165. arch/parisc/include/asm/processor.h +0 −1
  166. arch/parisc/kernel/ptrace.c +0 −2
  167. arch/parisc/math-emu/fpu.h +3 −29
  168. arch/powerpc/include/asm/code-patching.h +4 −3
  169. arch/powerpc/include/asm/cpu_has_feature.h +2 −2
  170. arch/powerpc/include/asm/dcr-native.h +4 −4
  171. arch/powerpc/include/asm/interrupt.h +2 −1
  172. arch/powerpc/include/asm/mmu.h +2 −2
  173. arch/powerpc/include/asm/ptrace.h +2 −2
  174. arch/powerpc/include/asm/switch_to.h +10 −0
  175. arch/powerpc/include/asm/vio.h +1 −1
  176. arch/powerpc/kernel/Makefile +4 −0
  177. arch/powerpc/kernel/exceptions-64s.S +1 −1
  178. arch/powerpc/kernel/head_book3s_32.S +6 −3
  179. arch/powerpc/kernel/interrupt.c +1 −2
  180. arch/powerpc/kernel/ptrace/Makefile +2 −2
  181. arch/powerpc/kernel/ptrace/ptrace-decl.h +0 −14
  182. arch/powerpc/kernel/ptrace/ptrace-fpu.c +10 −0
  183. arch/powerpc/kernel/ptrace/ptrace-novsx.c +8 −0
  184. arch/powerpc/kernel/ptrace/ptrace-view.c +0 −2
  185. arch/powerpc/kernel/signal_32.c +8 −12
  186. arch/powerpc/kernel/traps.c +1 −1
  187. arch/powerpc/kernel/vdso32/gettimeofday.S +11 −0
  188. arch/powerpc/lib/sstep.c +2 −2
  189. arch/powerpc/perf/core-book3s.c +2 −2
  190. arch/powerpc/platforms/pseries/lpar.c +2 −1
  191. arch/powerpc/platforms/pseries/mobility.c +44 −4
  192. arch/powerpc/platforms/pseries/msi.c +23 −2
  193. arch/powerpc/platforms/pseries/vio.c +3 −4
  194. arch/riscv/Kconfig +3 −3
  195. arch/riscv/Kconfig.socs +2 −0
  196. arch/riscv/include/asm/asm-prototypes.h +16 −0
  197. arch/riscv/include/asm/irq.h +2 −0
  198. arch/riscv/include/asm/processor.h +1 −0
  199. arch/riscv/include/asm/ptrace.h +5 −0
  200. arch/riscv/include/asm/sbi.h +2 −2
  201. arch/riscv/include/asm/timex.h +2 −0
  202. arch/riscv/include/asm/uaccess.h +5 −2
  203. arch/riscv/kernel/Makefile +1 −0
  204. arch/riscv/kernel/entry.S +4 −0
  205. arch/riscv/kernel/probes/ftrace.c +20 −9
  206. arch/riscv/kernel/probes/kprobes.c +1 −2
  207. arch/riscv/kernel/process.c +1 −0
  208. arch/riscv/kernel/sbi.c +1 −1
  209. arch/riscv/kernel/setup.c +2 −1
  210. arch/riscv/kernel/stacktrace.c +1 −1
  211. arch/riscv/kernel/time.c +1 −0
  212. arch/riscv/kernel/traps.c +2 −0
  213. arch/riscv/mm/fault.c +1 −0
  214. arch/riscv/mm/kasan_init.c +4 −2
  215. arch/s390/configs/debug_defconfig +3 −13
  216. arch/s390/configs/defconfig +2 −9
  217. arch/s390/configs/zfcpdump_defconfig +0 −3
  218. arch/s390/include/asm/idle.h +6 −6
  219. arch/s390/include/asm/pci.h +1 −1
  220. arch/s390/include/asm/stacktrace.h +1 −0
  221. arch/s390/include/asm/timex.h +18 −18
  222. arch/s390/include/asm/vdso/data.h +1 −1
  223. arch/s390/include/uapi/asm/hwctrset.h +0 −0
  224. arch/s390/kernel/cpcmd.c +4 −2
  225. arch/s390/kernel/dumpstack.c +11 −1
  226. arch/s390/kernel/entry.S +3 −4
  227. arch/s390/kernel/idle.c +6 −6
  228. arch/s390/kernel/irq.c +1 −1
  229. arch/s390/kernel/perf_cpum_cf.c +1 −1
  230. arch/s390/kernel/perf_cpum_cf_diag.c +5 −18
  231. arch/s390/kernel/setup.c +1 −1
  232. arch/s390/kernel/time.c +22 −16
  233. arch/s390/kernel/topology.c +0 −2
  234. arch/s390/kernel/vtime.c +1 −1
  235. arch/s390/kvm/interrupt.c +1 −1
  236. arch/s390/pci/pci.c +24 −4
  237. arch/s390/pci/pci_event.c +6 −12
  238. arch/sparc/configs/sparc64_defconfig +1 −3
  239. arch/sparc/include/asm/elf_64.h +0 −1
  240. arch/sparc/include/asm/extable.h +2 −2
  241. arch/sparc/include/asm/processor_32.h +1 −5
  242. arch/sparc/include/asm/thread_info_64.h +1 −0
  243. arch/sparc/include/asm/uaccess.h +3 −0
  244. arch/sparc/include/asm/uaccess_32.h +0 −38
  245. arch/sparc/include/asm/uaccess_64.h +0 −1
  246. arch/sparc/kernel/head_32.S +1 −1
  247. arch/sparc/kernel/head_64.S +1 −1
  248. arch/sparc/kernel/process_32.c +0 −12
  249. arch/sparc/kernel/setup_32.c +0 −3
  250. arch/sparc/kernel/setup_64.c +0 −4
  251. arch/sparc/kernel/traps_64.c +6 −7
  252. arch/sparc/kernel/unaligned_32.c +6 −100
  253. arch/sparc/lib/checksum_32.S +27 −37
  254. arch/sparc/lib/copy_user.S +112 −203
  255. arch/sparc/lib/memset.S +33 −54
  256. arch/sparc/mm/Makefile +1 −1
  257. arch/sparc/mm/extable.c +0 −107
  258. arch/sparc/mm/fault_32.c +10 −70
  259. arch/sparc/mm/mm_32.h +0 −2
  260. arch/x86/Makefile +1 −1
  261. arch/x86/entry/common.c +2 −1
  262. arch/x86/entry/entry_64_compat.S +2 −0
  263. arch/x86/events/core.c +6 −9
  264. arch/x86/events/intel/core.c +7 −1
  265. arch/x86/events/intel/ds.c +1 −1
  266. arch/x86/include/asm/insn-eval.h +2 −0
  267. arch/x86/include/asm/kfence.h +6 −1
  268. arch/x86/include/asm/kvm_host.h +28 −10
  269. arch/x86/include/asm/processor.h +0 −9
  270. arch/x86/include/asm/proto.h +1 −0
  271. arch/x86/include/asm/ptrace.h +15 −0
  272. arch/x86/include/asm/smap.h +4 −6
  273. arch/x86/include/asm/smp.h +1 −0
  274. arch/x86/include/asm/thread_info.h +14 −1
  275. arch/x86/include/asm/xen/page.h +0 −12
  276. arch/x86/kernel/acpi/boot.c +12 −13
  277. arch/x86/kernel/acpi/wakeup_64.S +1 −1
  278. arch/x86/kernel/apic/apic.c +5 −0
  279. arch/x86/kernel/apic/io_apic.c +10 −0
  280. arch/x86/kernel/kprobes/ftrace.c +1 −1
  281. arch/x86/kernel/kvm.c +10 −13
  282. arch/x86/kernel/kvmclock.c +9 −10
  283. arch/x86/kernel/setup.c +2 −5
  284. arch/x86/kernel/sev-es.c +17 −5
  285. arch/x86/kernel/signal.c +1 −23
  286. arch/x86/kernel/smpboot.c +12 −14
  287. arch/x86/kernel/traps.c +3 −4
  288. arch/x86/kernel/unwind_orc.c +7 −7
  289. arch/x86/kvm/Makefile +1 −1
  290. arch/x86/kvm/hyperv.c +81 −10
  291. arch/x86/kvm/hyperv.h +1 −0
  292. arch/x86/kvm/lapic.c +11 −1
  293. arch/x86/kvm/mmu/mmu.c +5 −4
  294. arch/x86/kvm/mmu/mmu_internal.h +5 −0
  295. arch/x86/kvm/mmu/tdp_iter.c +18 −12
  296. arch/x86/kvm/mmu/tdp_iter.h +3 −1
  297. arch/x86/kvm/mmu/tdp_mmu.c +40 −37
  298. arch/x86/kvm/mmu/tdp_mmu.h +23 −1
  299. arch/x86/kvm/svm/nested.c +23 −5
  300. arch/x86/kvm/svm/pmu.c +8 −0
  301. arch/x86/kvm/svm/svm.c +13 −12
  302. arch/x86/kvm/vmx/vmx.c +6 −6
  303. arch/x86/kvm/x86.c +105 −67
  304. arch/x86/kvm/x86.h +0 −1
  305. arch/x86/lib/insn-eval.c +52 −14
  306. arch/x86/mm/mem_encrypt.c +1 −1
  307. arch/x86/net/bpf_jit_comp.c +42 −10
  308. arch/x86/net/bpf_jit_comp32.c +10 −1
  309. arch/x86/platform/iris/iris.c +0 −1
  310. arch/x86/xen/p2m.c +4 −9
  311. arch/x86/xen/setup.c +14 −2
  312. arch/xtensa/kernel/coprocessor.S +33 −31
  313. arch/xtensa/mm/fault.c +4 −1
  314. block/bio.c +26 −11
  315. block/blk-cgroup-rwstat.c +2 −1
  316. block/blk-crypto-fallback.c +1 −1
  317. block/blk-lib.c +1 −1
  318. block/blk-map.c +1 −1
  319. block/blk-merge.c +8 −0
  320. block/blk-mq-debugfs.c +0 −1
  321. block/blk-zoned.c +37 −3
  322. block/bounce.c +3 −3
  323. block/genhd.c +1 −3
  324. block/partitions/core.c +7 −0
  325. crypto/Kconfig +1 −1
  326. drivers/acpi/acpica/nsaccess.c +1 −2
  327. drivers/acpi/internal.h +5 −1
  328. drivers/acpi/processor_idle.c +5 −0
  329. drivers/acpi/scan.c +39 −6
  330. drivers/acpi/tables.c +39 −3
  331. drivers/acpi/video_detect.c +1 −0
  332. drivers/atm/eni.c +2 −1
  333. drivers/atm/fore200e.c +0 −2
  334. drivers/atm/idt77105.c +2 −2
  335. drivers/atm/lanai.c +4 −1
  336. drivers/atm/uPD98402.c +1 −1
  337. drivers/auxdisplay/charlcd.c +8 −10
  338. drivers/base/dd.c +8 −3
  339. drivers/base/power/runtime.c +69 −42
  340. drivers/base/swnode.c +20 −9
  341. drivers/block/drbd/drbd_int.h +1 −1
  342. drivers/block/floppy.c +0 −1
  343. drivers/block/null_blk/main.c +21 −5
  344. drivers/block/null_blk/null_blk.h +1 −0
  345. drivers/block/rsxx/core.c +1 −0
  346. drivers/block/umem.c +4 −1
  347. drivers/block/xen-blkback/blkback.c +1 −1
  348. drivers/block/zram/zram_drv.c +11 −6
  349. drivers/bluetooth/btrsi.c +0 −1
  350. drivers/bluetooth/btusb.c +2 −5
  351. drivers/bus/moxtet.c +2 −2
  352. drivers/bus/mvebu-mbus.c +1 −1
  353. drivers/bus/omap_l3_noc.c +2 −2
  354. drivers/bus/ti-sysc.c +3 −1
  355. drivers/char/agp/Kconfig +1 −1
  356. drivers/char/applicom.c +0 −3
  357. drivers/char/hw_random/pseries-rng.c +1 −2
  358. drivers/char/toshiba.c +0 −1
  359. drivers/char/tpm/tpm_ibmvtpm.c +1 −3
  360. drivers/clk/clk-fixed-factor.c +8 −1
  361. drivers/clk/clk.c +21 −26
  362. drivers/clk/qcom/camcc-sc7180.c +25 −25
  363. drivers/clk/qcom/clk-rcg2.c +9 −8
  364. drivers/clk/qcom/clk-rpmh.c +5 −2
  365. drivers/clk/qcom/gcc-sc7180.c +2 −2
  366. drivers/clk/socfpga/clk-gate.c +1 −1
  367. drivers/counter/stm32-timer-cnt.c +33 −22
  368. drivers/cpufreq/cpufreq-dt-platdev.c +2 −0
  369. drivers/cpufreq/freq_table.c +2 −2
  370. drivers/cpufreq/qcom-cpufreq-hw.c +3 −3
  371. drivers/crypto/nx/nx-842-pseries.c +1 −3
  372. drivers/crypto/nx/nx.c +1 −3
  373. drivers/cxl/mem.c +89 −63
  374. drivers/dax/bus.c +2 −4
  375. drivers/dma/dmaengine.c +1 −0
  376. drivers/dma/dw/Kconfig +2 −0
  377. drivers/dma/idxd/device.c +54 −11
  378. drivers/dma/idxd/idxd.h +3 −0
  379. drivers/dma/idxd/init.c +2 −9
  380. drivers/dma/idxd/irq.c +3 −1
  381. drivers/dma/idxd/sysfs.c +10 −9
  382. drivers/dma/plx_dma.c +11 −7
  383. drivers/dma/tegra20-apb-dma.c +2 −2
  384. drivers/dma/xilinx/xilinx_dpdma.c +19 −12
  385. drivers/extcon/extcon.c +1 −0
  386. drivers/firewire/nosy.c +7 −2
  387. drivers/firmware/efi/efi.c +2 −1
  388. drivers/firmware/efi/libstub/arm64-stub.c +1 −1
  389. drivers/firmware/efi/libstub/efi-stub.c +16 −0
  390. drivers/firmware/efi/vars.c +4 −0
  391. drivers/firmware/turris-mox-rwtm.c +2 −2
  392. drivers/gpio/gpio-moxtet.c +2 −2
  393. drivers/gpio/gpio-pca953x.c +23 −55
  394. drivers/gpio/gpiolib-acpi.c +15 −6
  395. drivers/gpio/gpiolib-sysfs.c +8 −0
  396. drivers/gpio/gpiolib.c +18 −11
  397. drivers/gpu/drm/Kconfig +1 −0
  398. drivers/gpu/drm/amd/amdgpu/amdgpu.h +4 −7
  399. drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +1 −1
  400. drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +34 −98
  401. drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +89 −0
  402. drivers/gpu/drm/amd/amdgpu/amdgpu_display.h +3 −0
  403. drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +23 −12
  404. drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +1 −1
  405. drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2 −2
  406. drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2 −5
  407. drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 −1
  408. drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +5 −5
  409. drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +8 −1
  410. drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +8 −1
  411. drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +7 −1
  412. drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +8 −1
  413. drivers/gpu/drm/amd/amdgpu/dce_virtual.c +14 −1
  414. drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c +1 −1
  415. drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +3 −3
  416. drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h +1 −1
  417. drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c +1 −1
  418. drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c +1 −1
  419. drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_vi.c +1 −1
  420. drivers/gpu/drm/amd/amdkfd/kfd_priv.h +4 −4
  421. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +30 −20
  422. drivers/gpu/drm/amd/display/dc/core/dc_link.c +0 −1
  423. drivers/gpu/drm/amd/display/dc/dc.h +1 −0
  424. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c +11 −0
  425. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h +6 −0
  426. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +7 −0
  427. drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c +1 −0
  428. drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +8 −32
  429. drivers/gpu/drm/amd/display/dc/dcn20/dcn20_link_encoder.c +1 −2
  430. drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c +1 −0
  431. drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +7 −6
  432. drivers/gpu/drm/amd/display/dc/dcn30/dcn30_cm_common.c +18 −8
  433. drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubp.c +1 −0
  434. drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubp.h +1 −0
  435. drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c +31 −0
  436. drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c +95 −1
  437. drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h +2 −0
  438. drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c +62 −6
  439. drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c +111 −11
  440. drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c +90 −0
  441. drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c +52 −21
  442. drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +3 −2
  443. drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +5 −0
  444. drivers/gpu/drm/drm_fb_helper.c +1 −1
  445. drivers/gpu/drm/drm_gem_shmem_helper.c +22 −10
  446. drivers/gpu/drm/drm_ioc32.c +11 −0
  447. drivers/gpu/drm/etnaviv/etnaviv_gem.c +2 −1
  448. drivers/gpu/drm/exynos/exynos5433_drm_decon.c +0 −1
  449. drivers/gpu/drm/i915/display/intel_acpi.c +20 −2
  450. drivers/gpu/drm/i915/display/intel_atomic_plane.c +3 −2
  451. drivers/gpu/drm/i915/display/intel_dp.c +1 −3
  452. drivers/gpu/drm/i915/display/intel_dp_aux.c +7 −0
  453. drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +0 −1
  454. drivers/gpu/drm/i915/display/intel_dp_link_training.c +58 −17
  455. drivers/gpu/drm/i915/display/intel_dp_link_training.h +1 −1
  456. drivers/gpu/drm/i915/display/intel_vdsc.c +2 −8
  457. drivers/gpu/drm/i915/display/vlv_dsi.c +2 −2
  458. drivers/gpu/drm/i915/gt/intel_engine_cs.c +6 −1
  459. drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c +12 −1
  460. drivers/gpu/drm/i915/i915_cmd_parser.c +13 −6
  461. drivers/gpu/drm/i915/i915_drv.h +1 −1
  462. drivers/gpu/drm/i915/i915_perf.c +5 −8
  463. drivers/gpu/drm/i915/i915_reg.h +22 −1
  464. drivers/gpu/drm/i915/intel_pm.c +17 −3
  465. drivers/gpu/drm/i915/intel_runtime_pm.c +24 −5
  466. drivers/gpu/drm/i915/intel_runtime_pm.h +5 −0
  467. drivers/gpu/drm/imx/imx-drm-core.c +1 −1
  468. drivers/gpu/drm/imx/imx-ldb.c +11 −1
  469. drivers/gpu/drm/meson/meson_drv.c +11 −0
  470. drivers/gpu/drm/msm/adreno/a5xx_gpu.c +2 −2
  471. drivers/gpu/drm/msm/adreno/a5xx_power.c +1 −1
  472. drivers/gpu/drm/msm/adreno/a6xx_gmu.c +1 −1
  473. drivers/gpu/drm/msm/adreno/a6xx_gpu.c +75 −33
  474. drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c +3 −1
  475. drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +7 −5
  476. drivers/gpu/drm/msm/dp/dp_aux.c +7 −0
  477. drivers/gpu/drm/msm/dsi/pll/dsi_pll.c +1 −1
  478. drivers/gpu/drm/msm/dsi/pll/dsi_pll.h +4 −2
  479. drivers/gpu/drm/msm/dsi/pll/dsi_pll_7nm.c +6 −5
  480. drivers/gpu/drm/msm/msm_atomic.c +5 −2
  481. drivers/gpu/drm/msm/msm_drv.c +13 −0
  482. drivers/gpu/drm/msm/msm_fence.c +1 −1
  483. drivers/gpu/drm/msm/msm_kms.h +2 −6
  484. drivers/gpu/drm/nouveau/dispnv50/disp.c +12 −1
  485. drivers/gpu/drm/nouveau/nouveau_bo.c +12 −2
  486. drivers/gpu/drm/omapdrm/dss/dsi.c +4 −3
  487. drivers/gpu/drm/panel/panel-dsi-cm.c +9 −3
  488. drivers/gpu/drm/qxl/qxl_display.c +1 −0
  489. drivers/gpu/drm/qxl/qxl_release.c +10 −2
  490. drivers/gpu/drm/radeon/radeon.h +2 −0
  491. drivers/gpu/drm/radeon/radeon_gem.c +2 −2
  492. drivers/gpu/drm/radeon/radeon_prime.c +2 −0
  493. drivers/gpu/drm/radeon/radeon_ttm.c +2 −2
  494. drivers/gpu/drm/rcar-du/rcar_du_encoder.c +6 −25
  495. drivers/gpu/drm/tegra/dc.c +13 −17
  496. drivers/gpu/drm/tegra/sor.c +7 −0
  497. drivers/gpu/drm/tiny/gm12u320.c +36 −8
  498. drivers/gpu/drm/ttm/ttm_bo.c +6 −2
  499. drivers/gpu/drm/ttm/ttm_pool.c +2 −2
  500. drivers/gpu/drm/udl/udl_drv.c +17 −0
  501. drivers/gpu/drm/udl/udl_drv.h +1 −0
  502. drivers/gpu/drm/udl/udl_main.c +10 −0
  503. drivers/gpu/drm/vc4/vc4_crtc.c +17 −0
  504. drivers/gpu/drm/vc4/vc4_plane.c +0 −1
  505. drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c +4 −0
  506. drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +8 −9
  507. drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +1 −4
  508. drivers/gpu/drm/vmwgfx/vmwgfx_mob.c +14 −0
  509. drivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.c +1 −3
  510. drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c +1 −1
  511. drivers/gpu/drm/xen/xen_drm_front.c +4 −2
  512. drivers/gpu/drm/xen/xen_drm_front_conn.h +0 −1
  513. drivers/gpu/host1x/bus.c +6 −4
  514. drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +37 −3
  515. drivers/hid/amd-sfh-hid/amd_sfh_pcie.h +0 −1
  516. drivers/hid/hid-alps.c +1 −0
  517. drivers/hid/hid-asus.c +3 −0
  518. drivers/hid/hid-cp2112.c +11 −11
  519. drivers/hid/hid-google-hammer.c +2 −0
  520. drivers/hid/hid-ids.h +2 −0
  521. drivers/hid/wacom_wac.c +3 −5
  522. drivers/i2c/busses/i2c-designware-master.c +1 −0
  523. drivers/i2c/busses/i2c-exynos5.c +1 −1
  524. drivers/i2c/busses/i2c-hix5hd2.c +1 −1
  525. drivers/i2c/busses/i2c-jz4780.c +2 −2
  526. drivers/i2c/busses/i2c-mv64xxx.c +4 −0
  527. drivers/i2c/busses/i2c-stm32f4.c +1 −1
  528. drivers/i2c/i2c-core-base.c +4 −3
  529. drivers/iio/adc/Kconfig +3 −0
  530. drivers/iio/adc/ab8500-gpadc.c +1 −1
  531. drivers/iio/adc/ad7949.c +1 −1
  532. drivers/iio/adc/qcom-spmi-vadc.c +1 −1
  533. drivers/iio/gyro/mpu3050-core.c +2 −0
  534. drivers/iio/humidity/hid-sensor-humidity.c +7 −5
  535. drivers/iio/imu/adis16400.c +1 −2
  536. drivers/iio/light/hid-sensor-prox.c +11 −2
  537. drivers/iio/temperature/hid-sensor-temperature.c +8 −6
  538. drivers/infiniband/core/addr.c +3 −1
  539. drivers/infiniband/hw/cxgb4/cm.c +3 −2
  540. drivers/infiniband/hw/hfi1/affinity.c +5 −16
  541. drivers/infiniband/hw/hfi1/hfi.h +1 −0
  542. drivers/infiniband/hw/hfi1/init.c +9 −1
  543. drivers/infiniband/hw/hfi1/netdev_rx.c +1 −2
  544. drivers/infiniband/hw/hns/hns_roce_hw_v2.c +3 −1
  545. drivers/infiniband/hw/mlx5/devx.c +1 −1
  546. drivers/infiniband/hw/mlx5/qp.c +14 −4
  547. drivers/infiniband/hw/qedr/verbs.c +2 −1
  548. drivers/infiniband/ulp/rtrs/rtrs-clt.c +1 −1
  549. drivers/input/joydev.c +0 −1
  550. drivers/input/joystick/n64joy.c +2 −2
  551. drivers/input/keyboard/nspire-keypad.c +31 −25
  552. drivers/input/serio/i8042-x86ia64io.h +1 −0
  553. drivers/input/touchscreen/elants_i2c.c +2 −3
  554. drivers/input/touchscreen/s6sy761.c +2 −2
  555. drivers/interconnect/bulk.c +1 −1
  556. drivers/interconnect/core.c +2 −0
  557. drivers/interconnect/qcom/msm8939.c +8 −8
  558. drivers/iommu/amd/init.c +20 −16
  559. drivers/iommu/tegra-smmu.c +3 −4
  560. drivers/irqchip/Kconfig +0 −9
  561. drivers/irqchip/irq-ingenic-tcu.c +1 −0
  562. drivers/irqchip/irq-ingenic.c +1 −0
  563. drivers/isdn/capi/kcapi.c +2 −2
  564. drivers/isdn/hardware/mISDN/mISDNipac.c +1 −1
  565. drivers/leds/leds-turris-omnia.c +2 −2
  566. drivers/leds/trigger/ledtrig-tty.c +4 −7
  567. drivers/mailbox/armada-37xx-rwtm-mailbox.c +2 −2
  568. drivers/md/bcache/super.c +1 −1
  569. drivers/md/dm-crypt.c +4 −4
  570. drivers/md/dm-ioctl.c +1 −1
  571. drivers/md/dm-table.c +25 −8
  572. drivers/md/dm-verity-fec.c +8 −3
  573. drivers/md/dm-verity-fec.h +1 −0
  574. drivers/md/dm-verity-target.c +1 −1
  575. drivers/md/dm-writecache.c +2 −2
  576. drivers/md/dm-zoned-target.c +1 −1
  577. drivers/md/dm.c +4 −1
  578. drivers/md/raid5-cache.c +2 −2
  579. drivers/md/raid5-ppl.c +1 −1
  580. drivers/media/firewire/firedtv-fw.c +0 −1
  581. drivers/media/pci/cx18/cx18-alsa-main.c +0 −1
  582. drivers/media/pci/cx18/cx18-driver.c +0 −1
  583. drivers/media/pci/cx25821/cx25821-alsa.c +0 −1
  584. drivers/media/pci/cx88/cx88-alsa.c +0 −1
  585. drivers/media/pci/ivtv/ivtv-alsa-main.c +0 −1
  586. drivers/media/pci/ivtv/ivtv-driver.c +0 −3
  587. drivers/media/pci/sta2x11/sta2x11_vip.c +0 −1
  588. drivers/media/platform/atmel/atmel-isi.c +0 −1
  589. drivers/media/platform/atmel/atmel-sama5d2-isc.c +0 −1
  590. drivers/media/platform/marvell-ccic/cafe-driver.c +0 −4
  591. drivers/media/platform/rockchip/rkisp1/rkisp1-params.c +0 −1
  592. drivers/media/platform/stm32/stm32-dcmi.c +0 −1
  593. drivers/media/platform/vsp1/vsp1_drm.c +3 −3
  594. drivers/media/rc/Makefile +1 −0
  595. drivers/media/rc/keymaps/Makefile +0 −1
  596. drivers/media/rc/keymaps/rc-cec.c +11 −17
  597. drivers/media/rc/rc-main.c +6 −0
  598. drivers/media/usb/cpia2/cpia2_v4l.c +0 −1
  599. drivers/media/usb/tm6000/tm6000-alsa.c +0 −1
  600. drivers/media/usb/tm6000/tm6000-dvb.c +0 −2
  601. drivers/media/usb/usbtv/usbtv-audio.c +1 −1
  602. drivers/mfd/intel_quark_i2c_gpio.c +4 −2
  603. drivers/misc/fastrpc.c +5 −0
  604. drivers/misc/habanalabs/common/debugfs.c +1 −4
  605. drivers/misc/habanalabs/common/device.c +35 −5
  606. drivers/misc/habanalabs/common/habanalabs.h +0 −2
  607. drivers/misc/habanalabs/common/habanalabs_ioctl.c +12 −0
  608. drivers/misc/habanalabs/common/irq.c +1 −1
  609. drivers/misc/habanalabs/common/mmu/mmu.c +26 −12
  610. drivers/misc/ibmvmc.c +1 −3
  611. drivers/misc/mei/client.c +7 −10
  612. drivers/misc/pvpanic.c +1 −0
  613. drivers/mmc/core/bus.c +5 −6
  614. drivers/mmc/core/mmc.c +11 −4
  615. drivers/mmc/host/mmci.c +9 −1
  616. drivers/mtd/maps/sun_uflash.c +0 −1
  617. drivers/mtd/nand/raw/mtk_nand.c +2 −2
  618. drivers/net/Kconfig +1 −1
  619. drivers/net/arcnet/com20020-pci.c +19 −15
  620. drivers/net/can/c_can/c_can.c +1 −23
  621. drivers/net/can/c_can/c_can_pci.c +2 −1
  622. drivers/net/can/c_can/c_can_platform.c +5 −1
  623. drivers/net/can/dev/netlink.c +1 −0
  624. drivers/net/can/flexcan.c +22 −10
  625. drivers/net/can/kvaser_pciefd.c +4 −0
  626. drivers/net/can/m_can/m_can.c +1 −4
  627. drivers/net/can/m_can/tcan4x5x-core.c +3 −3
  628. drivers/net/can/peak_canfd/peak_pciefd_main.c +0 −1
  629. drivers/net/can/sja1000/ems_pci.c +0 −1
  630. drivers/net/can/sja1000/ems_pcmcia.c +0 −1
  631. drivers/net/can/sja1000/kvaser_pci.c +0 −1
  632. drivers/net/can/sja1000/peak_pci.c +0 −2
  633. drivers/net/can/sja1000/peak_pcmcia.c +0 −1
  634. drivers/net/can/sja1000/plx_pci.c +0 −12
  635. drivers/net/can/spi/mcp251x.c +18 −6
  636. drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +4 −17
  637. drivers/net/can/usb/Kconfig +1 −0
  638. drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c +3 −1
  639. drivers/net/can/usb/peak_usb/pcan_usb.c +0 −2
  640. drivers/net/can/usb/peak_usb/pcan_usb_core.c +5 −1
  641. drivers/net/can/usb/peak_usb/pcan_usb_fd.c +0 −3
  642. drivers/net/can/usb/peak_usb/pcan_usb_pro.c +0 −2
  643. drivers/net/dsa/b53/b53_common.c +7 −7
  644. drivers/net/dsa/bcm_sf2.c +11 −6
  645. drivers/net/dsa/lantiq_gswip.c +173 −22
  646. drivers/net/dsa/mt7530.c +29 −27
  647. drivers/net/dsa/mv88e6xxx/chip.c +13 −17
  648. drivers/net/dsa/sja1105/sja1105_main.c +3 −3
  649. drivers/net/dsa/xrs700x/xrs700x.c +8 −2
  650. drivers/net/ethernet/amd/pcnet32.c +3 −2
  651. drivers/net/ethernet/amd/xgbe/xgbe.h +3 −3
  652. drivers/net/ethernet/atheros/alx/main.c +5 −2
  653. drivers/net/ethernet/broadcom/Kconfig +1 −1
  654. drivers/net/ethernet/broadcom/bcm4908_enet.c +4 −0
  655. drivers/net/ethernet/broadcom/bnxt/bnxt.c +15 −2
  656. drivers/net/ethernet/cadence/macb_main.c +16 −8
  657. drivers/net/ethernet/cavium/liquidio/cn66xx_regs.h +1 −1
  658. drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c +19 −4
  659. drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +2 −1
  660. drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c +15 −95
  661. drivers/net/ethernet/davicom/dm9000.c +22 −7
  662. drivers/net/ethernet/faraday/ftgmac100.c +1 −0
  663. drivers/net/ethernet/freescale/enetc/enetc.c +50 −43
  664. drivers/net/ethernet/freescale/enetc/enetc.h +5 −0
  665. drivers/net/ethernet/freescale/enetc/enetc_hw.h +17 −3
  666. drivers/net/ethernet/freescale/enetc/enetc_pf.c +87 −17
  667. drivers/net/ethernet/freescale/enetc/enetc_vf.c +7 −0
  668. drivers/net/ethernet/freescale/fec_ptp.c +7 −0
  669. drivers/net/ethernet/freescale/gianfar.c +20 −1
  670. drivers/net/ethernet/hisilicon/hns/hns_enet.c +3 −1
  671. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h +3 −3
  672. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +7 −9
  673. drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +4 −4
  674. drivers/net/ethernet/ibm/ibmveth.c +1 −3
  675. drivers/net/ethernet/ibm/ibmvnic.c +17 −30
  676. drivers/net/ethernet/intel/e1000e/82571.c +2 −0
  677. drivers/net/ethernet/intel/e1000e/hw.h +3 −3
  678. drivers/net/ethernet/intel/e1000e/netdev.c +5 −1
  679. drivers/net/ethernet/intel/i40e/i40e.h +1 −0
  680. drivers/net/ethernet/intel/i40e/i40e_debugfs.c +3 −0
  681. drivers/net/ethernet/intel/i40e/i40e_ethtool.c +48 −7
  682. drivers/net/ethernet/intel/i40e/i40e_main.c +35 −14
  683. drivers/net/ethernet/intel/i40e/i40e_txrx.c +5 −19
  684. drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +9 −0
  685. drivers/net/ethernet/intel/i40e/i40e_xsk.c +2 −2
  686. drivers/net/ethernet/intel/iavf/iavf_main.c +2 −1
  687. drivers/net/ethernet/intel/ice/ice.h +2 −2
  688. drivers/net/ethernet/intel/ice/ice_base.c +22 −2
  689. drivers/net/ethernet/intel/ice/ice_common.c +1 −1
  690. drivers/net/ethernet/intel/ice/ice_controlq.h +2 −2
  691. drivers/net/ethernet/intel/ice/ice_dcb.c +30 −10
  692. drivers/net/ethernet/intel/ice/ice_dcb_nl.c +0 −2
  693. drivers/net/ethernet/intel/ice/ice_ethtool.c +2 −2
  694. drivers/net/ethernet/intel/ice/ice_lib.c +2 −3
  695. drivers/net/ethernet/intel/ice/ice_main.c +39 −14
  696. drivers/net/ethernet/intel/ice/ice_switch.c +9 −6
  697. drivers/net/ethernet/intel/ice/ice_txrx.c +0 −17
  698. drivers/net/ethernet/intel/ice/ice_type.h +1 −0
  699. drivers/net/ethernet/intel/ice/ice_xsk.c +5 −5
  700. drivers/net/ethernet/intel/igb/e1000_hw.h +3 −3
  701. drivers/net/ethernet/intel/igb/igb.h +2 −2
  702. drivers/net/ethernet/intel/igb/igb_main.c +21 −12
  703. drivers/net/ethernet/intel/igb/igb_ptp.c +24 −7
  704. drivers/net/ethernet/intel/igc/igc.h +1 −1
  705. drivers/net/ethernet/intel/igc/igc_ethtool.c +4 −3
  706. drivers/net/ethernet/intel/igc/igc_main.c +9 −0
  707. drivers/net/ethernet/intel/igc/igc_ptp.c +40 −32
  708. drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c +5 −0
  709. drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +19 −4
  710. drivers/net/ethernet/intel/ixgbevf/ipsec.c +5 −0
  711. drivers/net/ethernet/marvell/Kconfig +2 −2
  712. drivers/net/ethernet/marvell/mv643xx_eth.c +1 −1
  713. drivers/net/ethernet/marvell/octeontx2/af/cgx.c +3 −1
  714. drivers/net/ethernet/marvell/octeontx2/af/npc_profile.h +0 −2
  715. drivers/net/ethernet/marvell/octeontx2/af/rvu.c +4 −2
  716. drivers/net/ethernet/marvell/octeontx2/af/rvu.h +1 −0
  717. drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c +16 −2
  718. drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c +36 −21
  719. drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +1 −1
  720. drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c +1 −1
  721. drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c +3 −1
  722. drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +5 −0
  723. drivers/net/ethernet/marvell/pxa168_eth.c +1 −1
  724. drivers/net/ethernet/mediatek/mtk_star_emac.c +3 −2
  725. drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +1 −1
  726. drivers/net/ethernet/mellanox/mlx4/en_netdev.c +2 −0
  727. drivers/net/ethernet/mellanox/mlx4/mlx4_en.h +1 −0
  728. drivers/net/ethernet/mellanox/mlx5/core/dev.c +2 −2
  729. drivers/net/ethernet/mellanox/mlx5/core/devlink.c +5 −0
  730. drivers/net/ethernet/mellanox/mlx5/core/en.h +5 −3
  731. drivers/net/ethernet/mellanox/mlx5/core/en/port.c +4 −19
  732. drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c +31 −8
  733. drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c +4 −4
  734. drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h +10 −0
  735. drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c +11 −15
  736. drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_geneve.c +33 −0
  737. drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_gre.c +1 −0
  738. drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_mplsoudp.c +1 −0
  739. drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c +1 −0
  740. drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h +6 −0
  741. drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c +19 −21
  742. drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c +4 −1
  743. drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h +3 −0
  744. drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_stats.c +30 −19
  745. drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +21 −12
  746. drivers/net/ethernet/mellanox/mlx5/core/en_main.c +77 −25
  747. drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +3 −2
  748. drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +2 −2
  749. drivers/net/ethernet/mellanox/mlx5/core/en_stats.c +0 −10
  750. drivers/net/ethernet/mellanox/mlx5/core/en_stats.h +0 −6
  751. drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +48 −12
  752. drivers/net/ethernet/mellanox/mlx5/core/en_tc.h +1 −0
  753. drivers/net/ethernet/mellanox/mlx5/core/eq.c +12 −1
  754. drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.c +5 −5
  755. drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +39 −28
  756. drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c +1 −0
  757. drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c +3 −1
  758. drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c +4 −4
  759. drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.c +1 −3
  760. drivers/net/ethernet/mellanox/mlx5/core/sf/hw_table.c +4 −6
  761. drivers/net/ethernet/mellanox/mlx5/core/sf/mlx5_ifc_vhca_event.h +1 −1
  762. drivers/net/ethernet/mellanox/mlx5/core/sf/vhca_event.c +11 −12
  763. drivers/net/ethernet/mellanox/mlx5/core/sf/vhca_event.h +3 −4
  764. drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c +1 −0
  765. drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v1.c +2 −2
  766. drivers/net/ethernet/mellanox/mlxsw/reg.h +1 −0
  767. drivers/net/ethernet/mellanox/mlxsw/spectrum.h +15 −0
  768. drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c +19 −5
  769. drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c +3 −4
  770. drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c +3 −4
  771. drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +7 −0
  772. drivers/net/ethernet/mellanox/mlxsw/switchx2.c +2 −1
  773. drivers/net/ethernet/microchip/lan743x_main.c +4 −4
  774. drivers/net/ethernet/mscc/Kconfig +1 −0
  775. drivers/net/ethernet/mscc/ocelot_flower.c +2 −1
  776. drivers/net/ethernet/myricom/myri10ge/myri10ge.c +1 −1
  777. drivers/net/ethernet/netronome/nfp/bpf/cmsg.c +1 −0
  778. drivers/net/ethernet/netronome/nfp/flower/main.h +8 −0
  779. drivers/net/ethernet/netronome/nfp/flower/metadata.c +32 −8
  780. drivers/net/ethernet/netronome/nfp/flower/offload.c +64 −2
  781. drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c +13 −2
  782. drivers/net/ethernet/pensando/ionic/ionic_txrx.c +7 −6
  783. drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c +3 −0
  784. drivers/net/ethernet/realtek/r8169_main.c +12 −5
  785. drivers/net/ethernet/renesas/sh_eth.c +7 −0
  786. drivers/net/ethernet/socionext/netsec.c +6 −3
  787. drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +45 −14
  788. drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +2 −0
  789. drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c +49 −10
  790. drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c +18 −1
  791. drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c +0 −4
  792. drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c +1 −1
  793. drivers/net/ethernet/stmicro/stmmac/enh_desc.c +6 −3
  794. drivers/net/ethernet/stmicro/stmmac/hwif.h +3 −2
  795. drivers/net/ethernet/stmicro/stmmac/norm_desc.c +6 −3
  796. drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +52 −24
  797. drivers/net/ethernet/sun/niu.c +0 −2
  798. drivers/net/ethernet/tehuti/tehuti.c +1 −0
  799. drivers/net/ethernet/xilinx/xilinx_axienet.h +12 −0
  800. drivers/net/ethernet/xilinx/xilinx_axienet_main.c +31 −18
  801. drivers/net/geneve.c +26 −4
  802. drivers/net/hamradio/6pack.c +0 −5
  803. drivers/net/hamradio/scc.c +0 −1
  804. drivers/net/hyperv/hyperv_net.h +1 −1
  805. drivers/net/hyperv/netvsc_drv.c +9 −4
  806. drivers/net/hyperv/rndis_filter.c +1 −1
  807. drivers/net/ieee802154/atusb.c +1 −0
  808. drivers/net/ipa/ipa_cmd.c +33 −17
  809. drivers/net/ipa/ipa_qmi.c +2 −0
  810. drivers/net/netdevsim/netdev.c +1 −0
  811. drivers/net/phy/bcm-phy-lib.c +10 −3
  812. drivers/net/phy/broadcom.c +9 −0
  813. drivers/net/phy/dp83822.c +5 −4
  814. drivers/net/phy/dp83tc811.c +6 −5
  815. drivers/net/phy/marvell.c +29 −3
  816. drivers/net/phy/phy.c +4 −2
  817. drivers/net/phy/phy_device.c +2 −4
  818. drivers/net/phy/phylink.c +1 −1
  819. drivers/net/tun.c +48 −0
  820. drivers/net/usb/cdc-phonet.c +2 −0
  821. drivers/net/usb/cdc_ncm.c +5 −5
  822. drivers/net/usb/hso.c +12 −21
  823. drivers/net/usb/qmi_wwan.c +0 −14
  824. drivers/net/usb/r8152.c +10 −30
  825. drivers/net/usb/usbnet.c +1 −1
  826. drivers/net/veth.c +1 −2
  827. drivers/net/virtio_net.c +7 −3
  828. drivers/net/vrf.c +4 −6
  829. drivers/net/vxlan.c +14 −4
  830. drivers/net/wan/fsl_ucc_hdlc.c +6 −2
  831. drivers/net/wan/hdlc_fr.c +3 −2
  832. drivers/net/wan/hdlc_x25.c +41 −1
  833. drivers/net/wan/lapbether.c +0 −3
  834. drivers/net/wireless/admtek/adm8211.c +0 −1
  835. drivers/net/wireless/ath/ath11k/mac.c +2 −2
  836. drivers/net/wireless/ath/ath11k/qmi.c +2 −2
  837. drivers/net/wireless/ath/ath5k/base.c +0 −1
  838. drivers/net/wireless/ath/ath9k/ath9k.h +2 −1
  839. drivers/net/wireless/ath/ath9k/hw.c +0 −1
  840. drivers/net/wireless/ath/ath9k/init.c +0 −1
  841. drivers/net/wireless/ath/ath9k/xmit.c +6 −0
  842. drivers/net/wireless/atmel/atmel.c +0 −1
  843. drivers/net/wireless/atmel/atmel_cs.c +0 −1
  844. drivers/net/wireless/atmel/atmel_pci.c +0 −1
  845. drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +1 −1
  846. drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c +0 −1
  847. drivers/net/wireless/broadcom/brcm80211/brcmutil/utils.c +0 −1
  848. drivers/net/wireless/cisco/airo.c +0 −1
  849. drivers/net/wireless/cisco/airo_cs.c +0 −1
  850. drivers/net/wireless/intel/iwlwifi/fw/notif-wait.c +5 −5
  851. drivers/net/wireless/intel/iwlwifi/fw/pnvm.c +2 −2
  852. drivers/net/wireless/intel/iwlwifi/iwl-config.h +1 −0
  853. drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +1 −1
  854. drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h +2 −0
  855. drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c +5 −2
  856. drivers/net/wireless/intel/iwlwifi/mvm/fw.c +1 −0
  857. drivers/net/wireless/intel/iwlwifi/mvm/rfi.c +3 −3
  858. drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +12 −5
  859. drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c +1 −30
  860. drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c +1 −2
  861. drivers/net/wireless/intel/iwlwifi/pcie/drv.c +28 −2
  862. drivers/net/wireless/intel/iwlwifi/pcie/rx.c +2 −1
  863. drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c +35 −0
  864. drivers/net/wireless/intel/iwlwifi/pcie/tx.c +4 −3
  865. drivers/net/wireless/intersil/hostap/hostap_cs.c +0 −1
  866. drivers/net/wireless/intersil/hostap/hostap_pci.c +0 −1
  867. drivers/net/wireless/intersil/hostap/hostap_plx.c +0 −1
  868. drivers/net/wireless/mediatek/mt76/dma.c +13 −13
  869. drivers/net/wireless/mediatek/mt76/mt7915/mac.c +5 −5
  870. drivers/net/wireless/mediatek/mt76/mt7915/testmode.c +2 −2
  871. drivers/net/wireless/mediatek/mt76/mt7921/mcu.c +1 −3
  872. drivers/net/wireless/mediatek/mt76/mt7921/regs.h +2 −2
  873. drivers/net/wireless/ralink/rt2x00/rt2400pci.c +0 −1
  874. drivers/net/wireless/ralink/rt2x00/rt2500pci.c +0 −1
  875. drivers/net/wireless/ralink/rt2x00/rt2500usb.c +0 −1
  876. drivers/net/wireless/ralink/rt2x00/rt2800pci.c +0 −1
  877. drivers/net/wireless/ralink/rt2x00/rt2800usb.c +0 −1
  878. drivers/net/wireless/ralink/rt2x00/rt61pci.c +0 −2
  879. drivers/net/wireless/ralink/rt2x00/rt73usb.c +0 −1
  880. drivers/net/wireless/rsi/rsi_91x_main.c +0 −1
  881. drivers/net/wireless/rsi/rsi_91x_sdio.c +0 −1
  882. drivers/net/wireless/rsi/rsi_91x_usb.c +0 −1
  883. drivers/net/wireless/virt_wifi.c +3 −2
  884. drivers/net/xen-netback/netback.c +2 −2
  885. drivers/net/xen-netback/xenbus.c +8 −4
  886. drivers/nvdimm/bus.c +6 −8
  887. drivers/nvdimm/pmem.c +33 −4
  888. drivers/nvdimm/region_devs.c +14 −2
  889. drivers/nvme/host/core.c +32 −47
  890. drivers/nvme/host/fabrics.h +7 −0
  891. drivers/nvme/host/fc.c +5 −4
  892. drivers/nvme/host/pci.c +1 −0
  893. drivers/nvme/host/rdma.c +7 −4
  894. drivers/nvme/host/tcp.c +15 −5
  895. drivers/nvme/host/zns.c +7 −2
  896. drivers/nvme/target/core.c +14 −3
  897. drivers/nvme/target/loop.c +2 −2
  898. drivers/nvme/target/passthru.c +3 −3
  899. drivers/nvme/target/rdma.c +2 −3
  900. drivers/nvme/target/tcp.c +1 −1
  901. drivers/of/fdt.c +23 −13
  902. drivers/of/of_private.h +2 −0
  903. drivers/of/overlay.c +15 −9
  904. drivers/of/property.c +10 −1
  905. drivers/of/unittest.c +16 −6
  906. drivers/opp/core.c +25 −23
  907. drivers/opp/opp.h +2 −0
  908. drivers/parport/parport_amiga.c +0 −1
  909. drivers/parport/parport_atari.c +0 −1
  910. drivers/parport/parport_gsc.c +0 −1
  911. drivers/parport/parport_mfc3.c +0 −1
  912. drivers/parport/parport_sunbpp.c +0 −1
  913. drivers/pci/hotplug/rpadlpar_sysfs.c +6 −8
  914. drivers/pci/hotplug/s390_pci_hpc.c +2 −1
  915. drivers/pci/xen-pcifront.c +2 −2
  916. drivers/perf/arm_dmc620_pmu.c +1 −0
  917. drivers/pinctrl/intel/pinctrl-intel.c +8 −1
  918. drivers/pinctrl/pinctrl-microchip-sgpio.c +1 −1
  919. drivers/pinctrl/pinctrl-rockchip.c +8 −5
  920. drivers/pinctrl/qcom/pinctrl-lpass-lpi.c +1 −1
  921. drivers/pinctrl/qcom/pinctrl-sc7280.c +8 −8
  922. drivers/pinctrl/qcom/pinctrl-sdx55.c +1 −1
  923. drivers/platform/x86/Kconfig +8 −3
  924. drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c +3 −0
  925. drivers/platform/x86/dell/dell-wmi-sysman/int-attributes.c +3 −0
  926. drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c +3 −0
  927. drivers/platform/x86/dell/dell-wmi-sysman/string-attributes.c +3 −0
  928. drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +32 −52
  929. drivers/platform/x86/intel-hid.c +16 −7
  930. drivers/platform/x86/intel-vbtn.c +10 −2
  931. drivers/platform/x86/intel_pmc_core.c +35 −15
  932. drivers/platform/x86/intel_pmt_class.c +1 −1
  933. drivers/platform/x86/intel_pmt_crashlog.c +6 −7
  934. drivers/platform/x86/thinkpad_acpi.c +79 −29
  935. drivers/ptp/ptp_qoriq.c +7 −6
  936. drivers/ras/cec.c +12 −3
  937. drivers/regulator/bd9571mwv-regulator.c +4 −4
  938. drivers/regulator/mt6315-regulator.c +2 −2
  939. drivers/regulator/pca9450-regulator.c +9 −1
  940. drivers/regulator/qcom-rpmh-regulator.c +3 −3
  941. drivers/regulator/rt4831-regulator.c +2 −2
  942. drivers/remoteproc/pru_rproc.c +19 −1
  943. drivers/remoteproc/qcom_pil_info.c +1 −1
  944. drivers/s390/block/dasd.c +3 −4
  945. drivers/s390/char/tty3270.c +4 −2
  946. drivers/s390/char/zcore.c +27 −17
  947. drivers/s390/cio/device_fsm.c +1 −1
  948. drivers/s390/cio/vfio_ccw_ops.c +3 −3
  949. drivers/s390/crypto/vfio_ap_ops.c +1 −1
  950. drivers/s390/net/qeth_core.h +2 −1
  951. drivers/s390/net/qeth_core_main.c +60 −68
  952. drivers/sbus/char/display7seg.c +0 −1
  953. drivers/scsi/hpsa.c +0 −1
  954. drivers/scsi/hpsa_cmd.h +45 −33
  955. drivers/scsi/ibmvscsi/ibmvfc.c +93 −41
  956. drivers/scsi/ibmvscsi/ibmvscsi.c +1 −3
  957. drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +1 −3
  958. drivers/scsi/libiscsi.c +3 −23
  959. drivers/scsi/libsas/sas_ata.c +4 −5
  960. drivers/scsi/lpfc/lpfc_debugfs.c +2 −2
  961. drivers/scsi/mpt3sas/mpt3sas_base.c +6 −2
  962. drivers/scsi/mpt3sas/mpt3sas_scsih.c +1 −1
  963. drivers/scsi/myrs.c +1 −1
  964. drivers/scsi/pcmcia/nsp_cs.c +0 −1
  965. drivers/scsi/pm8001/pm8001_hwi.c +4 −4
  966. drivers/scsi/qedi/qedi_main.c +1 −0
  967. drivers/scsi/qla2xxx/qla_target.c +5 −8
  968. drivers/scsi/qla2xxx/qla_target.h +1 −1
  969. drivers/scsi/qla2xxx/tcm_qla2xxx.c +0 −4
  970. drivers/scsi/scsi_transport_iscsi.c +26 −2
  971. drivers/scsi/scsi_transport_srp.c +1 −1
  972. drivers/scsi/sd_zbc.c +11 −8
  973. drivers/scsi/smartpqi/smartpqi_init.c +0 −1
  974. drivers/scsi/st.c +1 −1
  975. drivers/scsi/ufs/ufs-mediatek.c +1 −1
  976. drivers/scsi/ufs/ufs-qcom.c +10 −0
  977. drivers/scsi/ufs/ufshcd.c +27 −45
  978. drivers/scsi/vmw_pvscsi.c +0 −2
  979. drivers/scsi/vmw_pvscsi.h +0 −2
  980. drivers/sh/maple/maple.c +0 −1
  981. drivers/soc/fsl/qbman/qman.c +1 −1
  982. drivers/soc/litex/litex_soc_ctrl.c +0 −1
  983. drivers/soc/qcom/qcom-geni-se.c +3 −74
  984. drivers/soc/ti/omap_prm.c +6 −2
  985. drivers/spi/spi-cadence-quadspi.c +1 −0
  986. drivers/staging/comedi/drivers/addi_apci_1032.c +3 −1
  987. drivers/staging/comedi/drivers/addi_apci_1500.c +9 −9
  988. drivers/staging/comedi/drivers/adv_pci1710.c +5 −5
  989. drivers/staging/comedi/drivers/amplc_pc236_common.c +3 −1
  990. drivers/staging/comedi/drivers/cb_pcidas.c +1 −1
  991. drivers/staging/comedi/drivers/cb_pcidas64.c +1 −1
  992. drivers/staging/comedi/drivers/comedi_parport.c +2 −1
  993. drivers/staging/comedi/drivers/das6402.c +1 −1
  994. drivers/staging/comedi/drivers/das800.c +1 −1
  995. drivers/staging/comedi/drivers/dmm32at.c +1 −1
  996. drivers/staging/comedi/drivers/me4000.c +1 −1
  997. drivers/staging/comedi/drivers/ni_6527.c +3 −1
  998. drivers/staging/comedi/drivers/ni_65xx.c +2 −1
  999. drivers/staging/comedi/drivers/pcl711.c +1 −1
  1000. drivers/staging/comedi/drivers/pcl726.c +3 −1
  1001. drivers/staging/comedi/drivers/pcl818.c +1 −1
  1002. drivers/staging/comedi/drivers/vmk80xx.c +0 −1
  1003. drivers/staging/ks7010/ks_wlan_net.c +4 −2
  1004. drivers/staging/rtl8188eu/core/rtw_ap.c +5 −0
  1005. drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +4 −2
  1006. drivers/staging/rtl8192e/Kconfig +1 −0
  1007. drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +4 −3
  1008. drivers/staging/rtl8192e/rtllib.h +1 −1
  1009. drivers/staging/rtl8192e/rtllib_rx.c +1 −1
  1010. drivers/staging/rtl8192u/r8192U_wx.c +4 −2
  1011. drivers/staging/rtl8712/rtl871x_cmd.c +4 −2
  1012. drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 −1
  1013. drivers/staging/vt6655/rxtx.h +2 −2
  1014. drivers/staging/wfx/bh.c +1 −0
  1015. drivers/staging/wfx/bh.h +4 −0
  1016. drivers/staging/wfx/bus.h +3 −0
  1017. drivers/staging/wfx/bus_sdio.c +6 −0
  1018. drivers/staging/wfx/bus_spi.c +7 −0
  1019. drivers/staging/wfx/data_rx.c +5 −0
  1020. drivers/staging/wfx/data_tx.c +5 −0
  1021. drivers/staging/wfx/data_tx.h +3 −0
  1022. drivers/staging/wfx/debug.c +6 −0
  1023. drivers/staging/wfx/fwio.c +2 −0
  1024. drivers/staging/wfx/hif_api_cmd.h +4 −0
  1025. drivers/staging/wfx/hif_api_general.h +9 −0
  1026. drivers/staging/wfx/hif_tx.c +4 −0
  1027. drivers/staging/wfx/hif_tx_mib.c +5 −0
  1028. drivers/staging/wfx/hwio.c +3 −0
  1029. drivers/staging/wfx/hwio.h +2 −0
  1030. drivers/staging/wfx/key.c +2 −0
  1031. drivers/staging/wfx/key.h +2 −0
  1032. drivers/staging/wfx/main.c +7 −0
  1033. drivers/staging/wfx/main.h +3 −0
  1034. drivers/staging/wfx/queue.c +4 −0
  1035. drivers/staging/wfx/queue.h +3 −0
  1036. drivers/staging/wfx/scan.h +2 −0
  1037. drivers/staging/wfx/sta.c +6 −0
  1038. drivers/staging/wfx/sta.h +2 −0
  1039. drivers/staging/wfx/traces.h +3 −0
  1040. drivers/staging/wfx/wfx.h +3 −0
  1041. drivers/target/iscsi/iscsi_target.c +1 −2
  1042. drivers/target/target_core_pscsi.c +8 −1
  1043. drivers/tee/optee/core.c +0 −1
  1044. drivers/thermal/thermal_sysfs.c +3 −0
  1045. drivers/thunderbolt/retimer.c +2 −2
  1046. drivers/thunderbolt/switch.c +8 −10
  1047. drivers/thunderbolt/tb.c +4 −0
  1048. drivers/tty/hvc/hvcs.c +1 −3
  1049. drivers/tty/pty.c +2 −13
  1050. drivers/tty/serial/icom.c +0 −2
  1051. drivers/tty/serial/jsm/jsm_driver.c +0 −1
  1052. drivers/tty/serial/max310x.c +5 −24
  1053. drivers/tty/serial/qcom_geni_serial.c +0 −7
  1054. drivers/tty/tty_io.c +2 −3
  1055. drivers/usb/cdns3/cdnsp-gadget.c +4 −0
  1056. drivers/usb/cdns3/cdnsp-ring.c +4 −1
  1057. drivers/usb/class/cdc-acm.c +75 −50
  1058. drivers/usb/class/usblp.c +12 −4
  1059. drivers/usb/core/quirks.c +4 −0
  1060. drivers/usb/core/usb.c +32 −0
  1061. drivers/usb/dwc2/hcd.c +3 −2
  1062. drivers/usb/dwc3/dwc3-pci.c +2 −0
  1063. drivers/usb/dwc3/dwc3-qcom.c +16 −5
  1064. drivers/usb/dwc3/gadget.c +11 −11
  1065. drivers/usb/gadget/configfs.c +10 −4
  1066. drivers/usb/gadget/function/f_uac1.c +1 −0
  1067. drivers/usb/gadget/function/f_uac2.c +1 −1
  1068. drivers/usb/gadget/function/u_ether_configfs.h +2 −3
  1069. drivers/usb/gadget/udc/amd5536udc_pci.c +5 −5
  1070. drivers/usb/gadget/udc/s3c2410_udc.c +2 −2
  1071. drivers/usb/host/xhci-mtk.c +9 −1
  1072. drivers/usb/host/xhci-pci.c +11 −2
  1073. drivers/usb/host/xhci-ring.c +2 −1
  1074. drivers/usb/host/xhci.c +43 −35
  1075. drivers/usb/host/xhci.h +1 −0
  1076. drivers/usb/misc/ldusb.c +0 −1
  1077. drivers/usb/musb/musb_core.c +8 −4
  1078. drivers/usb/renesas_usbhs/pipe.c +2 −0
  1079. drivers/usb/serial/ch341.c +1 −0
  1080. drivers/usb/serial/cp210x.c +3 −0
  1081. drivers/usb/serial/io_edgeport.c +16 −10
  1082. drivers/usb/serial/xr_serial.c +0 −25
  1083. drivers/usb/storage/transport.c +7 −0
  1084. drivers/usb/storage/unusual_devs.h +12 −0
  1085. drivers/usb/typec/tcpm/tcpm.c +9 −2
  1086. drivers/usb/typec/tps6598x.c +0 −1
  1087. drivers/usb/usbip/stub_dev.c +42 −7
  1088. drivers/usb/usbip/usbip_common.h +3 −0
  1089. drivers/usb/usbip/usbip_event.c +2 −0
  1090. drivers/usb/usbip/vhci_hcd.c +3 −0
  1091. drivers/usb/usbip/vhci_sysfs.c +56 −7
  1092. drivers/usb/usbip/vudc_dev.c +1 −0
  1093. drivers/usb/usbip/vudc_sysfs.c +47 −7
  1094. drivers/vdpa/ifcvf/ifcvf_main.c +2 −3
  1095. drivers/vdpa/mlx5/core/mlx5_vdpa.h +4 −0
  1096. drivers/vdpa/mlx5/core/mr.c +7 −2
  1097. drivers/vdpa/mlx5/core/resources.c +2 −1
  1098. drivers/vdpa/mlx5/net/mlx5_vnet.c +26 −18
  1099. drivers/vdpa/vdpa.c +10 −8
  1100. drivers/vdpa/vdpa_sim/vdpa_sim.c +1 −1
  1101. drivers/vdpa/vdpa_sim/vdpa_sim_net.c +2 −3
  1102. drivers/vfio/Kconfig +2 −2
  1103. drivers/vfio/pci/Kconfig +1 −1
  1104. drivers/vfio/pci/vfio_pci.c +3 −1
  1105. drivers/vfio/platform/Kconfig +2 −2
  1106. drivers/vfio/vfio_iommu_type1.c +18 −8
  1107. drivers/vhost/vdpa.c +11 −9
  1108. drivers/vhost/vhost.c +1 −1
  1109. drivers/video/fbdev/aty/atyfb.h +0 −3
  1110. drivers/video/fbdev/aty/atyfb_base.c +5 −4
  1111. drivers/video/fbdev/core/fbcon.c +3 −0
  1112. drivers/video/fbdev/hyperv_fb.c +0 −3
  1113. drivers/virt/acrn/hsm.c +10 −1
  1114. drivers/virt/acrn/irqfd.c +3 −3
  1115. drivers/virtio/virtio.c +2 −4
  1116. drivers/virtio/virtio_mmio.c +1 −2
  1117. drivers/watchdog/armada_37xx_wdt.c +2 −2
  1118. drivers/watchdog/cpu5wdt.c +0 −1
  1119. drivers/watchdog/cpwd.c +0 −1
  1120. drivers/watchdog/riowd.c +0 −1
  1121. drivers/xen/Kconfig +2 −2
  1122. drivers/xen/events/events_2l.c +15 −7
  1123. drivers/xen/events/events_base.c +100 −30
  1124. drivers/xen/events/events_fifo.c +0 −7
  1125. drivers/xen/events/events_internal.h +8 −6
  1126. drivers/xen/gntdev.c +33 −21
  1127. fs/Kconfig +1 −1
  1128. fs/afs/dir.c +0 −1
  1129. fs/afs/file.c +0 −1
  1130. fs/afs/fs_operation.c +5 −2
  1131. fs/afs/inode.c +0 −1
  1132. fs/afs/internal.h +0 −1
  1133. fs/afs/mntpt.c +0 −1
  1134. fs/afs/write.c +1 −2
  1135. fs/afs/xattr.c +7 −24
  1136. fs/binfmt_misc.c +14 −15
  1137. fs/block_dev.c +19 −6
  1138. fs/btrfs/Makefile +6 −4
  1139. fs/btrfs/ctree.c +2 −0
  1140. fs/btrfs/dev-replace.c +3 −0
  1141. fs/btrfs/disk-io.c +17 −2
  1142. fs/btrfs/extent-tree.c +22 −1
  1143. fs/btrfs/extent_io.c +32 −3
  1144. fs/btrfs/inode.c +35 −20
  1145. fs/btrfs/qgroup.c +10 −2
  1146. fs/btrfs/reada.c +18 −17
  1147. fs/btrfs/scrub.c +1 −1
  1148. fs/btrfs/tree-log.c +4 −4
  1149. fs/btrfs/volumes.c +3 −0
  1150. fs/btrfs/zoned.c +42 −11
  1151. fs/cachefiles/bind.c +6 −0
  1152. fs/cachefiles/rdwr.c +3 −4
  1153. fs/cifs/Kconfig +1 −2
  1154. fs/cifs/Makefile +3 −2
  1155. fs/cifs/cifs_debug.c +1 −1
  1156. fs/cifs/cifs_swn.c +1 −1
  1157. fs/cifs/cifsacl.c +5 −3
  1158. fs/cifs/cifsfs.c +3 −2
  1159. fs/cifs/cifsglob.h +12 −13
  1160. fs/cifs/cifspdu.h +5 −0
  1161. fs/cifs/connect.c +23 −8
  1162. fs/cifs/file.c +1 −0
  1163. fs/cifs/fs_context.c +4 −2
  1164. fs/cifs/inode.c +9 −1
  1165. fs/cifs/sess.c +1 −0
  1166. fs/cifs/smb2glob.h +1 −0
  1167. fs/cifs/smb2inode.c +1 −0
  1168. fs/cifs/smb2misc.c +7 −7
  1169. fs/cifs/smb2ops.c +25 −12
  1170. fs/cifs/smb2pdu.c +2 −4
  1171. fs/cifs/smb2proto.h +1 −2
  1172. fs/cifs/smb2transport.c +28 −9
  1173. fs/cifs/transport.c +8 −3
  1174. fs/configfs/file.c +2 −4
  1175. fs/crypto/bio.c +3 −3
  1176. fs/direct-io.c +3 −2
  1177. fs/erofs/data.c +11 −17
  1178. fs/erofs/zdata.c +1 −1
  1179. fs/ext4/balloc.c +26 −12
  1180. fs/ext4/ext4.h +3 −0
  1181. fs/ext4/extents.c +1 −1
  1182. fs/ext4/fast_commit.c +7 −2
  1183. fs/ext4/inode.c +10 −8
  1184. fs/ext4/mballoc.c +9 −2
  1185. fs/ext4/namei.c +39 −11
  1186. fs/ext4/page-io.c +1 −1
  1187. fs/ext4/super.c +6 −1
  1188. fs/ext4/sysfs.c +7 −0
  1189. fs/ext4/verity.c +55 −34
  1190. fs/ext4/xattr.c +5 −1
  1191. fs/f2fs/checkpoint.c +1 −1
  1192. fs/f2fs/data.c +2 −2
  1193. fs/f2fs/segment.c +1 −1
  1194. fs/f2fs/segment.h +2 −2
  1195. fs/f2fs/super.c +2 −2
  1196. fs/file.c +17 −4
  1197. fs/fuse/dev.c +16 −10
  1198. fs/fuse/fuse_i.h +1 −0
  1199. fs/fuse/virtio_fs.c +8 −1
  1200. fs/gfs2/log.c +5 −1
  1201. fs/gfs2/lops.c +1 −1
  1202. fs/gfs2/ops_fstype.c +1 −3
  1203. fs/gfs2/super.c +11 −13
  1204. fs/gfs2/super.h +1 −1
  1205. fs/gfs2/trans.c +2 −0
  1206. fs/gfs2/util.c +11 −6
  1207. fs/hostfs/hostfs_kern.c +3 −4
  1208. fs/io-wq.c +47 −26
  1209. fs/io-wq.h +10 −2
  1210. fs/io_uring.c +636 −484
  1211. fs/iomap/buffered-io.c +2 −2
  1212. fs/iomap/direct-io.c +2 −2
  1213. fs/iomap/swapfile.c +10 −0
  1214. fs/locks.c +0 −3
  1215. fs/mpage.c +1 −1
  1216. fs/namei.c +8 −6
  1217. fs/nfs/Kconfig +1 −1
  1218. fs/nfs/dir.c +33 −25
  1219. fs/nfs/inode.c +4 −3
  1220. fs/nfs/internal.h +2 −1
  1221. fs/nfs/nfs3xdr.c +2 −1
  1222. fs/nfs/nfs42proc.c +7 −5
  1223. fs/nfs/nfs4proc.c +16 −17
  1224. fs/nfs/unlink.c +3 −3
  1225. fs/nfs/write.c +4 −4
  1226. fs/nfsd/Kconfig +1 −0
  1227. fs/nfsd/filecache.c +2 −0
  1228. fs/nfsd/nfs4callback.c +1 −0
  1229. fs/nfsd/nfs4proc.c +1 −1
  1230. fs/nfsd/nfs4state.c +15 −40
  1231. fs/nilfs2/segbuf.c +1 −1
  1232. fs/ocfs2/aops.c +1 −10
  1233. fs/ocfs2/file.c +6 −2
  1234. fs/pnode.h +1 −1
  1235. fs/proc/task_mmu.c +0 −2
  1236. fs/readdir.c +6 −0
  1237. fs/reiserfs/xattr.h +1 −1
  1238. fs/select.c +4 −6
  1239. fs/squashfs/block.c +1 −1
  1240. fs/squashfs/export.c +6 −2
  1241. fs/squashfs/id.c +4 −2
  1242. fs/squashfs/squashfs_fs.h +1 −0
  1243. fs/squashfs/xattr_id.c +4 −2
  1244. fs/xfs/xfs_inode.c +8 −6
  1245. fs/xfs/xfs_itable.c +6 −0
  1246. fs/xfs/xfs_mount.c +44 −46
  1247. fs/xfs/xfs_symlink.c +2 −1
  1248. fs/zonefs/super.c +88 −15
  1249. include/acpi/acpi_bus.h +1 −0
  1250. include/drm/ttm/ttm_bo_api.h +4 −2
  1251. include/dt-bindings/bus/moxtet.h +1 −1
  1252. include/kvm/arm_pmu.h +7 −2
  1253. include/linux/acpi.h +16 −3
  1254. include/linux/amba/bus.h +11 −0
  1255. include/linux/armada-37xx-rwtm-mailbox.h +1 −1
  1256. include/linux/atmdev.h +1 −1
  1257. include/linux/avf/virtchnl.h +0 −2
  1258. include/linux/bio.h +2 −2
  1259. include/linux/blkdev.h +0 −2
  1260. include/linux/bpf.h +27 −8
  1261. include/linux/can/skb.h +6 −2
  1262. include/linux/compiler-clang.h +6 −0
  1263. include/linux/compiler-version.h +14 −0
  1264. include/linux/cpu.h +3 −0
  1265. include/linux/device-mapper.h +14 −1
  1266. include/linux/efi.h +4 −2
  1267. include/linux/ethtool.h +16 −6
  1268. include/linux/extcon.h +23 −0
  1269. include/linux/firmware/intel/stratix10-svc-client.h +1 −1
  1270. include/linux/gpio/consumer.h +2 −0
  1271. include/linux/host1x.h +8 −1
  1272. include/linux/hugetlb_cgroup.h +13 −2
  1273. include/linux/if_macvlan.h +2 −1
  1274. include/linux/io_uring.h +0 −25
  1275. include/linux/irqdomain.h +0 −4
  1276. include/linux/kasan.h +1 −1
  1277. include/linux/kconfig.h +0 −2
  1278. include/linux/marvell_phy.h +3 −2
  1279. include/linux/memblock.h +2 −2
  1280. include/linux/memcontrol.h +2 −4
  1281. include/linux/mlx5/mlx5_ifc.h +6 −4
  1282. include/linux/mlx5/qp.h +7 −0
  1283. include/linux/mm.h +36 −3
  1284. include/linux/mm_types.h +1 −0
  1285. include/linux/mmu_notifier.h +5 −5
  1286. include/linux/module.h +0 −3
  1287. include/linux/moxtet.h +1 −1
  1288. include/linux/mutex.h +1 −1
  1289. include/linux/nd.h +1 −0
  1290. include/linux/netdevice.h +2 −2
  1291. include/linux/netfilter/x_tables.h +2 −5
  1292. include/linux/netfilter_arp/arp_tables.h +3 −2
  1293. include/linux/netfilter_bridge/ebtables.h +3 −2
  1294. include/linux/pagemap.h +1 −1
  1295. include/linux/perf_event.h +2 −0
  1296. include/linux/pgtable.h +4 −0
  1297. include/linux/property.h +1 −1
  1298. include/linux/qcom-geni-se.h +0 −2
  1299. include/linux/regulator/pca9450.h +3 −0
  1300. include/linux/restart_block.h +1 −0
  1301. include/linux/sched/mm.h +2 −1
  1302. include/linux/seqlock.h +1 −4
  1303. include/linux/skbuff.h +1 −0
  1304. include/linux/skmsg.h +6 −1
  1305. include/linux/stop_machine.h +6 −5
  1306. include/linux/sunrpc/svc_rdma.h +0 −1
  1307. include/linux/textsearch.h +1 −1
  1308. include/linux/thread_info.h +13 −0
  1309. include/linux/u64_stats_sync.h +4 −3
  1310. include/linux/usb.h +2 −0
  1311. include/linux/usb_usual.h +2 −0
  1312. include/linux/usermode_driver.h +1 −0
  1313. include/linux/vdpa.h +5 −5
  1314. include/linux/virtio.h +0 −2
  1315. include/linux/virtio_net.h +17 −6
  1316. include/linux/ww_mutex.h +3 −2
  1317. include/linux/xarray.h +3 −1
  1318. include/media/rc-map.h +7 −0
  1319. include/net/act_api.h +4 −8
  1320. include/net/dst.h +11 −0
  1321. include/net/inet_connection_sock.h +1 −1
  1322. include/net/netfilter/nf_tables.h +3 −0
  1323. include/net/netns/xfrm.h +3 −1
  1324. include/net/nexthop.h +24 −0
  1325. include/net/red.h +12 −4
  1326. include/net/rtnetlink.h +4 −2
  1327. include/net/sock.h +13 −0
  1328. include/net/xfrm.h +2 −2
  1329. include/scsi/scsi_transport_iscsi.h +1 −0
  1330. include/trace/events/workqueue.h +3 −3
  1331. include/uapi/linux/blkpg.h +2 −26
  1332. include/uapi/linux/bpf.h +11 −6
  1333. include/uapi/linux/can.h +1 −1
  1334. include/uapi/linux/ethtool.h +33 −21
  1335. include/uapi/linux/fuse.h +2 −1
  1336. include/uapi/linux/idxd.h +2 −2
  1337. include/uapi/linux/l2tp.h +1 −0
  1338. include/uapi/linux/netfilter/nfnetlink_cthelper.h +1 −1
  1339. include/uapi/linux/psample.h +1 −4
  1340. include/uapi/linux/rfkill.h +68 −12
  1341. include/xen/grant_table.h +7 −0
  1342. include/xen/xenbus.h +0 −1
  1343. init/Kconfig +5 −6
  1344. kernel/bpf/bpf_inode_storage.c +1 −1
  1345. kernel/bpf/bpf_struct_ops.c +1 −1
  1346. kernel/bpf/btf.c +0 −2
  1347. kernel/bpf/core.c +8 −2
  1348. kernel/bpf/disasm.c +1 −1
  1349. kernel/bpf/inode.c +2 −2
  1350. kernel/bpf/preload/bpf_preload_kern.c +15 −4
  1351. kernel/bpf/stackmap.c +10 −2
  1352. kernel/bpf/syscall.c +5 −0
  1353. kernel/bpf/trampoline.c +198 −50
  1354. kernel/bpf/verifier.c +233 −108
  1355. kernel/events/core.c +38 −4
  1356. kernel/fork.c +16 −8
  1357. kernel/futex.c +1 −2
  1358. kernel/gcov/clang.c +83 −5
  1359. kernel/irq/irq_sim.c +2 −2
  1360. kernel/irq/irqdomain.c +4 −5
  1361. kernel/irq/manage.c +4 −0
  1362. kernel/jump_label.c +8 −0
  1363. kernel/locking/lockdep.c +3 −2
  1364. kernel/locking/mutex.c +14 −11
  1365. kernel/power/energy_model.c +1 −1
  1366. kernel/ptrace.c +1 −1
  1367. kernel/reboot.c +0 −2
  1368. kernel/signal.c +11 −3
  1369. kernel/static_call.c +27 −20
  1370. kernel/sys.c +1 −1
  1371. kernel/time/alarmtimer.c +1 −1
  1372. kernel/time/hrtimer.c +40 −22
  1373. kernel/time/posix-cpu-timers.c +1 −1
  1374. kernel/trace/ftrace.c +44 −8
  1375. kernel/trace/trace.c +2 −1
  1376. kernel/trace/trace_dynevent.c +4 −2
  1377. kernel/usermode_driver.c +15 −6
  1378. kernel/watchdog.c +3 −2
  1379. kernel/workqueue.c +7 −12
  1380. lib/Kconfig.debug +3 −3
  1381. lib/Kconfig.kasan +2 −6
  1382. lib/earlycpio.c +2 −2
  1383. lib/extable.c +0 −5
  1384. lib/lru_cache.c +2 −1
  1385. lib/math/div64.c +1 −0
  1386. lib/parman.c +2 −2
  1387. lib/radix-tree.c +6 −5
  1388. lib/test_kasan_module.c +1 −1
  1389. lib/test_xarray.c +14 −12
  1390. lib/xarray.c +6 −5
  1391. mm/gup.c +4 −0
  1392. mm/highmem.c +14 −7
  1393. mm/huge_memory.c +3 −7
  1394. mm/hugetlb.c +128 −36
  1395. mm/hugetlb_cgroup.c +8 −2
  1396. mm/internal.h +20 −5
  1397. mm/kasan/common.c +1 −1
  1398. mm/kasan/kasan.h +1 −1
  1399. mm/kasan/report_generic.c +1 −1
  1400. mm/kfence/core.c +9 −0
  1401. mm/kfence/report.c +18 −12
  1402. mm/kmemleak.c +2 −1
  1403. mm/madvise.c +12 −1
  1404. mm/mapping_dirty_helpers.c +2 −0
  1405. mm/memcontrol.c +6 −9
  1406. mm/memory.c +10 −8
  1407. mm/memory_hotplug.c +1 −1
  1408. mm/mmu_gather.c +19 −10
  1409. mm/mmu_notifier.c +23 −0
  1410. mm/oom_kill.c +1 −1
  1411. mm/page-writeback.c +16 −0
  1412. mm/page_alloc.c +82 −85
  1413. mm/page_poison.c +3 −1
  1414. mm/percpu-internal.h +1 −1
  1415. mm/percpu-stats.c +7 −2
  1416. mm/percpu.c +7 −7
  1417. mm/ptdump.c +1 −1
  1418. mm/shuffle.c +2 −2
  1419. mm/slab.c +1 −1
  1420. mm/slub.c +1 −1
  1421. mm/z3fold.c +15 −1
  1422. net/9p/client.c +0 −4
  1423. net/batman-adv/main.c +0 −1
  1424. net/batman-adv/translation-table.c +2 −0
  1425. net/bridge/br_switchdev.c +2 −0
  1426. net/bridge/netfilter/ebtable_broute.c +7 −1
  1427. net/bridge/netfilter/ebtable_filter.c +7 −1
  1428. net/bridge/netfilter/ebtable_nat.c +7 −1
  1429. net/bridge/netfilter/ebtables.c +27 −3
  1430. net/can/bcm.c +6 −4
  1431. net/can/isotp.c +15 −14
  1432. net/can/raw.c +8 −6
  1433. net/core/dev.c +35 −4
  1434. net/core/drop_monitor.c +23 −0
  1435. net/core/dst.c +42 −17
  1436. net/core/filter.c +10 −2
  1437. net/core/flow_dissector.c +1 −1
  1438. net/core/neighbour.c +1 −1
  1439. net/core/rtnetlink.c +2 −2
  1440. net/core/skbuff.c +2 −0
  1441. net/core/skmsg.c +5 −7
  1442. net/core/sock.c +31 −25
  1443. net/core/xdp.c +2 −1
  1444. net/dccp/ipv6.c +5 −0
  1445. net/dsa/Kconfig +2 −0
  1446. net/dsa/dsa2.c +14 −5
  1447. net/dsa/dsa_priv.h +14 −11
  1448. net/dsa/slave.c +43 −16
  1449. net/dsa/switch.c +9 −6
  1450. net/dsa/tag_mtk.c +13 −6
  1451. net/dsa/tag_rtl4_a.c +5 −7
  1452. net/ethtool/channels.c +13 −13
  1453. net/ethtool/common.c +17 −0
  1454. net/ethtool/eee.c +2 −2
  1455. net/ethtool/ioctl.c +1 −17
  1456. net/ethtool/netlink.h +3 −3
  1457. net/ethtool/pause.c +4 −4
  1458. net/hsr/hsr_device.c +1 −0
  1459. net/hsr/hsr_forward.c +0 −6
  1460. net/ieee802154/nl-mac.c +4 −3
  1461. net/ieee802154/nl802154.c +60 −8
  1462. net/ipv4/ah4.c +1 −1
  1463. net/ipv4/cipso_ipv4.c +2 −11
  1464. net/ipv4/devinet.c +2 −1
  1465. net/ipv4/esp4.c +1 −1
  1466. net/ipv4/esp4_offload.c +14 −3
  1467. net/ipv4/inet_connection_sock.c +5 −2
  1468. net/ipv4/inetpeer.c +7 −14
  1469. net/ipv4/ip_tunnel.c +2 −3
  1470. net/ipv4/ip_vti.c +7 −5
  1471. net/ipv4/ipconfig.c +8 −6
  1472. net/ipv4/netfilter/arp_tables.c +17 −10
  1473. net/ipv4/netfilter/arptable_filter.c +9 −1
  1474. net/ipv4/netfilter/ip_tables.c +10 −8
  1475. net/ipv4/nexthop.c +7 −3
  1476. net/ipv4/route.c +8 −37
  1477. net/ipv4/sysctl_net_ipv4.c +13 −3
  1478. net/ipv4/tcp.c +17 −9
  1479. net/ipv4/tcp_minisocks.c +5 −2
  1480. net/ipv4/udp.c +4 −0
  1481. net/ipv4/udp_offload.c +1 −1
  1482. net/ipv6/addrconf.c +26 −6
  1483. net/ipv6/ah6.c +1 −1
  1484. net/ipv6/calipso.c +5 −9
  1485. net/ipv6/esp6.c +1 −1
  1486. net/ipv6/esp6_offload.c +14 −3
  1487. net/ipv6/ip6_fib.c +1 −1
  1488. net/ipv6/ip6_gre.c +8 −8
  1489. net/ipv6/ip6_input.c +0 −10
  1490. net/ipv6/ip6_tunnel.c +15 −5
  1491. net/ipv6/ip6_vti.c +7 −5
  1492. net/ipv6/netfilter/ip6_tables.c +10 −8
  1493. net/ipv6/raw.c +1 −1
  1494. net/ipv6/route.c +14 −30
  1495. net/ipv6/sit.c +3 −3
  1496. net/ipv6/tcp_ipv6.c +5 −0
  1497. net/l2tp/l2tp_core.c +22 −19
  1498. net/l2tp/l2tp_core.h +1 −0
  1499. net/l2tp/l2tp_netlink.c +6 −0
  1500. net/mac80211/aead_api.c +3 −2
  1501. net/mac80211/aes_gmac.c +3 −2
  1502. net/mac80211/cfg.c +5 −3
  1503. net/mac80211/ibss.c +2 −0
  1504. net/mac80211/main.c +12 −1
  1505. net/mac80211/mlme.c +5 −2
  1506. net/mac80211/rc80211_minstrel_ht.c +0 −2
  1507. net/mac80211/tx.c +1 −1
  1508. net/mac80211/util.c +1 −1
  1509. net/mac802154/llsec.c +1 −1
  1510. net/mpls/mpls_gso.c +3 −0
  1511. net/mptcp/options.c +14 −10
  1512. net/mptcp/protocol.c +151 −114
  1513. net/mptcp/protocol.h +8 −6
  1514. net/mptcp/subflow.c +13 −6
  1515. net/ncsi/ncsi-manage.c +13 −7
  1516. net/netfilter/nf_conntrack_helper.c +1 −2
  1517. net/netfilter/nf_conntrack_netlink.c +1 −0
  1518. net/netfilter/nf_conntrack_proto_gre.c +0 −3
  1519. net/netfilter/nf_conntrack_proto_tcp.c +4 −2
  1520. net/netfilter/nf_conntrack_standalone.c +1 −0
  1521. net/netfilter/nf_flow_table_core.c +1 −1
  1522. net/netfilter/nf_flow_table_offload.c +3 −3
  1523. net/netfilter/nf_nat_proto.c +21 −4
  1524. net/netfilter/nf_tables_api.c +69 −18
  1525. net/netfilter/nft_limit.c +2 −2
  1526. net/netfilter/x_tables.c +40 −25
  1527. net/netlabel/netlabel_cipso_v4.c +3 −0
  1528. net/netlink/af_netlink.c +2 −2
  1529. net/nfc/llcp_sock.c +10 −0
  1530. net/openvswitch/conntrack.c +9 −7
  1531. net/openvswitch/conntrack.h +4 −2
  1532. net/openvswitch/flow.c +3 −1
  1533. net/qrtr/qrtr.c +13 −3
  1534. net/rds/message.c +3 −1
  1535. net/rds/send.c +1 −1
  1536. net/rfkill/core.c +4 −3
  1537. net/sched/act_api.c +31 −17
  1538. net/sched/act_ct.c +4 −2
  1539. net/sched/cls_api.c +9 −8
  1540. net/sched/cls_flower.c +1 −1
  1541. net/sched/sch_api.c +4 −4
  1542. net/sched/sch_choke.c +4 −3
  1543. net/sched/sch_gred.c +1 −1
  1544. net/sched/sch_htb.c +16 −8
  1545. net/sched/sch_red.c +5 −2
  1546. net/sched/sch_sfq.c +1 −1
  1547. net/sched/sch_teql.c +3 −0
  1548. net/sctp/ipv6.c +3 −4
  1549. net/sctp/output.c +0 −7
  1550. net/sctp/outqueue.c +7 −0
  1551. net/sctp/socket.c +5 −8
  1552. net/sctp/tsnmap.c +1 −1
  1553. net/sunrpc/auth_gss/svcauth_gss.c +7 −4
  1554. net/sunrpc/sched.c +4 −1
  1555. net/sunrpc/svc.c +4 −2
  1556. net/sunrpc/svc_xprt.c +2 −2
  1557. net/sunrpc/xprtrdma/svc_rdma_backchannel.c +3 −3
  1558. net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +39 −43
  1559. net/tipc/bearer.h +3 −3
  1560. net/tipc/crypto.c +2 −1
  1561. net/tipc/net.c +1 −1
  1562. net/tipc/node.c +9 −4
  1563. net/tipc/socket.c +1 −1
  1564. net/vmw_vsock/af_vsock.c +1 −0
  1565. net/wireless/nl80211.c +15 −7
  1566. net/wireless/scan.c +8 −6
  1567. net/wireless/sme.c +1 −1
  1568. net/xfrm/xfrm_compat.c +9 −3
  1569. net/xfrm/xfrm_device.c +0 −2
  1570. net/xfrm/xfrm_interface.c +3 −0
  1571. net/xfrm/xfrm_output.c +18 −5
  1572. net/xfrm/xfrm_state.c +6 −5
  1573. samples/bpf/xdpsock_user.c +2 −0
  1574. scripts/Makefile.kasan +13 −7
  1575. scripts/Makefile.lib +2 −2
  1576. scripts/dummy-tools/gcc +16 −2
  1577. scripts/gcc-plugins/Makefile +1 −0
  1578. scripts/ld-version.sh +14 −8
  1579. scripts/module.lds.S +2 −0
  1580. security/Kconfig.hardening +2 −2
  1581. security/commoncap.c +1 −11
  1582. security/integrity/iint.c +8 −0
  1583. security/selinux/include/security.h +11 −4
  1584. security/selinux/selinuxfs.c +9 −13
  1585. security/selinux/ss/avtab.c +33 −68
  1586. security/selinux/ss/avtab.h +1 −1
  1587. security/selinux/ss/conditional.c +6 −6
  1588. security/selinux/ss/services.c +159 −61
  1589. security/selinux/ss/sidtab.c +21 −0
  1590. security/selinux/ss/sidtab.h +4 −0
  1591. security/tomoyo/network.c +1 −1
  1592. sound/drivers/aloop.c +8 −4
  1593. sound/drivers/dummy.c +0 −1
  1594. sound/drivers/mtpav.c +0 −1
  1595. sound/drivers/mts64.c +0 −1
  1596. sound/drivers/pcsp/pcsp.c +0 −1
  1597. sound/drivers/portman2x4.c +0 −1
  1598. sound/drivers/serial-u16550.c +0 −1
  1599. sound/drivers/virmidi.c +0 −1
  1600. sound/firewire/dice/dice-stream.c +2 −3
  1601. sound/hda/intel-nhlt.c +5 −0
  1602. sound/isa/ad1816a/ad1816a.c +0 −7
  1603. sound/isa/ad1848/ad1848.c +0 −3
  1604. sound/isa/als100.c +0 −11
  1605. sound/isa/azt2320.c +0 −5
  1606. sound/isa/cmi8330.c +0 −1
  1607. sound/isa/cs423x/cs4231.c +0 −1
  1608. sound/isa/cs423x/cs4236.c +0 −34
  1609. sound/isa/es1688/es1688.c +0 −5
  1610. sound/isa/es18xx.c +1 −9
  1611. sound/isa/gus/gusclassic.c +0 −1
  1612. sound/isa/gus/gusextreme.c +0 −1
  1613. sound/isa/gus/gusmax.c +0 −1
  1614. sound/isa/gus/interwave.c +0 −6
  1615. sound/isa/opl3sa2.c +0 −5
  1616. sound/isa/opti9xx/miro.c +0 −3
  1617. sound/isa/opti9xx/opti92x-ad1848.c +0 −6
  1618. sound/isa/sb/jazz16.c +0 −3
  1619. sound/isa/sb/sb16.c +0 −8
  1620. sound/isa/sb/sb8.c +0 −1
  1621. sound/isa/sc6000.c +0 −3
  1622. sound/isa/wavefront/wavefront.c +0 −1
  1623. sound/mips/sgio2audio.c +0 −1
  1624. sound/pci/ad1889.c +0 −1
  1625. sound/pci/ali5451/ali5451.c +0 −1
  1626. sound/pci/als300.c +0 −1
  1627. sound/pci/als4000.c +0 −1
  1628. sound/pci/atiixp.c +0 −1
  1629. sound/pci/atiixp_modem.c +0 −1
  1630. sound/pci/au88x0/au88x0.c +0 −2
  1631. sound/pci/azt3328.c +0 −1
  1632. sound/pci/bt87x.c +0 −2
  1633. sound/pci/ca0106/ca0106_main.c +0 −1
  1634. sound/pci/cmipci.c +0 −4
  1635. sound/pci/cs4281.c +0 −1
  1636. sound/pci/cs46xx/cs46xx.c +0 −7
  1637. sound/pci/cs5535audio/cs5535audio.c +0 −1
  1638. sound/pci/ctxfi/xfi.c +0 −1
  1639. sound/pci/echoaudio/echoaudio.c +0 −1
  1640. sound/pci/emu10k1/emu10k1.c +0 −2
  1641. sound/pci/emu10k1/emu10k1x.c +0 −1
  1642. sound/pci/ens1370.c +0 −8
  1643. sound/pci/es1938.c +0 −4
  1644. sound/pci/es1968.c +0 −4
  1645. sound/pci/fm801.c +0 −2
  1646. sound/pci/hda/hda_bind.c +4 −0
  1647. sound/pci/hda/hda_controller.c +0 −7
  1648. sound/pci/hda/hda_generic.c +1 −1
  1649. sound/pci/hda/hda_intel.c +10 −34
  1650. sound/pci/hda/patch_ca0132.c +1 −0
  1651. sound/pci/hda/patch_conexant.c +46 −17
  1652. sound/pci/hda/patch_hdmi.c +13 −0
  1653. sound/pci/hda/patch_realtek.c +35 −1
  1654. sound/pci/ice1712/ice1712.c +0 −6
  1655. sound/pci/ice1712/ice1724.c +0 −19
  1656. sound/pci/intel8x0.c +0 −23
  1657. sound/pci/intel8x0m.c +0 −15
  1658. sound/pci/korg1212/korg1212.c +0 −1
  1659. sound/pci/lola/lola.c +0 −1
  1660. sound/pci/lx6464es/lx6464es.c +0 −2
  1661. sound/pci/maestro3.c +0 −5
  1662. sound/pci/mixart/mixart.c +0 −1
  1663. sound/pci/nm256/nm256.c +0 −2
  1664. sound/pci/oxygen/oxygen.c +0 −3
  1665. sound/pci/oxygen/se6x.c +0 −1
  1666. sound/pci/oxygen/virtuoso.c +0 −1
  1667. sound/pci/pcxhr/pcxhr.c +0 −1
  1668. sound/pci/riptide/riptide.c +0 −1
  1669. sound/pci/rme32.c +0 −1
  1670. sound/pci/rme96.c +0 −5
  1671. sound/pci/rme9652/hdsp.c +0 −3
  1672. sound/pci/rme9652/hdspm.c +0 −1
  1673. sound/pci/rme9652/rme9652.c +0 −2
  1674. sound/pci/sis7019.c +0 −1
  1675. sound/pci/sonicvibes.c +0 −1
  1676. sound/pci/trident/trident.c +0 −12
  1677. sound/pci/via82xx.c +0 −1
  1678. sound/pci/via82xx_modem.c +0 −1
  1679. sound/pci/vx222/vx222.c +0 −1
  1680. sound/pci/ymfpci/ymfpci.c +0 −6
  1681. sound/pcmcia/pdaudiocf/pdaudiocf.c +0 −1
  1682. sound/pcmcia/vx/vxpocket.c +0 −4
  1683. sound/ppc/powermac.c +0 −1
  1684. sound/sh/aica.c +0 −1
  1685. sound/sh/sh_dac_audio.c +0 −1
  1686. sound/soc/bcm/cygnus-ssp.c +3 −1
  1687. sound/soc/codecs/Kconfig +0 −5
  1688. sound/soc/codecs/ak4458.c +1 −0
  1689. sound/soc/codecs/ak5558.c +1 −0
  1690. sound/soc/codecs/cs42l42.c +34 −78
  1691. sound/soc/codecs/cs42l42.h +7 −6
  1692. sound/soc/codecs/es8316.c +2 −7
  1693. sound/soc/codecs/lpass-rx-macro.c +2 −2
  1694. sound/soc/codecs/lpass-tx-macro.c +1 −1
  1695. sound/soc/codecs/lpass-va-macro.c +13 −15
  1696. sound/soc/codecs/lpass-wsa-macro.c +11 −9
  1697. sound/soc/codecs/max98373-i2c.c +1 −0
  1698. sound/soc/codecs/max98373-sdw.c +1 −0
  1699. sound/soc/codecs/max98373.c +2 −0
  1700. sound/soc/codecs/rt1015.c +2 −0
  1701. sound/soc/codecs/rt5640.c +2 −2
  1702. sound/soc/codecs/rt5651.c +2 −2
  1703. sound/soc/codecs/rt5659.c +5 −0
  1704. sound/soc/codecs/rt5670.c +96 −14
  1705. sound/soc/codecs/rt5670.h +5 −4
  1706. sound/soc/codecs/rt711.c +8 −0
  1707. sound/soc/codecs/sgtl5000.c +1 −1
  1708. sound/soc/codecs/sirf-audio-codec.h +0 −124
  1709. sound/soc/codecs/wcd934x.c +6 −0
  1710. sound/soc/codecs/wm8960.c +7 −1
  1711. sound/soc/fsl/fsl_esai.c +5 −3
  1712. sound/soc/fsl/fsl_ssi.c +4 −2
  1713. sound/soc/generic/simple-card-utils.c +7 −6
  1714. sound/soc/intel/atom/sst-mfld-platform-pcm.c +6 −6
  1715. sound/soc/intel/boards/bytcr_rt5640.c +1 −1
  1716. sound/soc/mediatek/mt8192/mt8192-dai-tdm.c +3 −1
  1717. sound/soc/mediatek/mt8192/mt8192-reg.h +5 −3
  1718. sound/soc/qcom/lpass-cpu.c +1 −1
  1719. sound/soc/qcom/sdm845.c +3 −3
  1720. sound/soc/soc-core.c +4 −0
  1721. sound/soc/sof/core.c +7 −1
  1722. sound/soc/sof/intel/apl.c +2 −1
  1723. sound/soc/sof/intel/cnl.c +2 −17
  1724. sound/soc/sof/intel/hda-dsp.c +18 −5
  1725. sound/soc/sof/intel/hda.c +1 −0
  1726. sound/soc/sof/intel/hda.h +1 −0
  1727. sound/soc/sof/intel/icl.c +2 −1
  1728. sound/soc/sof/intel/pci-tgl.c +1 −1
  1729. sound/soc/sof/intel/tgl.c +17 −1
  1730. sound/soc/sunxi/sun4i-codec.c +5 −0
  1731. sound/sparc/amd7930.c +0 −1
  1732. sound/sparc/cs4231.c +0 −1
  1733. sound/sparc/dbri.c +0 −1
  1734. sound/usb/6fire/chip.c +0 −1
  1735. sound/usb/caiaq/device.c +0 −14
  1736. sound/usb/card.c +6 −2
  1737. sound/usb/hiface/chip.c +0 −17
  1738. sound/usb/misc/ua101.c +0 −1
  1739. sound/usb/mixer_quirks.c +2 −2
  1740. sound/usb/quirks.c +11 −1
  1741. sound/usb/usbaudio.h +1 −0
  1742. sound/usb/usx2y/usbusx2y.c +0 −1
  1743. sound/x86/intel_hdmi_audio.c +0 −1
  1744. sound/xen/xen_snd_front.c +0 −1
  1745. tools/arch/ia64/include/asm/barrier.h +0 −3
  1746. tools/arch/s390/include/uapi/asm/ptrace.h +3 −2
  1747. tools/arch/x86/include/asm/cpufeatures.h +13 −6
  1748. tools/arch/x86/include/uapi/asm/kvm.h +1 −0
  1749. tools/arch/x86/include/uapi/asm/vmx.h +3 −1
  1750. tools/bpf/resolve_btfids/main.c +5 −0
  1751. tools/build/Makefile +7 −1
  1752. tools/include/linux/coresight-pmu.h +15 −5
  1753. tools/include/uapi/asm/errno.h +0 −2
  1754. tools/include/uapi/drm/drm.h +49 −48
  1755. tools/include/uapi/drm/i915_drm.h +2 −1
  1756. tools/include/uapi/linux/bpf.h +0 −1
  1757. tools/include/uapi/linux/kvm.h +86 −0
  1758. tools/include/uapi/linux/mount.h +16 −0
  1759. tools/include/uapi/linux/openat2.h +4 −0
  1760. tools/kvm/kvm_stat/kvm_stat.service +1 −0
  1761. tools/lib/bpf/Makefile +1 −1
  1762. tools/lib/bpf/btf_dump.c +1 −1
  1763. tools/lib/bpf/libbpf.c +2 −1
  1764. tools/lib/bpf/netlink.c +1 −1
  1765. tools/lib/bpf/ringbuf.c +1 −1
  1766. tools/lib/bpf/xsk.c +41 −22
  1767. tools/lib/perf/evlist.c +9 −4
  1768. tools/lib/perf/include/internal/evlist.h +2 −0
  1769. tools/objtool/check.c +3 −0
  1770. tools/perf/Documentation/perf-evlist.txt +1 −1
  1771. tools/perf/Documentation/perf-ftrace.txt +2 −2
  1772. tools/perf/Documentation/perf-kallsyms.txt +1 −1
  1773. tools/perf/Documentation/perf-trace.txt +2 −2
  1774. tools/perf/Makefile.perf +2 −10
  1775. tools/perf/arch/arm/util/cs-etm.c +8 −4
  1776. tools/perf/arch/powerpc/entry/syscalls/syscall.tbl +6 −15
  1777. tools/perf/arch/s390/entry/syscalls/syscall.tbl +1 −0
  1778. tools/perf/arch/x86/Makefile +6 −5
  1779. tools/perf/arch/x86/entry/syscalls/syscall_64.tbl +1 −0
  1780. tools/perf/arch/x86/include/arch-tests.h +1 −0
  1781. tools/perf/arch/x86/tests/Build +1 −0
  1782. tools/perf/arch/x86/tests/arch-tests.c +4 −0
  1783. tools/perf/arch/x86/tests/insn-x86.c +1 −1
  1784. tools/perf/arch/x86/tests/sample-parsing.c +121 −0
  1785. tools/perf/arch/x86/util/archinsn.c +1 −1
  1786. tools/perf/bench/numa.c +29 −13
  1787. tools/perf/bench/sched-messaging.c +2 −2
  1788. tools/perf/bench/sched-pipe.c +2 −2
  1789. tools/perf/bench/syscall.c +2 −2
  1790. tools/perf/builtin-daemon.c +36 −27
  1791. tools/perf/builtin-diff.c +2 −1
  1792. tools/perf/builtin-inject.c +1 −1
  1793. tools/perf/builtin-trace.c +2 −3
  1794. tools/perf/perf-archive.sh +1 −2
  1795. tools/perf/tests/attr.c +7 −1
  1796. tools/perf/tests/bpf.c +1 −8
  1797. tools/perf/tests/code-reading.c +3 −7
  1798. tools/perf/tests/cpumap.c +2 −0
  1799. tools/perf/tests/keep-tracking.c +2 −3
  1800. tools/perf/tests/mmap-basic.c +0 −2
  1801. tools/perf/tests/perf-time-to-tsc.c +2 −0
  1802. tools/perf/tests/sample-parsing.c +0 −4
  1803. tools/perf/tests/shell/daemon.sh +17 −17
  1804. tools/perf/tests/sw-clock.c +4 −8
  1805. tools/perf/tests/switch-tracking.c +2 −3
  1806. tools/perf/tests/task-exit.c +3 −7
  1807. tools/perf/tests/thread-map.c +3 −5
  1808. tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c +3 −1
  1809. tools/perf/util/auxtrace.c +0 −4
  1810. tools/perf/util/block-info.c +3 −3
  1811. tools/perf/util/bpf-event.c +10 −3
  1812. tools/perf/util/evlist.c +1 −0
  1813. tools/perf/util/evsel.c +17 −1
  1814. tools/perf/util/evsel.h +3 −1
  1815. tools/perf/util/header.c +2 −2
  1816. tools/perf/util/map.c +3 −4
  1817. tools/perf/util/parse-events.c +3 −0
  1818. tools/perf/util/parse-events.y +5 −1
  1819. tools/perf/util/pmu.c +33 −0
  1820. tools/perf/util/pmu.h +3 −0
  1821. tools/perf/util/python-ext-sources +1 −0
  1822. tools/perf/util/sort.c +2 −2
  1823. tools/perf/util/stat-display.c +1 −1
  1824. tools/perf/util/stat.c +38 −9
  1825. tools/perf/util/synthetic-events.c +6 −5
  1826. tools/perf/util/trace-event-read.c +1 −0
  1827. tools/perf/util/vdso.c +2 −0
  1828. tools/testing/kunit/configs/broken_on_uml.config +2 −0
  1829. tools/testing/kunit/kunit_config.py +1 −1
  1830. tools/testing/radix-tree/idr-test.c +18 −3
  1831. tools/testing/radix-tree/linux/compiler_types.h +0 −0
  1832. tools/testing/radix-tree/multiorder.c +2 −0
  1833. tools/testing/radix-tree/xarray.c +2 −0
  1834. tools/testing/selftests/arm64/fp/sve-ptrace.c +1 −1
  1835. tools/testing/selftests/arm64/fp/sve-test.S +17 −5
  1836. tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c +44 −0
  1837. tools/testing/selftests/bpf/prog_tests/check_mtu.c +4 −0
  1838. tools/testing/selftests/bpf/prog_tests/fexit_sleep.c +82 −0
  1839. tools/testing/selftests/bpf/progs/bpf_tcp_nogpl.c +19 −0
  1840. tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c +8 −0
  1841. tools/testing/selftests/bpf/progs/fexit_sleep.c +31 −0
  1842. tools/testing/selftests/bpf/progs/netif_receive_skb.c +10 −3
  1843. tools/testing/selftests/bpf/progs/test_check_mtu.c +92 −0
  1844. tools/testing/selftests/bpf/progs/test_global_func11.c +1 −1
  1845. tools/testing/selftests/bpf/progs/test_tunnel_kern.c +4 −8
  1846. tools/testing/selftests/bpf/verifier/array_access.c +2 −1
  1847. tools/testing/selftests/bpf/verifier/atomic_and.c +23 −0
  1848. tools/testing/selftests/bpf/verifier/atomic_cmpxchg.c +25 −0
  1849. tools/testing/selftests/bpf/verifier/atomic_or.c +25 −0
  1850. tools/testing/selftests/bpf/verifier/bounds.c +0 −5
  1851. tools/testing/selftests/bpf/verifier/bounds_deduction.c +21 −9
  1852. tools/testing/selftests/bpf/verifier/bounds_mix_sign_unsign.c +0 −13
  1853. tools/testing/selftests/bpf/verifier/map_ptr.c +4 −0
  1854. tools/testing/selftests/bpf/verifier/unpriv.c +14 −1
  1855. tools/testing/selftests/bpf/verifier/value_ptr_arith.c +23 −4
  1856. tools/testing/selftests/gpio/.gitignore +1 −1
  1857. tools/testing/selftests/kvm/.gitignore +3 −0
  1858. tools/testing/selftests/kvm/Makefile +3 −0
  1859. tools/testing/selftests/kvm/hardware_disable_test.c +5 −5
  1860. tools/testing/selftests/kvm/include/kvm_util.h +2 −0
  1861. tools/testing/selftests/kvm/lib/kvm_util.c +6 −1
  1862. tools/testing/selftests/kvm/lib/kvm_util_internal.h +0 −2
  1863. tools/testing/selftests/kvm/x86_64/get_msr_index_features.c +134 −0
  1864. tools/testing/selftests/kvm/x86_64/hyperv_clock.c +269 −0
  1865. tools/testing/selftests/kvm/x86_64/set_boot_cpu_id.c +166 −0
  1866. tools/testing/selftests/net/fib_nexthops.sh +8 −0
  1867. tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh +9 −0
  1868. tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh +12 −1
  1869. tools/testing/selftests/net/ipsec.c +1 −1
  1870. tools/testing/selftests/net/mptcp/mptcp_join.sh +20 −10
  1871. tools/testing/selftests/net/reuseaddr_ports_exhausted.c +16 −16
  1872. tools/testing/selftests/netfilter/Makefile +1 −1
  1873. tools/testing/selftests/netfilter/nf_nat_edemux.sh +99 −0
  1874. tools/testing/selftests/vm/Makefile +2 −2
.mailmap+10−0
@@ -36,6 +36,7 @@ Andrew Morton <akpm@linux-foundation.org> · 35 unmodified lines
3636 Andrew Murray <amurray@thegoodpenguin.co.uk> <amurray@embedded-bits.co.uk>
3737 Andrew Murray <amurray@thegoodpenguin.co.uk> <andrew.murray@arm.com>
3838 Andrew Vasquez <andrew.vasquez@qlogic.com>
39+Andrey Konovalov <andreyknvl@gmail.com> <andreyknvl@google.com>
3940 Andrey Ryabinin <ryabinin.a.a@gmail.com> <a.ryabinin@samsung.com>
4041 Andrey Ryabinin <ryabinin.a.a@gmail.com> <aryabinin@virtuozzo.com>
4142 Andy Adamson <andros@citi.umich.edu>
@@ -65,6 +66,8 @@ Changbin Du <changbin.du@intel.com> <changbin.du@gmail.com> · 23 unmodified lines
6566 Changbin Du <changbin.du@intel.com> <changbin.du@intel.com>
6667 Chao Yu <chao@kernel.org> <chao2.yu@samsung.com>
6768 Chao Yu <chao@kernel.org> <yuchao0@huawei.com>
69+Chris Chiu <chris.chiu@canonical.com> <chiu@endlessm.com>
70+Chris Chiu <chris.chiu@canonical.com> <chiu@endlessos.org>
6871 Christophe Ricard <christophe.ricard@gmail.com>
6972 Christoph Hellwig <hch@lst.de>
7073 Corey Minyard <minyard@acm.org>
@@ -165,6 +168,7 @@ Johan Hovold <johan@kernel.org> <jhovold@gmail.com> · 94 unmodified lines
165168 Johan Hovold <johan@kernel.org> <johan@hovoldconsulting.com>
166169 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
167170 John Stultz <johnstul@us.ibm.com>
171+Jordan Crouse <jordan@cosmicpenguin.net> <jcrouse@codeaurora.org>
168172 <josh@joshtriplett.org> <josh@freedesktop.org>
169173 <josh@joshtriplett.org> <josh@kernel.org>
170174 <josh@joshtriplett.org> <josht@linux.vnet.ibm.com>
@@ -250,8 +254,14 @@ Morten Welinder <welinder@anemone.rentec.com> · 79 unmodified lines
250254 Morten Welinder <welinder@darter.rentec.com>
251255 Morten Welinder <welinder@troll.com>
252256 Mythri P K <mythripk@ti.com>
257+Nadia Yvette Chambers <nyc@holomorphy.com> William Lee Irwin III <wli@holomorphy.com>
253258 Nathan Chancellor <nathan@kernel.org> <natechancellor@gmail.com>
254259 Nguyen Anh Quynh <aquynh@gmail.com>
260+Nicholas Piggin <npiggin@gmail.com> <npiggen@suse.de>
261+Nicholas Piggin <npiggin@gmail.com> <npiggin@kernel.dk>
262+Nicholas Piggin <npiggin@gmail.com> <npiggin@suse.de>
263+Nicholas Piggin <npiggin@gmail.com> <nickpiggin@yahoo.com.au>
264+Nicholas Piggin <npiggin@gmail.com> <piggin@cyberone.com.au>
255265 Nicolas Ferre <nicolas.ferre@microchip.com> <nicolas.ferre@atmel.com>
256266 Nicolas Pitre <nico@fluxnic.net> <nicolas.pitre@linaro.org>
257267 Nicolas Pitre <nico@fluxnic.net> <nico@linaro.org>
Documentation/ABI/testing/debugfs-moxtet+2−2
@@ -1,7 +1,7 @@
11 What: /sys/kernel/debug/moxtet/input
22 Date: March 2019
33 KernelVersion: 5.3
4−Contact: Marek Behún <marek.behun@nic.cz>
4+Contact: Marek Behún <kabel@kernel.org>
55 Description: (Read) Read input from the shift registers, in hexadecimal.
66 Returns N+1 bytes, where N is the number of Moxtet connected
77 modules. The first byte is from the CPU board itself.
@@ -19,7 +19,7 @@ Description: (Read) Read input from the shift registers, in hexadecimal. · 11 unmodified lines
1919 What: /sys/kernel/debug/moxtet/output
2020 Date: March 2019
2121 KernelVersion: 5.3
22−Contact: Marek Behún <marek.behun@nic.cz>
22+Contact: Marek Behún <kabel@kernel.org>
2323 Description: (RW) Read last written value to the shift registers, in
2424 hexadecimal, or write values to the shift registers, also
2525 in hexadecimal.
Documentation/ABI/testing/debugfs-turris-mox-rwtm+1−1
@@ -1,7 +1,7 @@
11 What: /sys/kernel/debug/turris-mox-rwtm/do_sign
22 Date: Jun 2020
33 KernelVersion: 5.8
4−Contact: Marek Behún <marek.behun@nic.cz>
4+Contact: Marek Behún <kabel@kernel.org>
55 Description:
66
77 ======= ===========================================================
Documentation/ABI/testing/sysfs-bus-moxtet-devices+3−3
@@ -1,17 +1,17 @@
11 What: /sys/bus/moxtet/devices/moxtet-<name>.<addr>/module_description
22 Date: March 2019
33 KernelVersion: 5.3
4−Contact: Marek Behún <marek.behun@nic.cz>
4+Contact: Marek Behún <kabel@kernel.org>
55 Description: (Read) Moxtet module description. Format: string
66
77 What: /sys/bus/moxtet/devices/moxtet-<name>.<addr>/module_id
88 Date: March 2019
99 KernelVersion: 5.3
10−Contact: Marek Behún <marek.behun@nic.cz>
10+Contact: Marek Behún <kabel@kernel.org>
1111 Description: (Read) Moxtet module ID. Format: %x
1212
1313 What: /sys/bus/moxtet/devices/moxtet-<name>.<addr>/module_name
1414 Date: March 2019
1515 KernelVersion: 5.3
16−Contact: Marek Behún <marek.behun@nic.cz>
16+Contact: Marek Behún <kabel@kernel.org>
1717 Description: (Read) Moxtet module name. Format: string
Documentation/ABI/testing/sysfs-class-led-driver-turris-omnia+1−1
@@ -1,7 +1,7 @@
11 What: /sys/class/leds/<led>/device/brightness
22 Date: July 2020
33 KernelVersion: 5.9
4−Contact: Marek Behún <marek.behun@nic.cz>
4+Contact: Marek Behún <kabel@kernel.org>
55 Description: (RW) On the front panel of the Turris Omnia router there is also
66 a button which can be used to control the intensity of all the
77 LEDs at once, so that if they are too bright, user can dim them.
Documentation/ABI/testing/sysfs-firmware-turris-mox-rwtm+5−5
@@ -1,21 +1,21 @@
11 What: /sys/firmware/turris-mox-rwtm/board_version
22 Date: August 2019
33 KernelVersion: 5.4
4−Contact: Marek Behún <marek.behun@nic.cz>
4+Contact: Marek Behún <kabel@kernel.org>
55 Description: (Read) Board version burned into eFuses of this Turris Mox board.
66 Format: %i
77
88 What: /sys/firmware/turris-mox-rwtm/mac_address*
99 Date: August 2019
1010 KernelVersion: 5.4
11−Contact: Marek Behún <marek.behun@nic.cz>
11+Contact: Marek Behún <kabel@kernel.org>
1212 Description: (Read) MAC addresses burned into eFuses of this Turris Mox board.
1313 Format: %pM
1414
1515 What: /sys/firmware/turris-mox-rwtm/pubkey
1616 Date: August 2019
1717 KernelVersion: 5.4
18−Contact: Marek Behún <marek.behun@nic.cz>
18+Contact: Marek Behún <kabel@kernel.org>
1919 Description: (Read) ECDSA public key (in pubkey hex compressed form) computed
2020 as pair to the ECDSA private key burned into eFuses of this
2121 Turris Mox Board.
@@ -24,7 +24,7 @@ Description: (Read) ECDSA public key (in pubkey hex compressed form) computed · 2 unmodified lines
2424 What: /sys/firmware/turris-mox-rwtm/ram_size
2525 Date: August 2019
2626 KernelVersion: 5.4
27−Contact: Marek Behún <marek.behun@nic.cz>
27+Contact: Marek Behún <kabel@kernel.org>
2828 Description: (Read) RAM size in MiB of this Turris Mox board as was detected
2929 during manufacturing and burned into eFuses. Can be 512 or 1024.
3030 Format: %i
@@ -32,6 +32,6 @@ Description: (Read) RAM size in MiB of this Turris Mox board as was detected · 1 unmodified line
3232 What: /sys/firmware/turris-mox-rwtm/serial_number
3333 Date: August 2019
3434 KernelVersion: 5.4
35−Contact: Marek Behún <marek.behun@nic.cz>
35+Contact: Marek Behún <kabel@kernel.org>
3636 Description: (Read) Serial number burned into eFuses of this Turris Mox device.
3737 Format: %016X
Documentation/ABI/testing/sysfs-fs-xfs+1−1
@@ -33,7 +33,7 @@ Contact: xfs@oss.sgi.com · 32 unmodified lines
3333 Description:
3434 The current state of the log write grant head. It
3535 represents the total log reservation of all currently
36− oustanding transactions, including regrants due to
36+ outstanding transactions, including regrants due to
3737 rolling transactions. The grant head is exported in
3838 "cycle:bytes" format.
3939 Users: xfstests
Documentation/arm64/acpi_object_usage.rst+5−5
@@ -17,12 +17,12 @@ For ACPI on arm64, tables also fall into the following categories: · 16 unmodified lines
1717
1818 - Recommended: BERT, EINJ, ERST, HEST, PCCT, SSDT
1919
20− - Optional: BGRT, CPEP, CSRT, DBG2, DRTM, ECDT, FACS, FPDT, IORT,
21− MCHI, MPST, MSCT, NFIT, PMTT, RASF, SBST, SLIT, SPMI, SRAT, STAO,
22− TCPA, TPM2, UEFI, XENV
20+ - Optional: BGRT, CPEP, CSRT, DBG2, DRTM, ECDT, FACS, FPDT, IBFT,
21+ IORT, MCHI, MPST, MSCT, NFIT, PMTT, RASF, SBST, SLIT, SPMI, SRAT,
22+ STAO, TCPA, TPM2, UEFI, XENV
2323
24− - Not supported: BOOT, DBGP, DMAR, ETDT, HPET, IBFT, IVRS, LPIT,
25− MSDM, OEMx, PSDT, RSDT, SLIC, WAET, WDAT, WDRT, WPBT
24+ - Not supported: BOOT, DBGP, DMAR, ETDT, HPET, IVRS, LPIT, MSDM, OEMx,
25+ PSDT, RSDT, SLIC, WAET, WDAT, WDRT, WPBT
2626
2727 ====== ========================================================================
2828 Table Usage for ARMv8 Linux
Documentation/arm64/silicon-errata.rst+3−0
@@ -130,6 +130,9 @@ stable kernels. · 129 unmodified lines
130130 | Marvell | ARM-MMU-500 | #582743 | N/A |
131131 +----------------+-----------------+-----------------+-----------------------------+
132132 +----------------+-----------------+-----------------+-----------------------------+
133+| NVIDIA | Carmel Core | N/A | NVIDIA_CARMEL_CNP_ERRATUM |
134++----------------+-----------------+-----------------+-----------------------------+
135++----------------+-----------------+-----------------+-----------------------------+
133136 | Freescale/NXP | LS2080A/LS1043A | A-008585 | FSL_ERRATUM_A008585 |
134137 +----------------+-----------------+-----------------+-----------------------------+
135138 +----------------+-----------------+-----------------+-----------------------------+
Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt+1−1
@@ -32,7 +32,7 @@ Optional node properties: · 31 unmodified lines
3232 - "#thermal-sensor-cells" Used to expose itself to thermal fw.
3333
3434 Read more about iio bindings at
35− Documentation/devicetree/bindings/iio/iio-bindings.txt
35+ https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/
3636
3737 Example:
3838 ncp15wb473@0 {
Documentation/devicetree/bindings/i2c/i2c-gpio.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Bindings for GPIO bitbanged I2C
88
99 maintainers:
10− - Wolfram Sang <wolfram@the-dreams.de>
10+ - Wolfram Sang <wsa@kernel.org>
1111
1212 allOf:
1313 - $ref: /schemas/i2c/i2c-controller.yaml#
Documentation/devicetree/bindings/i2c/i2c-imx.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Freescale Inter IC (I2C) and High Speed Inter IC (HS-I2C) for i.MX
88
99 maintainers:
10− - Wolfram Sang <wolfram@the-dreams.de>
10+ - Oleksij Rempel <o.rempel@pengutronix.de>
1111
1212 allOf:
1313 - $ref: /schemas/i2c/i2c-controller.yaml#
Documentation/devicetree/bindings/iio/adc/ingenic,adc.yaml+3−2
@@ -14,8 +14,9 @@ description: > · 13 unmodified lines
1414 Industrial I/O subsystem bindings for ADC controller found in
1515 Ingenic JZ47xx SoCs.
1616
17− ADC clients must use the format described in iio-bindings.txt, giving
18− a phandle and IIO specifier pair ("io-channels") to the ADC controller.
17+ ADC clients must use the format described in
18+ https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/iio-consumer.yaml,
19+ giving a phandle and IIO specifier pair ("io-channels") to the ADC controller.
1920
2021 properties:
2122 compatible:
Documentation/devicetree/bindings/input/adc-joystick.yaml+3−1
@@ -24,7 +24,9 @@ properties: · 23 unmodified lines
2424 description: >
2525 List of phandle and IIO specifier pairs.
2626 Each pair defines one ADC channel to which a joystick axis is connected.
27− See Documentation/devicetree/bindings/iio/iio-bindings.txt for details.
27+ See
28+ https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/iio-consumer.yaml
29+ for details.
2830
2931 '#address-cells':
3032 const: 1
Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.txt+4−1
@@ -5,7 +5,10 @@ Required properties: · 4 unmodified lines
55 - compatible: must be "resistive-adc-touch"
66 The device must be connected to an ADC device that provides channels for
77 position measurement and optional pressure.
8−Refer to ../iio/iio-bindings.txt for details
8+Refer to
9+https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/iio-consumer.yaml
10+for details
11+
912 - iio-channels: must have at least two channels connected to an ADC device.
1013 These should correspond to the channels exposed by the ADC device and should
1114 have the right index as the ADC device registers them. These channels
Documentation/devicetree/bindings/interrupt-controller/ingenic,intc.yaml+1−0
@@ -23,6 +23,7 @@ properties: · 22 unmodified lines
2323 - enum:
2424 - ingenic,jz4775-intc
2525 - ingenic,jz4770-intc
26+ - ingenic,jz4760b-intc
2627 - const: ingenic,jz4760-intc
2728 - items:
2829 - const: ingenic,x1000-intc
Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: CZ.NIC's Turris Omnia LEDs driver
88
99 maintainers:
10− - Marek Behún <marek.behun@nic.cz>
10+ - Marek Behún <kabel@kernel.org>
1111
1212 description:
1313 This module adds support for the RGB LEDs found on the front panel of the
Documentation/devicetree/bindings/mfd/ab8500.txt+3−1
@@ -72,7 +72,9 @@ Required child device properties: · 71 unmodified lines
7272 pwm|regulator|rtc|sysctrl|usb]";
7373
7474 A few child devices require ADC channels from the GPADC node. Those follow the
75− standard bindings from iio/iio-bindings.txt and iio/adc/adc.txt
75+ standard bindings from
76+ https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/iio-consumer.yaml
77+ and Documentation/devicetree/bindings/iio/adc/adc.yaml
7678
7779 abx500-temp : io-channels "aux1" and "aux2" for measuring external
7880 temperatures.
Documentation/devicetree/bindings/mfd/motorola-cpcap.txt+8−8
@@ -16,14 +16,14 @@ Optional subnodes: · 15 unmodified lines
1616 The sub-functions of CPCAP get their own node with their own compatible values,
1717 which are described in the following files:
1818
19−- ../power/supply/cpcap-battery.txt
20−- ../power/supply/cpcap-charger.txt
21−- ../regulator/cpcap-regulator.txt
22−- ../phy/phy-cpcap-usb.txt
23−- ../input/cpcap-pwrbutton.txt
24−- ../rtc/cpcap-rtc.txt
25−- ../leds/leds-cpcap.txt
26−- ../iio/adc/cpcap-adc.txt
19+- Documentation/devicetree/bindings/power/supply/cpcap-battery.txt
20+- Documentation/devicetree/bindings/power/supply/cpcap-charger.txt
21+- Documentation/devicetree/bindings/regulator/cpcap-regulator.txt
22+- Documentation/devicetree/bindings/phy/phy-cpcap-usb.txt
23+- Documentation/devicetree/bindings/input/cpcap-pwrbutton.txt
24+- Documentation/devicetree/bindings/rtc/cpcap-rtc.txt
25+- Documentation/devicetree/bindings/leds/leds-cpcap.txt
26+- Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml
2727
2828 The only exception is the audio codec. Instead of a compatible value its
2929 node must be named "audio-codec".
Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml+1−1
@@ -32,7 +32,7 @@ required: · 31 unmodified lines
3232 - interrupts
3333 - interrupt-names
3434
35−additionalProperties: false
35+unevaluatedProperties: false
3636
3737 examples:
3838 - |
Documentation/devicetree/bindings/net/ethernet-controller.yaml+1−1
@@ -49,7 +49,7 @@ properties: · 48 unmodified lines
4949 description:
5050 Reference to an nvmem node for the MAC address
5151
52− nvmem-cells-names:
52+ nvmem-cell-names:
5353 const: mac-address
5454
5555 phy-connection-type:
Documentation/devicetree/bindings/net/micrel-ksz90x1.txt+94−2
@@ -65,6 +65,71 @@ KSZ9031: · 64 unmodified lines
6565 step is 60ps. The default value is the neutral setting, so setting
6666 rxc-skew-ps=<0> actually results in -900 picoseconds adjustment.
6767
68+ The KSZ9031 hardware supports a range of skew values from negative to
69+ positive, where the specific range is property dependent. All values
70+ specified in the devicetree are offset by the minimum value so they
71+ can be represented as positive integers in the devicetree since it's
72+ difficult to represent a negative number in the devictree.
73+
74+ The following 5-bit values table apply to rxc-skew-ps and txc-skew-ps.
75+
76+ Pad Skew Value Delay (ps) Devicetree Value
77+ ------------------------------------------------------
78+ 0_0000 -900ps 0
79+ 0_0001 -840ps 60
80+ 0_0010 -780ps 120
81+ 0_0011 -720ps 180
82+ 0_0100 -660ps 240
83+ 0_0101 -600ps 300
84+ 0_0110 -540ps 360
85+ 0_0111 -480ps 420
86+ 0_1000 -420ps 480
87+ 0_1001 -360ps 540
88+ 0_1010 -300ps 600
89+ 0_1011 -240ps 660
90+ 0_1100 -180ps 720
91+ 0_1101 -120ps 780
92+ 0_1110 -60ps 840
93+ 0_1111 0ps 900
94+ 1_0000 60ps 960
95+ 1_0001 120ps 1020
96+ 1_0010 180ps 1080
97+ 1_0011 240ps 1140
98+ 1_0100 300ps 1200
99+ 1_0101 360ps 1260
100+ 1_0110 420ps 1320
101+ 1_0111 480ps 1380
102+ 1_1000 540ps 1440
103+ 1_1001 600ps 1500
104+ 1_1010 660ps 1560
105+ 1_1011 720ps 1620
106+ 1_1100 780ps 1680
107+ 1_1101 840ps 1740
108+ 1_1110 900ps 1800
109+ 1_1111 960ps 1860
110+
111+ The following 4-bit values table apply to the txdX-skew-ps, rxdX-skew-ps
112+ data pads, and the rxdv-skew-ps, txen-skew-ps control pads.
113+
114+ Pad Skew Value Delay (ps) Devicetree Value
115+ ------------------------------------------------------
116+ 0000 -420ps 0
117+ 0001 -360ps 60
118+ 0010 -300ps 120
119+ 0011 -240ps 180
120+ 0100 -180ps 240
121+ 0101 -120ps 300
122+ 0110 -60ps 360
123+ 0111 0ps 420
124+ 1000 60ps 480
125+ 1001 120ps 540
126+ 1010 180ps 600
127+ 1011 240ps 660
128+ 1100 300ps 720
129+ 1101 360ps 780
130+ 1110 420ps 840
131+ 1111 480ps 900
132+
68133 Optional properties:
69134
70135 Maximum value of 1860, default value 900:
@@ -120,11 +185,21 @@ KSZ9131: · 49 unmodified lines
120185
121186 Examples:
122187
188+ /* Attach to an Ethernet device with autodetected PHY */
189+ &enet {
190+ rxc-skew-ps = <1800>;
191+ rxdv-skew-ps = <0>;
192+ txc-skew-ps = <1800>;
193+ txen-skew-ps = <0>;
194+ status = "okay";
195+ };
196+
197+ /* Attach to an explicitly-specified PHY */
123198 mdio {
124199 phy0: ethernet-phy@0 {
125− rxc-skew-ps = <3000>;
200+ rxc-skew-ps = <1800>;
126201 rxdv-skew-ps = <0>;
127− txc-skew-ps = <3000>;
202+ txc-skew-ps = <1800>;
128203 txen-skew-ps = <0>;
129204 reg = <0>;
130205 };
@@ -133,3 +208,20 @@ Examples: · 2 unmodified lines
133208 phy = <&phy0>;
134209 phy-mode = "rgmii-id";
135210 };
211+
212+References
213+
214+ Micrel ksz9021rl/rn Data Sheet, Revision 1.2. Dated 2/13/2014.
215+ http://www.micrel.com/_PDF/Ethernet/datasheets/ksz9021rl-rn_ds.pdf
216+
217+ Micrel ksz9031rnx Data Sheet, Revision 2.1. Dated 11/20/2014.
218+ http://www.micrel.com/_PDF/Ethernet/datasheets/KSZ9031RNX.pdf
219+
220+Notes:
221+
222+ Note that a previous version of the Micrel ksz9021rl/rn Data Sheet
223+ was missing extended register 106 (transmit data pad skews), and
224+ incorrectly specified the ps per step as 200ps/step instead of
225+ 120ps/step. The latest update to this document reflects the latest
226+ revision of the Micrel specification even though usage in the kernel
227+ still reflects that incorrect document.
Documentation/devicetree/bindings/sound/fsl,spdif.yaml+4−0
@@ -21,6 +21,10 @@ properties: · 20 unmodified lines
2121 - fsl,vf610-spdif
2222 - fsl,imx6sx-spdif
2323 - fsl,imx8qm-spdif
24+ - fsl,imx8qxp-spdif
25+ - fsl,imx8mq-spdif
26+ - fsl,imx8mm-spdif
27+ - fsl,imx8mn-spdif
2428
2529 reg:
2630 maxItems: 1
Documentation/gpu/todo.rst+21−0
@@ -613,6 +613,27 @@ Some of these date from the very introduction of KMS in 2008 ... · 612 unmodified lines
613613
614614 Level: Intermediate
615615
616+Remove automatic page mapping from dma-buf importing
617+----------------------------------------------------
618+
619+When importing dma-bufs, the dma-buf and PRIME frameworks automatically map
620+imported pages into the importer's DMA area. drm_gem_prime_fd_to_handle() and
621+drm_gem_prime_handle_to_fd() require that importers call dma_buf_attach()
622+even if they never do actual device DMA, but only CPU access through
623+dma_buf_vmap(). This is a problem for USB devices, which do not support DMA
624+operations.
625+
626+To fix the issue, automatic page mappings should be removed from the
627+buffer-sharing code. Fixing this is a bit more involved, since the import/export
628+cache is also tied to &drm_gem_object.import_attach. Meanwhile we paper over
629+this problem for USB devices by fishing out the USB host controller device, as
630+long as that supports DMA. Otherwise importing can still needlessly fail.
631+
632+Contact: Thomas Zimmermann <tzimmermann@suse.de>, Daniel Vetter
633+
634+Level: Advanced
635+
636+
616637 Better Testing
617638 ==============
618639
Documentation/networking/bonding.rst+1−1
@@ -1988,7 +1988,7 @@ netif_carrier. · 1987 unmodified lines
19881988 If use_carrier is 0, then the MII monitor will first query the
19891989 device's (via ioctl) MII registers and check the link state. If that
19901990 request fails (not just that it returns carrier down), then the MII
1991−monitor will make an ethtool ETHOOL_GLINK request to attempt to obtain
1991+monitor will make an ethtool ETHTOOL_GLINK request to attempt to obtain
19921992 the same information. If both methods fail (i.e., the driver either
19931993 does not support or had some error in processing both the MII register
19941994 and ethtool requests), then the MII monitor will assume the link is
Documentation/networking/device_drivers/ethernet/amazon/ena.rst+1−1
@@ -267,7 +267,7 @@ DATA PATH · 266 unmodified lines
267267 Tx
268268 --
269269
270−end_start_xmit() is called by the stack. This function does the following:
270+ena_start_xmit() is called by the stack. This function does the following:
271271
272272 - Maps data buffers (skb->data and frags).
273273 - Populates ena_buf for the push buffer (if the driver and device are
Documentation/networking/devlink/devlink-dpipe.rst+1−1
@@ -52,7 +52,7 @@ purposes as a standard complementary tool. The system's view from · 51 unmodified lines
5252 ``devlink-dpipe`` should change according to the changes done by the
5353 standard configuration tools.
5454
55−For example, it’s quiet common to implement Access Control Lists (ACL)
55+For example, it’s quite common to implement Access Control Lists (ACL)
5656 using Ternary Content Addressable Memory (TCAM). The TCAM memory can be
5757 divided into TCAM regions. Complex TC filters can have multiple rules with
5858 different priorities and different lookup keys. On the other hand hardware
Documentation/networking/devlink/devlink-port.rst+2−2
@@ -151,7 +151,7 @@ representor netdevice. · 150 unmodified lines
151151 -------------
152152 A subfunction devlink port is created but it is not active yet. That means the
153153 entities are created on devlink side, the e-switch port representor is created,
154−but the subfunction device itself it not created. A user might use e-switch port
154+but the subfunction device itself is not created. A user might use e-switch port
155155 representor to do settings, putting it into bridge, adding TC rules, etc. A user
156156 might as well configure the hardware address (such as MAC address) of the
157157 subfunction while subfunction is inactive.
@@ -173,7 +173,7 @@ Terms and Definitions · 15 unmodified lines
173173 * - Term
174174 - Definitions
175175 * - ``PCI device``
176− - A physical PCI device having one or more PCI bus consists of one or
176+ - A physical PCI device having one or more PCI buses consists of one or
177177 more PCI controllers.
178178 * - ``PCI controller``
179179 - A controller consists of potentially multiple physical functions,
Documentation/networking/ethtool-netlink.rst+5−5
@@ -976,9 +976,9 @@ constraints on coalescing parameters and their values. · 975 unmodified lines
976976
977977
978978 PAUSE_GET
979−============
979+=========
980980
981−Gets channel counts like ``ETHTOOL_GPAUSE`` ioctl request.
981+Gets pause frame settings like ``ETHTOOL_GPAUSEPARAM`` ioctl request.
982982
983983 Request contents:
984984
@@ -1007,7 +1007,7 @@ the statistics in the following structure: · 22 unmodified lines
10071007 Each member has a corresponding attribute defined.
10081008
10091009 PAUSE_SET
1010−============
1010+=========
10111011
10121012 Sets pause parameters like ``ETHTOOL_GPAUSEPARAM`` ioctl request.
10131013
@@ -1024,7 +1024,7 @@ Request contents: · 10 unmodified lines
10241024 EEE_GET
10251025 =======
10261026
1027−Gets channel counts like ``ETHTOOL_GEEE`` ioctl request.
1027+Gets Energy Efficient Ethernet settings like ``ETHTOOL_GEEE`` ioctl request.
10281028
10291029 Request contents:
10301030
@@ -1054,7 +1054,7 @@ first 32 are provided by the ``ethtool_ops`` callback. · 23 unmodified lines
10541054 EEE_SET
10551055 =======
10561056
1057−Sets pause parameters like ``ETHTOOL_GEEEPARAM`` ioctl request.
1057+Sets Energy Efficient Ethernet parameters like ``ETHTOOL_SEEE`` ioctl request.
10581058
10591059 Request contents:
10601060
Documentation/networking/ip-sysctl.rst+0−15
@@ -1849,21 +1849,6 @@ ip6frag_low_thresh - INTEGER · 1848 unmodified lines
18491849 ip6frag_time - INTEGER
18501850 Time in seconds to keep an IPv6 fragment in memory.
18511851
1852−IPv6 Segment Routing:
1853−
1854−seg6_flowlabel - INTEGER
1855− Controls the behaviour of computing the flowlabel of outer
1856− IPv6 header in case of SR T.encaps
1857−
1858− == =======================================================
1859− -1 set flowlabel to zero.
1860− 0 copy flowlabel from Inner packet in case of Inner IPv6
1861− (Set flowlabel to 0 in case IPv4/L2)
1862− 1 Compute the flowlabel using seg6_make_flowlabel()
1863− == =======================================================
1864−
1865− Default is 0.
1866−
18671852 ``conf/default/*``:
18681853 Change the interface-specific default settings.
18691854
Documentation/networking/netdev-FAQ.rst+6−66
@@ -142,73 +142,13 @@ Please send incremental versions on top of what has been merged in order to fix · 141 unmodified lines
142142 the patches the way they would look like if your latest patch series was to be
143143 merged.
144144
145−How can I tell what patches are queued up for backporting to the various stable releases?
146−-----------------------------------------------------------------------------------------
147−Normally Greg Kroah-Hartman collects stable commits himself, but for
148−networking, Dave collects up patches he deems critical for the
149−networking subsystem, and then hands them off to Greg.
150−
151−There is a patchworks queue that you can see here:
152−
153− https://patchwork.kernel.org/bundle/netdev/stable/?state=*
154−
155−It contains the patches which Dave has selected, but not yet handed off
156−to Greg. If Greg already has the patch, then it will be here:
157−
158− https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git
159−
160−A quick way to find whether the patch is in this stable-queue is to
161−simply clone the repo, and then git grep the mainline commit ID, e.g.
162−::
163−
164− stable-queue$ git grep -l 284041ef21fdf2e
165− releases/3.0.84/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
166− releases/3.4.51/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
167− releases/3.9.8/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
168− stable/stable-queue$
169−
170−I see a network patch and I think it should be backported to stable. Should I request it via stable@vger.kernel.org like the references in the kernel's Documentation/process/stable-kernel-rules.rst file say?
171−---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
172−No, not for networking. Check the stable queues as per above first
173−to see if it is already queued. If not, then send a mail to netdev,
174−listing the upstream commit ID and why you think it should be a stable
175−candidate.
176−
177−Before you jump to go do the above, do note that the normal stable rules
178−in :ref:`Documentation/process/stable-kernel-rules.rst <stable_kernel_rules>`
179−still apply. So you need to explicitly indicate why it is a critical
180−fix and exactly what users are impacted. In addition, you need to
181−convince yourself that you *really* think it has been overlooked,
182−vs. having been considered and rejected.
183−
184−Generally speaking, the longer it has had a chance to "soak" in
185−mainline, the better the odds that it is an OK candidate for stable. So
186−scrambling to request a commit be added the day after it appears should
187−be avoided.
188−
189−I have created a network patch and I think it should be backported to stable. Should I add a Cc: stable@vger.kernel.org like the references in the kernel's Documentation/ directory say?
190−-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
191−No. See above answer. In short, if you think it really belongs in
192−stable, then ensure you write a decent commit log that describes who
193−gets impacted by the bug fix and how it manifests itself, and when the
194−bug was introduced. If you do that properly, then the commit will get
195−handled appropriately and most likely get put in the patchworks stable
196−queue if it really warrants it.
197−
198−If you think there is some valid information relating to it being in
199−stable that does *not* belong in the commit log, then use the three dash
200−marker line as described in
201−:ref:`Documentation/process/submitting-patches.rst <the_canonical_patch_format>`
202−to temporarily embed that information into the patch that you send.
203−
204−Are all networking bug fixes backported to all stable releases?
145+Are there special rules regarding stable submissions on netdev?
205146 ---------------------------------------------------------------
206−Due to capacity, Dave could only take care of the backports for the
207−last two stable releases. For earlier stable releases, each stable
208−branch maintainer is supposed to take care of them. If you find any
209−patch is missing from an earlier stable branch, please notify
210−stable@vger.kernel.org with either a commit ID or a formal patch
211−backported, and CC Dave and other relevant networking developers.
147+While it used to be the case that netdev submissions were not supposed
148+to carry explicit ``CC: stable@vger.kernel.org`` tags that is no longer
149+the case today. Please follow the standard stable rules in
150+:ref:`Documentation/process/stable-kernel-rules.rst <stable_kernel_rules>`,
151+and make sure you include appropriate Fixes tags!
212152
213153 Is the comment style convention different for the networking content?
214154 ---------------------------------------------------------------------
Documentation/networking/seg6-sysctl.rst+13−0
@@ -24,3 +24,16 @@ seg6_require_hmac - INTEGER · 23 unmodified lines
2424 * 1 - Drop SR packets without HMAC, validate SR packets with HMAC
2525
2626 Default is 0.
27+
28+seg6_flowlabel - INTEGER
29+ Controls the behaviour of computing the flowlabel of outer
30+ IPv6 header in case of SR T.encaps
31+
32+ == =======================================================
33+ -1 set flowlabel to zero.
34+ 0 copy flowlabel from Inner packet in case of Inner IPv6
35+ (Set flowlabel to 0 in case IPv4/L2)
36+ 1 Compute the flowlabel using seg6_make_flowlabel()
37+ == =======================================================
38+
39+ Default is 0.
Documentation/networking/xfrm_device.rst+1−1
@@ -50,7 +50,7 @@ Callbacks to implement · 49 unmodified lines
5050
5151 The NIC driver offering ipsec offload will need to implement these
5252 callbacks to make the offload available to the network stack's
53−XFRM subsytem. Additionally, the feature bits NETIF_F_HW_ESP and
53+XFRM subsystem. Additionally, the feature bits NETIF_F_HW_ESP and
5454 NETIF_F_HW_ESP_TX_CSUM will signal the availability of the offload.
5555
5656
Documentation/process/stable-kernel-rules.rst+0−6
@@ -35,12 +35,6 @@ Rules on what kind of patches are accepted, and which ones are not, into the · 34 unmodified lines
3535 Procedure for submitting patches to the -stable tree
3636 ----------------------------------------------------
3737
38− - If the patch covers files in net/ or drivers/net please follow netdev stable
39− submission guidelines as described in
40− :ref:`Documentation/networking/netdev-FAQ.rst <netdev-FAQ>`
41− after first checking the stable networking queue at
42− https://patchwork.kernel.org/bundle/netdev/stable/?state=*
43− to ensure the requested patch is not already queued up.
4438 - Security patches should not be handled (solely) by the -stable review
4539 process but should follow the procedures in
4640 :ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`.
Documentation/process/submitting-patches.rst+0−5
@@ -250,11 +250,6 @@ should also read · 249 unmodified lines
250250 :ref:`Documentation/process/stable-kernel-rules.rst <stable_kernel_rules>`
251251 in addition to this file.
252252
253−Note, however, that some subsystem maintainers want to come to their own
254−conclusions on which patches should go to the stable trees. The networking
255−maintainer, in particular, would rather not see individual developers
256−adding lines like the above to their patches.
257−
258253 If changes affect userland-kernel interfaces, please send the MAN-PAGES
259254 maintainer (as listed in the MAINTAINERS file) a man-pages patch, or at
260255 least a notification of the change, so that some information makes its way
Documentation/virt/kvm/api.rst+9−3
@@ -182,6 +182,9 @@ is dependent on the CPU capability and the kernel configuration. The limit can · 181 unmodified lines
182182 be retrieved using KVM_CAP_ARM_VM_IPA_SIZE of the KVM_CHECK_EXTENSION
183183 ioctl() at run-time.
184184
185+Creation of the VM will fail if the requested IPA size (whether it is
186+implicit or explicit) is unsupported on the host.
187+
185188 Please note that configuring the IPA size does not affect the capability
186189 exposed by the guest CPUs in ID_AA64MMFR0_EL1[PARange]. It only affects
187190 size of the address translated by the stage2 level (guest physical to
@@ -1492,7 +1495,8 @@ Fails if any VCPU has already been created. · 1304 unmodified lines
14921495
14931496 Define which vcpu is the Bootstrap Processor (BSP). Values are the same
14941497 as the vcpu id in KVM_CREATE_VCPU. If this ioctl is not called, the default
1495−is vcpu 0.
1498+is vcpu 0. This ioctl has to be called before vcpu creation,
1499+otherwise it will return EBUSY error.
14961500
14971501
14981502 4.42 KVM_GET_XSAVE
@@ -4803,8 +4807,10 @@ If an MSR access is not permitted through the filtering, it generates a · 3304 unmodified lines
48034807 allows user space to deflect and potentially handle various MSR accesses
48044808 into user space.
48054809
4806−If a vCPU is in running state while this ioctl is invoked, the vCPU may
4807−experience inconsistent filtering behavior on MSR accesses.
4810+Note, invoking this ioctl with a vCPU is running is inherently racy. However,
4811+KVM does guarantee that vCPUs will see either the previous filter or the new
4812+filter, e.g. MSRs with identical settings in both the old and new filter will
4813+have deterministic behavior.
48084814
48094815 4.127 KVM_XEN_HVM_SET_ATTR
48104816 --------------------------
MAINTAINERS+61−45
@@ -261,8 +261,8 @@ ABI/API · 260 unmodified lines
261261 L: linux-api@vger.kernel.org
262262 F: include/linux/syscalls.h
263263 F: kernel/sys_ni.c
264−F: include/uapi/
265−F: arch/*/include/uapi/
264+X: include/uapi/
265+X: arch/*/include/uapi/
266266
267267 ABIT UGURU 1,2 HARDWARE MONITOR DRIVER
268268 M: Hans de Goede <hdegoede@redhat.com>
@@ -1181,7 +1181,7 @@ M: Joel Fernandes <joel@joelfernandes.org> · 912 unmodified lines
11811181 M: Christian Brauner <christian@brauner.io>
11821182 M: Hridya Valsaraju <hridya@google.com>
11831183 M: Suren Baghdasaryan <surenb@google.com>
1184−L: devel@driverdev.osuosl.org
1184+L: linux-kernel@vger.kernel.org
11851185 S: Supported
11861186 T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
11871187 F: drivers/android/
@@ -1576,11 +1576,13 @@ R: Jernej Skrabec <jernej.skrabec@siol.net> · 388 unmodified lines
15761576 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
15771577 S: Maintained
15781578 T: git git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git
1579+L: linux-sunxi@lists.linux.dev
15791580 F: arch/arm/mach-sunxi/
15801581 F: arch/arm64/boot/dts/allwinner/
15811582 F: drivers/clk/sunxi-ng/
15821583 F: drivers/pinctrl/sunxi/
15831584 F: drivers/soc/sunxi/
1585+N: allwinner
15841586 N: sun[x456789]i
15851587 N: sun50i
15861588
@@ -1790,19 +1792,26 @@ F: drivers/net/ethernet/cortina/ · 203 unmodified lines
17901792 F: drivers/pinctrl/pinctrl-gemini.c
17911793 F: drivers/rtc/rtc-ftrtc010.c
17921794
1793−ARM/CZ.NIC TURRIS MOX SUPPORT
1794−M: Marek Behun <marek.behun@nic.cz>
1795+ARM/CZ.NIC TURRIS SUPPORT
1796+M: Marek Behun <kabel@kernel.org>
17951797 S: Maintained
1796−W: http://mox.turris.cz
1798+W: https://www.turris.cz/
17971799 F: Documentation/ABI/testing/debugfs-moxtet
17981800 F: Documentation/ABI/testing/sysfs-bus-moxtet-devices
17991801 F: Documentation/ABI/testing/sysfs-firmware-turris-mox-rwtm
18001802 F: Documentation/devicetree/bindings/bus/moxtet.txt
18011803 F: Documentation/devicetree/bindings/firmware/cznic,turris-mox-rwtm.txt
18021804 F: Documentation/devicetree/bindings/gpio/gpio-moxtet.txt
1805+F: Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
1806+F: Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt
18031807 F: drivers/bus/moxtet.c
18041808 F: drivers/firmware/turris-mox-rwtm.c
1809+F: drivers/leds/leds-turris-omnia.c
1810+F: drivers/mailbox/armada-37xx-rwtm-mailbox.c
18051811 F: drivers/gpio/gpio-moxtet.c
1812+F: drivers/watchdog/armada_37xx_wdt.c
1813+F: include/dt-bindings/bus/moxtet.h
1814+F: include/linux/armada-37xx-rwtm-mailbox.h
18061815 F: include/linux/moxtet.h
18071816
18081817 ARM/EZX SMARTPHONES (A780, A910, A1200, E680, ROKR E2 and ROKR E6)
@@ -2489,7 +2498,7 @@ N: sc27xx · 680 unmodified lines
24892498 N: sc2731
24902499
24912500 ARM/STI ARCHITECTURE
2492−M: Patrice Chotard <patrice.chotard@st.com>
2501+M: Patrice Chotard <patrice.chotard@foss.st.com>
24932502 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
24942503 S: Maintained
24952504 W: http://www.stlinux.com
@@ -2522,7 +2531,7 @@ F: include/linux/remoteproc/st_slim_rproc.h · 26 unmodified lines
25222531
25232532 ARM/STM32 ARCHITECTURE
25242533 M: Maxime Coquelin <mcoquelin.stm32@gmail.com>
2525−M: Alexandre Torgue <alexandre.torgue@st.com>
2534+M: Alexandre Torgue <alexandre.torgue@foss.st.com>
25262535 L: linux-stm32@st-md-mailman.stormreply.com (moderated for non-subscribers)
25272536 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
25282537 S: Maintained
@@ -3115,7 +3124,7 @@ C: irc://irc.oftc.net/bcache · 586 unmodified lines
31153124 F: drivers/md/bcache/
31163125
31173126 BDISP ST MEDIA DRIVER
3118−M: Fabien Dessenne <fabien.dessenne@st.com>
3127+M: Fabien Dessenne <fabien.dessenne@foss.st.com>
31193128 L: linux-media@vger.kernel.org
31203129 S: Supported
31213130 W: https://linuxtv.org
@@ -3675,7 +3684,7 @@ M: bcm-kernel-feedback-list@broadcom.com · 553 unmodified lines
36753684 L: linux-pm@vger.kernel.org
36763685 S: Maintained
36773686 T: git git://github.com/broadcom/stblinux.git
3678−F: drivers/soc/bcm/bcm-pmb.c
3687+F: drivers/soc/bcm/bcm63xx/bcm-pmb.c
36793688 F: include/dt-bindings/soc/bcm-pmb.h
36803689
36813690 BROADCOM SPECIFIC AMBA DRIVER (BCMA)
@@ -5080,7 +5089,7 @@ S: Maintained · 1398 unmodified lines
50805089 F: drivers/platform/x86/dell/dell-wmi.c
50815090
50825091 DELTA ST MEDIA DRIVER
5083−M: Hugues Fruchet <hugues.fruchet@st.com>
5092+M: Hugues Fruchet <hugues.fruchet@foss.st.com>
50845093 L: linux-media@vger.kernel.org
50855094 S: Supported
50865095 W: https://linuxtv.org
@@ -5835,7 +5844,7 @@ M: David Airlie <airlied@linux.ie> · 748 unmodified lines
58355844 M: Daniel Vetter <daniel@ffwll.ch>
58365845 L: dri-devel@lists.freedesktop.org
58375846 S: Maintained
5838−B: https://bugs.freedesktop.org/
5847+B: https://gitlab.freedesktop.org/drm
58395848 C: irc://chat.freenode.net/dri-devel
58405849 T: git git://anongit.freedesktop.org/drm/drm
58415850 F: Documentation/devicetree/bindings/display/
@@ -6006,7 +6015,6 @@ F: drivers/gpu/drm/rockchip/ · 164 unmodified lines
60066015
60076016 DRM DRIVERS FOR STI
60086017 M: Benjamin Gaignard <benjamin.gaignard@linaro.org>
6009−M: Vincent Abriou <vincent.abriou@st.com>
60106018 L: dri-devel@lists.freedesktop.org
60116019 S: Maintained
60126020 T: git git://anongit.freedesktop.org/drm/drm-misc
@@ -6014,10 +6022,9 @@ F: Documentation/devicetree/bindings/display/st,stih4xx.txt · 1 unmodified line
60146022 F: drivers/gpu/drm/sti
60156023
60166024 DRM DRIVERS FOR STM
6017−M: Yannick Fertre <yannick.fertre@st.com>
6018−M: Philippe Cornu <philippe.cornu@st.com>
6025+M: Yannick Fertre <yannick.fertre@foss.st.com>
6026+M: Philippe Cornu <philippe.cornu@foss.st.com>
60196027 M: Benjamin Gaignard <benjamin.gaignard@linaro.org>
6020−M: Vincent Abriou <vincent.abriou@st.com>
60216028 L: dri-devel@lists.freedesktop.org
60226029 S: Maintained
60236030 T: git git://anongit.freedesktop.org/drm/drm-misc
@@ -7091,7 +7098,7 @@ S: Maintained · 1067 unmodified lines
70917098 F: drivers/i2c/busses/i2c-cpm.c
70927099
70937100 FREESCALE IMX / MXC FEC DRIVER
7094−M: Fugang Duan <fugang.duan@nxp.com>
7101+M: Joakim Zhang <qiangqing.zhang@nxp.com>
70957102 L: netdev@vger.kernel.org
70967103 S: Maintained
70977104 F: Documentation/devicetree/bindings/net/fsl-fec.txt
@@ -7476,8 +7483,9 @@ F: include/uapi/asm-generic/ · 378 unmodified lines
74767483 GENERIC PHY FRAMEWORK
74777484 M: Kishon Vijay Abraham I <kishon@ti.com>
74787485 M: Vinod Koul <vkoul@kernel.org>
7479−L: linux-kernel@vger.kernel.org
7486+L: linux-phy@lists.infradead.org
74807487 S: Supported
7488+Q: https://patchwork.kernel.org/project/linux-phy/list/
74817489 T: git git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git
74827490 F: Documentation/devicetree/bindings/phy/
74837491 F: drivers/phy/
@@ -8116,7 +8124,6 @@ F: drivers/crypto/hisilicon/sec2/sec_main.c · 632 unmodified lines
81168124
81178125 HISILICON STAGING DRIVERS FOR HIKEY 960/970
81188126 M: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
8119−L: devel@driverdev.osuosl.org
81208127 S: Maintained
81218128 F: drivers/staging/hikey9xx/
81228129
@@ -8231,7 +8238,7 @@ F: include/linux/hugetlb.h · 108 unmodified lines
82318238 F: mm/hugetlb.c
82328239
82338240 HVA ST MEDIA DRIVER
8234−M: Jean-Christophe Trotin <jean-christophe.trotin@st.com>
8241+M: Jean-Christophe Trotin <jean-christophe.trotin@foss.st.com>
82358242 L: linux-media@vger.kernel.org
82368243 S: Supported
82378244 W: https://linuxtv.org
@@ -8519,8 +8526,9 @@ F: drivers/pci/hotplug/rpaphp* · 281 unmodified lines
85198526
85208527 IBM Power SRIOV Virtual NIC Device Driver
85218528 M: Dany Madden <drt@linux.ibm.com>
8522−M: Lijun Pan <ljp@linux.ibm.com>
85238529 M: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
8530+R: Thomas Falcon <tlfalcon@linux.ibm.com>
8531+R: Lijun Pan <lijunp213@gmail.com>
85248532 L: netdev@vger.kernel.org
85258533 S: Supported
85268534 F: drivers/net/ethernet/ibm/ibmvnic.*
@@ -10030,7 +10038,6 @@ F: scripts/leaking_addresses.pl · 1503 unmodified lines
1003010038
1003110039 LED SUBSYSTEM
1003210040 M: Pavel Machek <pavel@ucw.cz>
10033−R: Dan Murphy <dmurphy@ti.com>
1003410041 L: linux-leds@vger.kernel.org
1003510042 S: Maintained
1003610043 T: git git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git
@@ -10716,7 +10723,8 @@ F: drivers/net/ethernet/marvell/mvpp2/ · 679 unmodified lines
1071610723
1071710724 MARVELL MWIFIEX WIRELESS DRIVER
1071810725 M: Amitkumar Karwar <amitkarwar@gmail.com>
10719−M: Ganapathi Bhat <ganapathi.bhat@nxp.com>
10726+M: Ganapathi Bhat <ganapathi017@gmail.com>
10727+M: Sharvari Harisangam <sharvari.harisangam@nxp.com>
1072010728 M: Xinming Hu <huxinming820@gmail.com>
1072110729 L: linux-wireless@vger.kernel.org
1072210730 S: Maintained
@@ -10905,7 +10913,6 @@ T: git git://linuxtv.org/media_tree.git · 182 unmodified lines
1090510913 F: drivers/media/radio/radio-maxiradio*
1090610914
1090710915 MCAN MMIO DEVICE DRIVER
10908−M: Dan Murphy <dmurphy@ti.com>
1090910916 M: Pankaj Sharma <pankj.sharma@samsung.com>
1091010917 L: linux-can@vger.kernel.org
1091110918 S: Maintained
@@ -11166,7 +11173,7 @@ T: git git://linuxtv.org/media_tree.git · 254 unmodified lines
1116611173 F: drivers/media/dvb-frontends/stv6111*
1116711174
1116811175 MEDIA DRIVERS FOR STM32 - DCMI
11169−M: Hugues Fruchet <hugues.fruchet@st.com>
11176+M: Hugues Fruchet <hugues.fruchet@foss.st.com>
1117011177 L: linux-media@vger.kernel.org
1117111178 S: Supported
1117211179 T: git git://linuxtv.org/media_tree.git
@@ -12537,7 +12544,7 @@ NETWORKING [MPTCP] · 1364 unmodified lines
1253712544 M: Mat Martineau <mathew.j.martineau@linux.intel.com>
1253812545 M: Matthieu Baerts <matthieu.baerts@tessares.net>
1253912546 L: netdev@vger.kernel.org
12540−L: mptcp@lists.01.org
12547+L: mptcp@lists.linux.dev
1254112548 S: Maintained
1254212549 W: https://github.com/multipath-tcp/mptcp_net-next/wiki
1254312550 B: https://github.com/multipath-tcp/mptcp_net-next/issues
@@ -14708,15 +14715,11 @@ F: drivers/net/ethernet/qlogic/qlcnic/ · 2164 unmodified lines
1470814715 QLOGIC QLGE 10Gb ETHERNET DRIVER
1470914716 M: Manish Chopra <manishc@marvell.com>
1471014717 M: GR-Linux-NIC-Dev@marvell.com
14711−L: netdev@vger.kernel.org
14712−S: Supported
14713−F: drivers/staging/qlge/
14714−
14715−QLOGIC QLGE 10Gb ETHERNET DRIVER
1471614718 M: Coiby Xu <coiby.xu@gmail.com>
1471714719 L: netdev@vger.kernel.org
14718−S: Maintained
14720+S: Supported
1471914721 F: Documentation/networking/device_drivers/qlogic/qlge.rst
14722+F: drivers/staging/qlge/
1472014723
1472114724 QM1D1B0004 MEDIA DRIVER
1472214725 M: Akihiro Tsukada <tskd08@gmail.com>
@@ -14856,6 +14859,14 @@ L: linux-arm-msm@vger.kernel.org · 133 unmodified lines
1485614859 S: Maintained
1485714860 F: drivers/iommu/arm/arm-smmu/qcom_iommu.c
1485814861
14862+QUALCOMM IPC ROUTER (QRTR) DRIVER
14863+M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
14864+L: linux-arm-msm@vger.kernel.org
14865+S: Maintained
14866+F: include/trace/events/qrtr.h
14867+F: include/uapi/linux/qrtr.h
14868+F: net/qrtr/
14869+
1485914870 QUALCOMM IPCC MAILBOX DRIVER
1486014871 M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
1486114872 L: linux-arm-msm@vger.kernel.org
@@ -15205,6 +15216,7 @@ F: fs/reiserfs/ · 343 unmodified lines
1520515216 REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM
1520615217 M: Ohad Ben-Cohen <ohad@wizery.com>
1520715218 M: Bjorn Andersson <bjorn.andersson@linaro.org>
15219+M: Mathieu Poirier <mathieu.poirier@linaro.org>
1520815220 L: linux-remoteproc@vger.kernel.org
1520915221 S: Maintained
1521015222 T: git git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc.git rproc-next
@@ -15218,6 +15230,7 @@ F: include/linux/remoteproc/ · 7 unmodified lines
1521815230 REMOTE PROCESSOR MESSAGING (RPMSG) SUBSYSTEM
1521915231 M: Ohad Ben-Cohen <ohad@wizery.com>
1522015232 M: Bjorn Andersson <bjorn.andersson@linaro.org>
15233+M: Mathieu Poirier <mathieu.poirier@linaro.org>
1522115234 L: linux-remoteproc@vger.kernel.org
1522215235 S: Maintained
1522315236 T: git git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc.git rpmsg-next
@@ -15634,8 +15647,8 @@ F: Documentation/s390/pci.rst · 410 unmodified lines
1563415647
1563515648 S390 VFIO AP DRIVER
1563615649 M: Tony Krowiak <akrowiak@linux.ibm.com>
15637−M: Pierre Morel <pmorel@linux.ibm.com>
1563815650 M: Halil Pasic <pasic@linux.ibm.com>
15651+M: Jason Herne <jjherne@linux.ibm.com>
1563915652 L: linux-s390@vger.kernel.org
1564015653 S: Supported
1564115654 W: http://www.ibm.com/developerworks/linux/linux390/
@@ -15647,6 +15660,7 @@ F: drivers/s390/crypto/vfio_ap_private.h · 5 unmodified lines
1564715660 S390 VFIO-CCW DRIVER
1564815661 M: Cornelia Huck <cohuck@redhat.com>
1564915662 M: Eric Farman <farman@linux.ibm.com>
15663+M: Matthew Rosato <mjrosato@linux.ibm.com>
1565015664 R: Halil Pasic <pasic@linux.ibm.com>
1565115665 L: linux-s390@vger.kernel.org
1565215666 L: kvm@vger.kernel.org
@@ -15657,6 +15671,7 @@ F: include/uapi/linux/vfio_ccw.h · 4 unmodified lines
1565715671
1565815672 S390 VFIO-PCI DRIVER
1565915673 M: Matthew Rosato <mjrosato@linux.ibm.com>
15674+M: Eric Farman <farman@linux.ibm.com>
1566015675 L: linux-s390@vger.kernel.org
1566115676 L: kvm@vger.kernel.org
1566215677 S: Supported
@@ -16886,8 +16901,10 @@ F: tools/spi/ · 1223 unmodified lines
1688616901
1688716902 SPIDERNET NETWORK DRIVER for CELL
1688816903 M: Ishizaki Kou <kou.ishizaki@toshiba.co.jp>
16904+M: Geoff Levand <geoff@infradead.org>
1688916905 L: netdev@vger.kernel.org
16890−S: Supported
16906+L: linuxppc-dev@lists.ozlabs.org
16907+S: Maintained
1689116908 F: Documentation/networking/device_drivers/ethernet/toshiba/spider_net.rst
1689216909 F: drivers/net/ethernet/toshiba/spider_net*
1689316910
@@ -16941,7 +16958,8 @@ F: Documentation/devicetree/bindings/media/i2c/st,st-mipid02.txt · 47 unmodified lines
1694116958 F: drivers/media/i2c/st-mipid02.c
1694216959
1694316960 ST STM32 I2C/SMBUS DRIVER
16944−M: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
16961+M: Pierre-Yves MORDRET <pierre-yves.mordret@foss.st.com>
16962+M: Alain Volmat <alain.volmat@foss.st.com>
1694516963 L: linux-i2c@vger.kernel.org
1694616964 S: Maintained
1694716965 F: drivers/i2c/busses/i2c-stm32*
@@ -17039,7 +17057,7 @@ F: drivers/staging/vt665?/ · 91 unmodified lines
1703917057
1704017058 STAGING SUBSYSTEM
1704117059 M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17042−L: devel@driverdev.osuosl.org
17060+L: linux-staging@lists.linux.dev
1704317061 S: Supported
1704417062 T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
1704517063 F: drivers/staging/
@@ -17066,7 +17084,7 @@ F: kernel/jump_label.c · 20 unmodified lines
1706617084 F: kernel/static_call.c
1706717085
1706817086 STI AUDIO (ASoC) DRIVERS
17069−M: Arnaud Pouliquen <arnaud.pouliquen@st.com>
17087+M: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
1707017088 L: alsa-devel@alsa-project.org (moderated for non-subscribers)
1707117089 S: Maintained
1707217090 F: Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt
@@ -17086,15 +17104,15 @@ T: git git://linuxtv.org/media_tree.git · 13 unmodified lines
1708617104 F: drivers/media/usb/stk1160/
1708717105
1708817106 STM32 AUDIO (ASoC) DRIVERS
17089−M: Olivier Moysan <olivier.moysan@st.com>
17090−M: Arnaud Pouliquen <arnaud.pouliquen@st.com>
17107+M: Olivier Moysan <olivier.moysan@foss.st.com>
17108+M: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
1709117109 L: alsa-devel@alsa-project.org (moderated for non-subscribers)
1709217110 S: Maintained
1709317111 F: Documentation/devicetree/bindings/iio/adc/st,stm32-*.yaml
1709417112 F: sound/soc/stm/
1709517113
1709617114 STM32 TIMER/LPTIMER DRIVERS
17097−M: Fabrice Gasnier <fabrice.gasnier@st.com>
17115+M: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
1709817116 S: Maintained
1709917117 F: Documentation/ABI/testing/*timer-stm32
1710017118 F: Documentation/devicetree/bindings/*/*stm32-*timer*
@@ -17104,7 +17122,7 @@ F: include/linux/*/stm32-*tim* · 3 unmodified lines
1710417122
1710517123 STMMAC ETHERNET DRIVER
1710617124 M: Giuseppe Cavallaro <peppe.cavallaro@st.com>
17107−M: Alexandre Torgue <alexandre.torgue@st.com>
17125+M: Alexandre Torgue <alexandre.torgue@foss.st.com>
1710817126 M: Jose Abreu <joabreu@synopsys.com>
1710917127 L: netdev@vger.kernel.org
1711017128 S: Supported
@@ -17846,7 +17864,6 @@ S: Maintained · 735 unmodified lines
1784617864 F: drivers/thermal/ti-soc-thermal/
1784717865
1784817866 TI BQ27XXX POWER SUPPLY DRIVER
17849−R: Dan Murphy <dmurphy@ti.com>
1785017867 F: drivers/power/supply/bq27xxx_battery.c
1785117868 F: drivers/power/supply/bq27xxx_battery_i2c.c
1785217869 F: include/linux/power/bq27xxx_battery.h
@@ -17981,7 +17998,6 @@ S: Odd Fixes · 128 unmodified lines
1798117998 F: sound/soc/codecs/tas571x*
1798217999
1798318000 TI TCAN4X5X DEVICE DRIVER
17984−M: Dan Murphy <dmurphy@ti.com>
1798518001 L: linux-can@vger.kernel.org
1798618002 S: Maintained
1798718003 F: Documentation/devicetree/bindings/net/can/tcan4x5x.txt
@@ -19134,7 +19150,7 @@ VME SUBSYSTEM · 1146 unmodified lines
1913419150 M: Martyn Welch <martyn@welchs.me.uk>
1913519151 M: Manohar Vanga <manohar.vanga@gmail.com>
1913619152 M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19137−L: devel@driverdev.osuosl.org
19153+L: linux-kernel@vger.kernel.org
1913819154 S: Maintained
1913919155 T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
1914019156 F: Documentation/driver-api/vme.rst
@@ -19165,7 +19181,7 @@ S: Maintained · 24 unmodified lines
1916519181 F: drivers/infiniband/hw/vmw_pvrdma/
1916619182
1916719183 VMware PVSCSI driver
19168−M: Jim Gill <jgill@vmware.com>
19184+M: Vishal Bhakta <vbhakta@vmware.com>
1916919185 M: VMware PV-Drivers <pv-drivers@vmware.com>
1917019186 L: linux-scsi@vger.kernel.org
1917119187 S: Maintained
Makefile+4−2
@@ -2,7 +2,7 @@ · 1 unmodified line
22 VERSION = 5
33 PATCHLEVEL = 12
44 SUBLEVEL = 0
5−EXTRAVERSION = -rc2
5+EXTRAVERSION = -rc8
66 NAME = Frozen Wasteland
77
88 # *DOCUMENTATION*
@@ -264,7 +264,8 @@ no-dot-config-targets := $(clean-targets) \ · 255 unmodified lines
264264 $(version_h) headers headers_% archheaders archscripts \
265265 %asm-generic kernelversion %src-pkg dt_binding_check \
266266 outputmakefile
267−no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease
267+no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease \
268+ image_name
268269 single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.s %.symtypes %/
269270
270271 config-build :=
@@ -478,6 +479,7 @@ USERINCLUDE := \ · 207 unmodified lines
478479 -I$(objtree)/arch/$(SRCARCH)/include/generated/uapi \
479480 -I$(srctree)/include/uapi \
480481 -I$(objtree)/include/generated/uapi \
482+ -include $(srctree)/include/linux/compiler-version.h \
481483 -include $(srctree)/include/linux/kconfig.h
482484
483485 # Use LINUXINCLUDE when you must reference the include/ directory.
arch/Kconfig+1−2
@@ -632,13 +632,12 @@ config HAS_LTO_CLANG · 631 unmodified lines
632632 def_bool y
633633 # Clang >= 11: https://github.com/ClangBuiltLinux/linux/issues/510
634634 depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD
635− depends on $(success,test $(LLVM) -eq 1)
636635 depends on $(success,test $(LLVM_IAS) -eq 1)
637636 depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm)
638637 depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
639638 depends on ARCH_SUPPORTS_LTO_CLANG
640639 depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT
641− depends on !KASAN
640+ depends on !KASAN || KASAN_HW_TAGS
642641 depends on !GCOV_KERNEL
643642 help
644643 The compiler and Kconfig options support building with Clang's
arch/arc/boot/dts/haps_hs.dts+1−1
@@ -16,7 +16,7 @@ · 15 unmodified lines
1616 memory {
1717 device_type = "memory";
1818 /* CONFIG_LINUX_RAM_BASE needs to match low mem start */
19− reg = <0x0 0x80000000 0x0 0x20000000 /* 512 MB low mem */
19+ reg = <0x0 0x80000000 0x0 0x40000000 /* 1 GB low mem */
2020 0x1 0x00000000 0x0 0x40000000>; /* 1 GB highmem */
2121 };
2222
arch/arc/kernel/signal.c+2−2
@@ -96,7 +96,7 @@ stash_usr_regs(struct rt_sigframe __user *sf, struct pt_regs *regs, · 95 unmodified lines
9696 sizeof(sf->uc.uc_mcontext.regs.scratch));
9797 err |= __copy_to_user(&sf->uc.uc_sigmask, set, sizeof(sigset_t));
9898
99− return err;
99+ return err ? -EFAULT : 0;
100100 }
101101
102102 static int restore_usr_regs(struct pt_regs *regs, struct rt_sigframe __user *sf)
@@ -110,7 +110,7 @@ static int restore_usr_regs(struct pt_regs *regs, struct rt_sigframe __user *sf) · 7 unmodified lines
110110 &(sf->uc.uc_mcontext.regs.scratch),
111111 sizeof(sf->uc.uc_mcontext.regs.scratch));
112112 if (err)
113− return err;
113+ return -EFAULT;
114114
115115 set_current_blocked(&set);
116116 regs->bta = uregs.scratch.bta;
arch/arc/kernel/unwind.c+14−13
@@ -187,25 +187,26 @@ static void init_unwind_table(struct unwind_table *table, const char *name, · 186 unmodified lines
187187 const void *table_start, unsigned long table_size,
188188 const u8 *header_start, unsigned long header_size)
189189 {
190− const u8 *ptr = header_start + 4;
191− const u8 *end = header_start + header_size;
192−
193190 table->core.pc = (unsigned long)core_start;
194191 table->core.range = core_size;
195192 table->init.pc = (unsigned long)init_start;
196193 table->init.range = init_size;
197194 table->address = table_start;
198195 table->size = table_size;
199−
200− /* See if the linker provided table looks valid. */
201− if (header_size <= 4
202− || header_start[0] != 1
203− || (void *)read_pointer(&ptr, end, header_start[1]) != table_start
204− || header_start[2] == DW_EH_PE_omit
205− || read_pointer(&ptr, end, header_start[2]) <= 0
206− || header_start[3] == DW_EH_PE_omit)
207− header_start = NULL;
208−
196+ /* To avoid the pointer addition with NULL pointer.*/
197+ if (header_start != NULL) {
198+ const u8 *ptr = header_start + 4;
199+ const u8 *end = header_start + header_size;
200+ /* See if the linker provided table looks valid. */
201+ if (header_size <= 4
202+ || header_start[0] != 1
203+ || (void *)read_pointer(&ptr, end, header_start[1])
204+ != table_start
205+ || header_start[2] == DW_EH_PE_omit
206+ || read_pointer(&ptr, end, header_start[2]) <= 0
207+ || header_start[3] == DW_EH_PE_omit)
208+ header_start = NULL;
209+ }
209210 table->hdrsz = header_size;
210211 smp_wmb();
211212 table->header = header_start;
arch/arm/Kconfig+8−1
@@ -348,6 +348,7 @@ config ARCH_EP93XX · 347 unmodified lines
348348 select ARM_AMBA
349349 imply ARM_PATCH_PHYS_VIRT
350350 select ARM_VIC
351+ select GENERIC_IRQ_MULTI_HANDLER
351352 select AUTO_ZRELADDR
352353 select CLKDEV_LOOKUP
353354 select CLKSRC_MMIO
@@ -1292,9 +1293,15 @@ config KASAN_SHADOW_OFFSET · 938 unmodified lines
12921293
12931294 config NR_CPUS
12941295 int "Maximum number of CPUs (2-32)"
1295− range 2 32
1296+ range 2 16 if DEBUG_KMAP_LOCAL
1297+ range 2 32 if !DEBUG_KMAP_LOCAL
12961298 depends on SMP
12971299 default "4"
1300+ help
1301+ The maximum number of CPUs that the kernel can support.
1302+ Up to 32 CPUs can be supported, or up to 16 if kmap_local()
1303+ debugging is enabled, which uses half of the per-CPU fixmap
1304+ slots as guard regions.
12981305
12991306 config HOTPLUG_CPU
13001307 bool "Support for hot-pluggable CPUs"
arch/arm/boot/dts/am33xx.dtsi+3−0
@@ -40,6 +40,9 @@ · 39 unmodified lines
4040 ethernet1 = &cpsw_emac1;
4141 spi0 = &spi0;
4242 spi1 = &spi1;
43+ mmc0 = &mmc1;
44+ mmc1 = &mmc2;
45+ mmc2 = &mmc3;
4346 };
4447
4548 cpus {
arch/arm/boot/dts/armada-385-turris-omnia.dts+3−1
@@ -32,7 +32,8 @@ · 31 unmodified lines
3232 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
3333 MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
3434 MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
35− MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>;
35+ MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
36+ MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
3637
3738 internal-regs {
3839
@@ -389,6 +390,7 @@ · 350 unmodified lines
389390 phy1: ethernet-phy@1 {
390391 compatible = "ethernet-phy-ieee802.3-c22";
391392 reg = <1>;
393+ marvell,reg-init = <3 18 0 0x4985>;
392394
393395 /* irq is connected to &pcawan pin 7 */
394396 };
arch/arm/boot/dts/at91-sam9x60ek.dts+0−8
@@ -334,14 +334,6 @@ · 333 unmodified lines
334334 };
335335
336336 &pinctrl {
337− atmel,mux-mask = <
338− /* A B C */
339− 0xFFFFFE7F 0xC0E0397F 0xEF00019D /* pioA */
340− 0x03FFFFFF 0x02FC7E68 0x00780000 /* pioB */
341− 0xffffffff 0xF83FFFFF 0xB800F3FC /* pioC */
342− 0x003FFFFF 0x003F8000 0x00000000 /* pioD */
343− >;
344−
345337 adc {
346338 pinctrl_adc_default: adc_default {
347339 atmel,pins = <AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE>;
arch/arm/boot/dts/at91-sama5d27_som1.dtsi+2−2
@@ -84,8 +84,8 @@ · 83 unmodified lines
8484 pinctrl-0 = <&pinctrl_macb0_default>;
8585 phy-mode = "rmii";
8686
87− ethernet-phy@0 {
88− reg = <0x0>;
87+ ethernet-phy@7 {
88+ reg = <0x7>;
8989 interrupt-parent = <&pioA>;
9090 interrupts = <PIN_PD31 IRQ_TYPE_LEVEL_LOW>;
9191 pinctrl-names = "default";
arch/arm/boot/dts/bcm2711.dtsi+0−12
@@ -308,14 +308,6 @@ · 307 unmodified lines
308308 #reset-cells = <1>;
309309 };
310310
311− bsc_intr: interrupt-controller@7ef00040 {
312− compatible = "brcm,bcm2711-l2-intc", "brcm,l2-intc";
313− reg = <0x7ef00040 0x30>;
314− interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
315− interrupt-controller;
316− #interrupt-cells = <1>;
317− };
318−
319311 aon_intr: interrupt-controller@7ef00100 {
320312 compatible = "brcm,bcm2711-l2-intc", "brcm,l2-intc";
321313 reg = <0x7ef00100 0x30>;
@@ -362,8 +354,6 @@ · 40 unmodified lines
362354 reg = <0x7ef04500 0x100>, <0x7ef00b00 0x300>;
363355 reg-names = "bsc", "auto-i2c";
364356 clock-frequency = <97500>;
365− interrupt-parent = <&bsc_intr>;
366− interrupts = <0>;
367357 status = "disabled";
368358 };
369359
@@ -405,8 +395,6 @@ · 35 unmodified lines
405395 reg = <0x7ef09500 0x100>, <0x7ef05b00 0x300>;
406396 reg-names = "bsc", "auto-i2c";
407397 clock-frequency = <97500>;
408− interrupt-parent = <&bsc_intr>;
409− interrupts = <1>;
410398 status = "disabled";
411399 };
412400 };
arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi+2−0
@@ -433,6 +433,7 @@ · 432 unmodified lines
433433 pinctrl-0 = <&pinctrl_usdhc2>;
434434 cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
435435 wp-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
436+ vmmc-supply = <&vdd_sd1_reg>;
436437 status = "disabled";
437438 };
438439
@@ -442,5 +443,6 @@ · 3 unmodified lines
442443 &pinctrl_usdhc3_cdwp>;
443444 cd-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
444445 wp-gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
446+ vmmc-supply = <&vdd_sd0_reg>;
445447 status = "disabled";
446448 };
arch/arm/boot/dts/imx6ul-14x14-evk.dtsi+16−6
@@ -210,9 +210,6 @@ · 209 unmodified lines
210210 micrel,led-mode = <1>;
211211 clocks = <&clks IMX6UL_CLK_ENET_REF>;
212212 clock-names = "rmii-ref";
213− reset-gpios = <&gpio_spi 1 GPIO_ACTIVE_LOW>;
214− reset-assert-us = <10000>;
215− reset-deassert-us = <100>;
216213
217214 };
218215
@@ -222,9 +219,6 @@ · 3 unmodified lines
222219 micrel,led-mode = <1>;
223220 clocks = <&clks IMX6UL_CLK_ENET2_REF>;
224221 clock-names = "rmii-ref";
225− reset-gpios = <&gpio_spi 2 GPIO_ACTIVE_LOW>;
226− reset-assert-us = <10000>;
227− reset-deassert-us = <100>;
228222 };
229223 };
230224 };
@@ -243,6 +237,22 @@ · 12 unmodified lines
243237 status = "okay";
244238 };
245239
240+&gpio_spi {
241+ eth0-phy-hog {
242+ gpio-hog;
243+ gpios = <1 GPIO_ACTIVE_HIGH>;
244+ output-high;
245+ line-name = "eth0-phy";
246+ };
247+
248+ eth1-phy-hog {
249+ gpio-hog;
250+ gpios = <2 GPIO_ACTIVE_HIGH>;
251+ output-high;
252+ line-name = "eth1-phy";
253+ };
254+};
255+
246256 &i2c1 {
247257 clock-frequency = <100000>;
248258 pinctrl-names = "default";
arch/arm/boot/dts/imx6ull-myir-mys-6ulx-eval.dts+1−0
@@ -14,5 +14,6 @@ · 13 unmodified lines
1414 };
1515
1616 &gpmi {
17+ fsl,use-minimum-ecc;
1718 status = "okay";
1819 };
arch/arm/boot/dts/omap3.dtsi+3−0
@@ -24,6 +24,9 @@ · 23 unmodified lines
2424 i2c0 = &i2c1;
2525 i2c1 = &i2c2;
2626 i2c2 = &i2c3;
27+ mmc0 = &mmc1;
28+ mmc1 = &mmc2;
29+ mmc2 = &mmc3;
2730 serial0 = &uart1;
2831 serial1 = &uart2;
2932 serial2 = &uart3;
arch/arm/boot/dts/omap4.dtsi+5−0
@@ -22,6 +22,11 @@ · 21 unmodified lines
2222 i2c1 = &i2c2;
2323 i2c2 = &i2c3;
2424 i2c3 = &i2c4;
25+ mmc0 = &mmc1;
26+ mmc1 = &mmc2;
27+ mmc2 = &mmc3;
28+ mmc3 = &mmc4;
29+ mmc4 = &mmc5;
2530 serial0 = &uart1;
2631 serial1 = &uart2;
2732 serial2 = &uart3;
arch/arm/boot/dts/omap44xx-clocks.dtsi+0−8
@@ -770,14 +770,6 @@ · 769 unmodified lines
770770 ti,max-div = <2>;
771771 };
772772
773− sha2md5_fck: sha2md5_fck@15c8 {
774− #clock-cells = <0>;
775− compatible = "ti,gate-clock";
776− clocks = <&l3_div_ck>;
777− ti,bit-shift = <1>;
778− reg = <0x15c8>;
779− };
780−
781773 usb_phy_cm_clk32k: usb_phy_cm_clk32k@640 {
782774 #clock-cells = <0>;
783775 compatible = "ti,gate-clock";
arch/arm/boot/dts/omap5.dtsi+5−0
@@ -25,6 +25,11 @@ · 24 unmodified lines
2525 i2c2 = &i2c3;
2626 i2c3 = &i2c4;
2727 i2c4 = &i2c5;
28+ mmc0 = &mmc1;
29+ mmc1 = &mmc2;
30+ mmc2 = &mmc3;
31+ mmc3 = &mmc4;
32+ mmc4 = &mmc5;
2833 serial0 = &uart1;
2934 serial1 = &uart2;
3035 serial2 = &uart3;
arch/arm/boot/dts/sam9x60.dtsi+9−0
@@ -606,6 +606,15 @@ · 605 unmodified lines
606606 compatible = "microchip,sam9x60-pinctrl", "atmel,at91sam9x5-pinctrl", "atmel,at91rm9200-pinctrl", "simple-bus";
607607 ranges = <0xfffff400 0xfffff400 0x800>;
608608
609+ /* mux-mask corresponding to sam9x60 SoC in TFBGA228L package */
610+ atmel,mux-mask = <
611+ /* A B C */
612+ 0xffffffff 0xffe03fff 0xef00019d /* pioA */
613+ 0x03ffffff 0x02fc7e7f 0x00780000 /* pioB */
614+ 0xffffffff 0xffffffff 0xf83fffff /* pioC */
615+ 0x003fffff 0x003f8000 0x00000000 /* pioD */
616+ >;
617+
609618 pioA: gpio@fffff400 {
610619 compatible = "microchip,sam9x60-gpio", "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
611620 reg = <0xfffff400 0x200>;
arch/arm/mach-footbridge/cats-pci.c+2−2
@@ -15,14 +15,14 @@ · 14 unmodified lines
1515 #include <asm/mach-types.h>
1616
1717 /* cats host-specific stuff */
18−static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
18+static int irqmap_cats[] = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
1919
2020 static u8 cats_no_swizzle(struct pci_dev *dev, u8 *pin)
2121 {
2222 return 0;
2323 }
2424
25−static int __init cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
25+static int cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
2626 {
2727 if (dev->irq >= 255)
2828 return -1; /* not a valid interrupt. */
arch/arm/mach-footbridge/ebsa285-pci.c+2−2
@@ -14,9 +14,9 @@ · 13 unmodified lines
1414 #include <asm/mach/pci.h>
1515 #include <asm/mach-types.h>
1616
17−static int irqmap_ebsa285[] __initdata = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
17+static int irqmap_ebsa285[] = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
1818
19−static int __init ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
19+static int ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
2020 {
2121 if (dev->vendor == PCI_VENDOR_ID_CONTAQ &&
2222 dev->device == PCI_DEVICE_ID_CONTAQ_82C693)
arch/arm/mach-footbridge/netwinder-pci.c+1−1
@@ -18,7 +18,7 @@ · 17 unmodified lines
1818 * We now use the slot ID instead of the device identifiers to select
1919 * which interrupt is routed where.
2020 */
21−static int __init netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
21+static int netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
2222 {
2323 switch (slot) {
2424 case 0: /* host bridge */
arch/arm/mach-footbridge/personal-pci.c+2−3
@@ -14,13 +14,12 @@ · 13 unmodified lines
1414 #include <asm/mach/pci.h>
1515 #include <asm/mach-types.h>
1616
17−static int irqmap_personal_server[] __initdata = {
17+static int irqmap_personal_server[] = {
1818 IRQ_IN0, IRQ_IN1, IRQ_IN2, IRQ_IN3, 0, 0, 0,
1919 IRQ_DOORBELLHOST, IRQ_DMA1, IRQ_DMA2, IRQ_PCI
2020 };
2121
22−static int __init personal_server_map_irq(const struct pci_dev *dev, u8 slot,
23− u8 pin)
22+static int personal_server_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
2423 {
2524 unsigned char line;
2625
arch/arm/mach-imx/avic.c+15−1
@@ -7,6 +7,7 @@ · 6 unmodified lines
77 #include <linux/module.h>
88 #include <linux/irq.h>
99 #include <linux/irqdomain.h>
10+#include <linux/irqchip.h>
1011 #include <linux/io.h>
1112 #include <linux/of.h>
1213 #include <linux/of_address.h>
@@ -162,7 +163,7 @@ static void __exception_irq_entry avic_handle_irq(struct pt_regs *regs) · 149 unmodified lines
162163 * interrupts. It registers the interrupt enable and disable functions
163164 * to the kernel for each interrupt source.
164165 */
165−void __init mxc_init_irq(void __iomem *irqbase)
166+static void __init mxc_init_irq(void __iomem *irqbase)
166167 {
167168 struct device_node *np;
168169 int irq_base;
@@ -220,3 +221,16 @@ void __init mxc_init_irq(void __iomem *irqbase) · 51 unmodified lines
220221
221222 printk(KERN_INFO "MXC IRQ initialized\n");
222223 }
224+
225+static int __init imx_avic_init(struct device_node *node,
226+ struct device_node *parent)
227+{
228+ void __iomem *avic_base;
229+
230+ avic_base = of_iomap(node, 0);
231+ BUG_ON(!avic_base);
232+ mxc_init_irq(avic_base);
233+ return 0;
234+}
235+
236+IRQCHIP_DECLARE(imx_avic, "fsl,avic", imx_avic_init);
arch/arm/mach-imx/common.h+0−1
@@ -22,7 +22,6 @@ void mx35_map_io(void); · 21 unmodified lines
2222 void imx21_init_early(void);
2323 void imx31_init_early(void);
2424 void imx35_init_early(void);
25−void mxc_init_irq(void __iomem *);
2625 void mx31_init_irq(void);
2726 void mx35_init_irq(void);
2827 void mxc_set_cpu_type(unsigned int type);
arch/arm/mach-imx/mach-imx1.c+0−11
@@ -17,16 +17,6 @@ static void __init imx1_init_early(void) · 16 unmodified lines
1717 mxc_set_cpu_type(MXC_CPU_MX1);
1818 }
1919
20−static void __init imx1_init_irq(void)
21−{
22− void __iomem *avic_addr;
23−
24− avic_addr = ioremap(MX1_AVIC_ADDR, SZ_4K);
25− WARN_ON(!avic_addr);
26−
27− mxc_init_irq(avic_addr);
28−}
29−
3020 static const char * const imx1_dt_board_compat[] __initconst = {
3121 "fsl,imx1",
3222 NULL
@@ -34,7 +24,6 @@ static const char * const imx1_dt_board_compat[] __initconst = { · 1 unmodified line
3424
3525 DT_MACHINE_START(IMX1_DT, "Freescale i.MX1 (Device Tree Support)")
3626 .init_early = imx1_init_early,
37− .init_irq = imx1_init_irq,
3827 .dt_compat = imx1_dt_board_compat,
3928 .restart = mxc_restart,
4029 MACHINE_END
arch/arm/mach-imx/mach-imx25.c+0−12
@@ -22,17 +22,6 @@ static void __init imx25_dt_init(void) · 21 unmodified lines
2222 imx_aips_allow_unprivileged_access("fsl,imx25-aips");
2323 }
2424
25−static void __init mx25_init_irq(void)
26−{
27− struct device_node *np;
28− void __iomem *avic_base;
29−
30− np = of_find_compatible_node(NULL, NULL, "fsl,avic");
31− avic_base = of_iomap(np, 0);
32− BUG_ON(!avic_base);
33− mxc_init_irq(avic_base);
34−}
35−
3625 static const char * const imx25_dt_board_compat[] __initconst = {
3726 "fsl,imx25",
3827 NULL
@@ -42,6 +31,5 @@ DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)") · 3 unmodified lines
4231 .init_early = imx25_init_early,
4332 .init_machine = imx25_dt_init,
4433 .init_late = imx25_pm_init,
45− .init_irq = mx25_init_irq,
4634 .dt_compat = imx25_dt_board_compat,
4735 MACHINE_END
arch/arm/mach-imx/mach-imx27.c+0−12
@@ -56,17 +56,6 @@ static void __init imx27_init_early(void) · 55 unmodified lines
5656 mxc_set_cpu_type(MXC_CPU_MX27);
5757 }
5858
59−static void __init mx27_init_irq(void)
60−{
61− void __iomem *avic_base;
62− struct device_node *np;
63−
64− np = of_find_compatible_node(NULL, NULL, "fsl,avic");
65− avic_base = of_iomap(np, 0);
66− BUG_ON(!avic_base);
67− mxc_init_irq(avic_base);
68−}
69−
7059 static const char * const imx27_dt_board_compat[] __initconst = {
7160 "fsl,imx27",
7261 NULL
@@ -75,7 +64,6 @@ static const char * const imx27_dt_board_compat[] __initconst = { · 2 unmodified lines
7564 DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)")
7665 .map_io = mx27_map_io,
7766 .init_early = imx27_init_early,
78− .init_irq = mx27_init_irq,
7967 .init_late = imx27_pm_init,
8068 .dt_compat = imx27_dt_board_compat,
8169 MACHINE_END
arch/arm/mach-imx/mach-imx31.c+0−1
@@ -14,6 +14,5 @@ static const char * const imx31_dt_board_compat[] __initconst = { · 13 unmodified lines
1414 DT_MACHINE_START(IMX31_DT, "Freescale i.MX31 (Device Tree Support)")
1515 .map_io = mx31_map_io,
1616 .init_early = imx31_init_early,
17− .init_irq = mx31_init_irq,
1817 .dt_compat = imx31_dt_board_compat,
1918 MACHINE_END
arch/arm/mach-imx/mach-imx35.c+0−1
@@ -27,6 +27,5 @@ DT_MACHINE_START(IMX35_DT, "Freescale i.MX35 (Device Tree Support)") · 26 unmodified lines
2727 .l2c_aux_mask = ~0,
2828 .map_io = mx35_map_io,
2929 .init_early = imx35_init_early,
30− .init_irq = mx35_init_irq,
3130 .dt_compat = imx35_dt_board_compat,
3231 MACHINE_END
arch/arm/mach-imx/mm-imx3.c+0−24
@@ -109,18 +109,6 @@ void __init imx31_init_early(void) · 108 unmodified lines
109109 mx3_ccm_base = of_iomap(np, 0);
110110 BUG_ON(!mx3_ccm_base);
111111 }
112−
113−void __init mx31_init_irq(void)
114−{
115− void __iomem *avic_base;
116− struct device_node *np;
117−
118− np = of_find_compatible_node(NULL, NULL, "fsl,imx31-avic");
119− avic_base = of_iomap(np, 0);
120− BUG_ON(!avic_base);
121−
122− mxc_init_irq(avic_base);
123−}
124112 #endif /* ifdef CONFIG_SOC_IMX31 */
125113
126114 #ifdef CONFIG_SOC_IMX35
@@ -158,16 +146,4 @@ void __init imx35_init_early(void) · 31 unmodified lines
158146 mx3_ccm_base = of_iomap(np, 0);
159147 BUG_ON(!mx3_ccm_base);
160148 }
161−
162−void __init mx35_init_irq(void)
163−{
164− void __iomem *avic_base;
165− struct device_node *np;
166−
167− np = of_find_compatible_node(NULL, NULL, "fsl,imx35-avic");
168− avic_base = of_iomap(np, 0);
169− BUG_ON(!avic_base);
170−
171− mxc_init_irq(avic_base);
172−}
173149 #endif /* ifdef CONFIG_SOC_IMX35 */
arch/arm/mach-keystone/keystone.c+2−2
@@ -65,7 +65,7 @@ static void __init keystone_init(void) · 64 unmodified lines
6565 static long long __init keystone_pv_fixup(void)
6666 {
6767 long long offset;
68− phys_addr_t mem_start, mem_end;
68+ u64 mem_start, mem_end;
6969
7070 mem_start = memblock_start_of_DRAM();
7171 mem_end = memblock_end_of_DRAM();
@@ -78,7 +78,7 @@ static long long __init keystone_pv_fixup(void) · 6 unmodified lines
7878 if (mem_start < KEYSTONE_HIGH_PHYS_START ||
7979 mem_end > KEYSTONE_HIGH_PHYS_END) {
8080 pr_crit("Invalid address space for memory (%08llx-%08llx)\n",
81− (u64)mem_start, (u64)mem_end);
81+ mem_start, mem_end);
8282 return 0;
8383 }
8484
arch/arm/mach-omap1/ams-delta-fiq-handler.S+1−0
@@ -15,6 +15,7 @@ · 14 unmodified lines
1515 #include <linux/platform_data/gpio-omap.h>
1616
1717 #include <asm/assembler.h>
18+#include <asm/irq.h>
1819
1920 #include "ams-delta-fiq.h"
2021 #include "board-ams-delta.h"
arch/arm/mach-omap2/board-generic.c+1−1
@@ -33,7 +33,7 @@ static void __init __maybe_unused omap_generic_init(void) · 32 unmodified lines
3333 }
3434
3535 /* Clocks are needed early, see drivers/clocksource for the rest */
36−void __init __maybe_unused omap_init_time_of(void)
36+static void __init __maybe_unused omap_init_time_of(void)
3737 {
3838 omap_clk_init();
3939 timer_probe();
arch/arm/mach-omap2/omap-secure.c+39−0
@@ -9,6 +9,7 @@ · 8 unmodified lines
99 */
1010
1111 #include <linux/arm-smccc.h>
12+#include <linux/cpu_pm.h>
1213 #include <linux/kernel.h>
1314 #include <linux/init.h>
1415 #include <linux/io.h>
@@ -20,6 +21,7 @@ · 5 unmodified lines
2021
2122 #include "common.h"
2223 #include "omap-secure.h"
24+#include "soc.h"
2325
2426 static phys_addr_t omap_secure_memblock_base;
2527
@@ -213,3 +215,40 @@ void __init omap_secure_init(void) · 187 unmodified lines
213215 {
214216 omap_optee_init_check();
215217 }
218+
219+/*
220+ * Dummy dispatcher call after core OSWR and MPU off. Updates the ROM return
221+ * address after MMU has been re-enabled after CPU1 has been woken up again.
222+ * Otherwise the ROM code will attempt to use the earlier physical return
223+ * address that got set with MMU off when waking up CPU1. Only used on secure
224+ * devices.
225+ */
226+static int cpu_notifier(struct notifier_block *nb, unsigned long cmd, void *v)
227+{
228+ switch (cmd) {
229+ case CPU_CLUSTER_PM_EXIT:
230+ omap_secure_dispatcher(OMAP4_PPA_SERVICE_0,
231+ FLAG_START_CRITICAL,
232+ 0, 0, 0, 0, 0);
233+ break;
234+ default:
235+ break;
236+ }
237+
238+ return NOTIFY_OK;
239+}
240+
241+static struct notifier_block secure_notifier_block = {
242+ .notifier_call = cpu_notifier,
243+};
244+
245+static int __init secure_pm_init(void)
246+{
247+ if (omap_type() == OMAP2_DEVICE_TYPE_GP || !soc_is_omap44xx())
248+ return 0;
249+
250+ cpu_pm_register_notifier(&secure_notifier_block);
251+
252+ return 0;
253+}
254+omap_arch_initcall(secure_pm_init);
arch/arm/mach-omap2/omap-secure.h+1−0
@@ -50,6 +50,7 @@ · 49 unmodified lines
5050 #define OMAP5_DRA7_MON_SET_ACR_INDEX 0x107
5151
5252 /* Secure PPA(Primary Protected Application) APIs */
53+#define OMAP4_PPA_SERVICE_0 0x21
5354 #define OMAP4_PPA_L2_POR_INDEX 0x23
5455 #define OMAP4_PPA_CPU_ACTRL_SMP_INDEX 0x25
5556
arch/arm/mach-omap2/pmic-cpcap.c+2−2
@@ -246,10 +246,10 @@ int __init omap4_cpcap_init(void) · 245 unmodified lines
246246 omap_voltage_register_pmic(voltdm, &omap443x_max8952_mpu);
247247
248248 if (of_machine_is_compatible("motorola,droid-bionic")) {
249− voltdm = voltdm_lookup("mpu");
249+ voltdm = voltdm_lookup("core");
250250 omap_voltage_register_pmic(voltdm, &omap_cpcap_core);
251251
252− voltdm = voltdm_lookup("mpu");
252+ voltdm = voltdm_lookup("iva");
253253 omap_voltage_register_pmic(voltdm, &omap_cpcap_iva);
254254 } else {
255255 voltdm = voltdm_lookup("core");
arch/arm/mach-omap2/sr_device.c+58−17
@@ -88,34 +88,26 @@ static void __init sr_set_nvalues(struct omap_volt_data *volt_data, · 87 unmodified lines
8888
8989 extern struct omap_sr_data omap_sr_pdata[];
9090
91−static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
91+static int __init sr_init_by_name(const char *name, const char *voltdm)
9292 {
9393 struct omap_sr_data *sr_data = NULL;
9494 struct omap_volt_data *volt_data;
95− struct omap_smartreflex_dev_attr *sr_dev_attr;
9695 static int i;
9796
98− if (!strncmp(oh->name, "smartreflex_mpu_iva", 20) ||
99− !strncmp(oh->name, "smartreflex_mpu", 16))
97+ if (!strncmp(name, "smartreflex_mpu_iva", 20) ||
98+ !strncmp(name, "smartreflex_mpu", 16))
10099 sr_data = &omap_sr_pdata[OMAP_SR_MPU];
101− else if (!strncmp(oh->name, "smartreflex_core", 17))
100+ else if (!strncmp(name, "smartreflex_core", 17))
102101 sr_data = &omap_sr_pdata[OMAP_SR_CORE];
103− else if (!strncmp(oh->name, "smartreflex_iva", 16))
102+ else if (!strncmp(name, "smartreflex_iva", 16))
104103 sr_data = &omap_sr_pdata[OMAP_SR_IVA];
105104
106105 if (!sr_data) {
107− pr_err("%s: Unknown instance %s\n", __func__, oh->name);
106+ pr_err("%s: Unknown instance %s\n", __func__, name);
108107 return -EINVAL;
109108 }
110109
111− sr_dev_attr = (struct omap_smartreflex_dev_attr *)oh->dev_attr;
112− if (!sr_dev_attr || !sr_dev_attr->sensor_voltdm_name) {
113− pr_err("%s: No voltage domain specified for %s. Cannot initialize\n",
114− __func__, oh->name);
115− goto exit;
116− }
117−
118− sr_data->name = oh->name;
110+ sr_data->name = name;
119111 if (cpu_is_omap343x())
120112 sr_data->ip_type = 1;
121113 else
@@ -136,10 +128,10 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user) · 14 unmodified lines
136128 }
137129 }
138130
139− sr_data->voltdm = voltdm_lookup(sr_dev_attr->sensor_voltdm_name);
131+ sr_data->voltdm = voltdm_lookup(voltdm);
140132 if (!sr_data->voltdm) {
141133 pr_err("%s: Unable to get voltage domain pointer for VDD %s\n",
142− __func__, sr_dev_attr->sensor_voltdm_name);
134+ __func__, voltdm);
143135 goto exit;
144136 }
145137
@@ -160,6 +152,20 @@ exit: · 14 unmodified lines
160152 return 0;
161153 }
162154
155+static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
156+{
157+ struct omap_smartreflex_dev_attr *sr_dev_attr;
158+
159+ sr_dev_attr = (struct omap_smartreflex_dev_attr *)oh->dev_attr;
160+ if (!sr_dev_attr || !sr_dev_attr->sensor_voltdm_name) {
161+ pr_err("%s: No voltage domain specified for %s. Cannot initialize\n",
162+ __func__, oh->name);
163+ return 0;
164+ }
165+
166+ return sr_init_by_name(oh->name, sr_dev_attr->sensor_voltdm_name);
167+}
168+
163169 /*
164170 * API to be called from board files to enable smartreflex
165171 * autocompensation at init.
@@ -169,7 +175,42 @@ void __init omap_enable_smartreflex_on_init(void) · 3 unmodified lines
169175 sr_enable_on_init = true;
170176 }
171177
178+static const char * const omap4_sr_instances[] = {
179+ "mpu",
180+ "iva",
181+ "core",
182+};
183+
184+static const char * const dra7_sr_instances[] = {
185+ "mpu",
186+ "core",
187+};
188+
172189 int __init omap_devinit_smartreflex(void)
173190 {
191+ const char * const *sr_inst = NULL;
192+ int i, nr_sr = 0;
193+
194+ if (soc_is_omap44xx()) {
195+ sr_inst = omap4_sr_instances;
196+ nr_sr = ARRAY_SIZE(omap4_sr_instances);
197+
198+ } else if (soc_is_dra7xx()) {
199+ sr_inst = dra7_sr_instances;
200+ nr_sr = ARRAY_SIZE(dra7_sr_instances);
201+ }
202+
203+ if (nr_sr) {
204+ const char *name, *voltdm;
205+
206+ for (i = 0; i < nr_sr; i++) {
207+ name = kasprintf(GFP_KERNEL, "smartreflex_%s", sr_inst[i]);
208+ voltdm = sr_inst[i];
209+ sr_init_by_name(name, voltdm);
210+ }
211+
212+ return 0;
213+ }
214+
174215 return omap_hwmod_for_each_by_class("smartreflex", sr_dev_init, NULL);
175216 }
arch/arm/mach-pxa/mainstone.c+6−2
@@ -502,16 +502,20 @@ static inline void mainstone_init_keypad(void) {} · 501 unmodified lines
502502 #endif
503503
504504 static int mst_pcmcia0_irqs[11] = {
505− [0 ... 10] = -1,
505+ [0 ... 4] = -1,
506506 [5] = MAINSTONE_S0_CD_IRQ,
507+ [6 ... 7] = -1,
507508 [8] = MAINSTONE_S0_STSCHG_IRQ,
509+ [9] = -1,
508510 [10] = MAINSTONE_S0_IRQ,
509511 };
510512
511513 static int mst_pcmcia1_irqs[11] = {
512− [0 ... 10] = -1,
514+ [0 ... 4] = -1,
513515 [5] = MAINSTONE_S1_CD_IRQ,
516+ [6 ... 7] = -1,
514517 [8] = MAINSTONE_S1_STSCHG_IRQ,
518+ [9] = -1,
515519 [10] = MAINSTONE_S1_IRQ,
516520 };
517521
arch/arm/mm/mmu.c+1−2
@@ -387,8 +387,7 @@ void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot) · 386 unmodified lines
387387 pte_t *pte = pte_offset_fixmap(pmd_off_k(vaddr), vaddr);
388388
389389 /* Make sure fixmap region does not exceed available allocation. */
390− BUILD_BUG_ON(FIXADDR_START + (__end_of_fixed_addresses * PAGE_SIZE) >
391− FIXADDR_END);
390+ BUILD_BUG_ON(__fix_to_virt(__end_of_fixed_addresses) < FIXADDR_START);
392391 BUG_ON(idx >= __end_of_fixed_addresses);
393392
394393 /* we only support device mappings until pgprot_kernel has been set */
arch/arm/mm/pmsa-v7.c+3−1
@@ -235,6 +235,7 @@ void __init pmsav7_adjust_lowmem_bounds(void) · 234 unmodified lines
235235 phys_addr_t mem_end;
236236 phys_addr_t reg_start, reg_end;
237237 unsigned int mem_max_regions;
238+ bool first = true;
238239 int num;
239240 u64 i;
240241
@@ -263,7 +264,7 @@ void __init pmsav7_adjust_lowmem_bounds(void) · 22 unmodified lines
263264 #endif
264265
265266 for_each_mem_range(i, &reg_start, &reg_end) {
266− if (i == 0) {
267+ if (first) {
267268 phys_addr_t phys_offset = PHYS_OFFSET;
268269
269270 /*
@@ -275,6 +276,7 @@ void __init pmsav7_adjust_lowmem_bounds(void) · 5 unmodified lines
275276 mem_start = reg_start;
276277 mem_end = reg_end;
277278 specified_mem_size = mem_end - mem_start;
279+ first = false;
278280 } else {
279281 /*
280282 * memblock auto merges contiguous blocks, remove
arch/arm/mm/pmsa-v8.c+3−1
@@ -95,10 +95,11 @@ void __init pmsav8_adjust_lowmem_bounds(void) · 94 unmodified lines
9595 {
9696 phys_addr_t mem_end;
9797 phys_addr_t reg_start, reg_end;
98+ bool first = true;
9899 u64 i;
99100
100101 for_each_mem_range(i, &reg_start, &reg_end) {
101− if (i == 0) {
102+ if (first) {
102103 phys_addr_t phys_offset = PHYS_OFFSET;
103104
104105 /*
@@ -107,6 +108,7 @@ void __init pmsav8_adjust_lowmem_bounds(void) · 2 unmodified lines
107108 if (reg_start != phys_offset)
108109 panic("First memory bank must be contiguous from PHYS_OFFSET");
109110 mem_end = reg_end;
111+ first = false;
110112 } else {
111113 /*
112114 * memblock auto merges contiguous blocks, remove
arch/arm/probes/uprobes/core.c+2−2
@@ -204,7 +204,7 @@ unsigned long uprobe_get_swbp_addr(struct pt_regs *regs) · 203 unmodified lines
204204 static struct undef_hook uprobes_arm_break_hook = {
205205 .instr_mask = 0x0fffffff,
206206 .instr_val = (UPROBE_SWBP_ARM_INSN & 0x0fffffff),
207− .cpsr_mask = MODE_MASK,
207+ .cpsr_mask = (PSR_T_BIT | MODE_MASK),
208208 .cpsr_val = USR_MODE,
209209 .fn = uprobe_trap_handler,
210210 };
@@ -212,7 +212,7 @@ static struct undef_hook uprobes_arm_break_hook = { · 1 unmodified line
212212 static struct undef_hook uprobes_arm_ss_hook = {
213213 .instr_mask = 0x0fffffff,
214214 .instr_val = (UPROBE_SS_ARM_INSN & 0x0fffffff),
215− .cpsr_mask = MODE_MASK,
215+ .cpsr_mask = (PSR_T_BIT | MODE_MASK),
216216 .cpsr_val = USR_MODE,
217217 .fn = uprobe_trap_handler,
218218 };
arch/arm/xen/p2m.c+2−3
@@ -11,6 +11,7 @@ · 10 unmodified lines
1111
1212 #include <xen/xen.h>
1313 #include <xen/interface/memory.h>
14+#include <xen/grant_table.h>
1415 #include <xen/page.h>
1516 #include <xen/swiotlb-xen.h>
1617
@@ -109,7 +110,7 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops, · 92 unmodified lines
109110 map_ops[i].status = GNTST_general_error;
110111 unmap.host_addr = map_ops[i].host_addr,
111112 unmap.handle = map_ops[i].handle;
112− map_ops[i].handle = ~0;
113+ map_ops[i].handle = INVALID_GRANT_HANDLE;
113114 if (map_ops[i].flags & GNTMAP_device_map)
114115 unmap.dev_bus_addr = map_ops[i].dev_bus_addr;
115116 else
@@ -130,7 +131,6 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops, · 14 unmodified lines
130131
131132 return 0;
132133 }
133−EXPORT_SYMBOL_GPL(set_foreign_p2m_mapping);
134134
135135 int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops,
136136 struct gnttab_unmap_grant_ref *kunmap_ops,
@@ -145,7 +145,6 @@ int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, · 8 unmodified lines
145145
146146 return 0;
147147 }
148−EXPORT_SYMBOL_GPL(clear_foreign_p2m_mapping);
149148
150149 bool __set_phys_to_machine_multi(unsigned long pfn,
151150 unsigned long mfn, unsigned long nr_pages)
arch/arm64/Kconfig+17−11
@@ -810,6 +810,16 @@ config QCOM_FALKOR_ERRATUM_E1041 · 809 unmodified lines
810810
811811 If unsure, say Y.
812812
813+config NVIDIA_CARMEL_CNP_ERRATUM
814+ bool "NVIDIA Carmel CNP: CNP on Carmel semantically different than ARM cores"
815+ default y
816+ help
817+ If CNP is enabled on Carmel cores, non-sharable TLBIs on a core will not
818+ invalidate shared TLB entries installed by a different core, as it would
819+ on standard ARM cores.
820+
821+ If unsure, say Y.
822+
813823 config SOCIONEXT_SYNQUACER_PREITS
814824 bool "Socionext Synquacer: Workaround for GICv3 pre-ITS"
815825 default y
@@ -1055,8 +1065,6 @@ config HW_PERF_EVENTS · 239 unmodified lines
10551065 config SYS_SUPPORTS_HUGETLBFS
10561066 def_bool y
10571067
1058−config ARCH_WANT_HUGE_PMD_SHARE
1059−
10601068 config ARCH_HAS_CACHE_LINE_SIZE
10611069 def_bool y
10621070
@@ -1157,8 +1165,8 @@ config XEN · 94 unmodified lines
11571165
11581166 config FORCE_MAX_ZONEORDER
11591167 int
1160− default "14" if (ARM64_64K_PAGES && TRANSPARENT_HUGEPAGE)
1161− default "12" if (ARM64_16K_PAGES && TRANSPARENT_HUGEPAGE)
1168+ default "14" if ARM64_64K_PAGES
1169+ default "12" if ARM64_16K_PAGES
11621170 default "11"
11631171 help
11641172 The kernel memory allocator divides physically contiguous memory
@@ -1398,10 +1406,13 @@ config ARM64_PAN · 233 unmodified lines
13981406 config AS_HAS_LDAPR
13991407 def_bool $(as-instr,.arch_extension rcpc)
14001408
1409+config AS_HAS_LSE_ATOMICS
1410+ def_bool $(as-instr,.arch_extension lse)
1411+
14011412 config ARM64_LSE_ATOMICS
14021413 bool
14031414 default ARM64_USE_LSE_ATOMICS
1404− depends on $(as-instr,.arch_extension lse)
1415+ depends on AS_HAS_LSE_ATOMICS
14051416
14061417 config ARM64_USE_LSE_ATOMICS
14071418 bool "Atomic instructions"
@@ -1658,6 +1669,7 @@ config ARM64_MTE · 250 unmodified lines
16581669 default y
16591670 depends on ARM64_AS_HAS_MTE && ARM64_TAGGED_ADDR_ABI
16601671 depends on AS_HAS_ARMV8_5
1672+ depends on AS_HAS_LSE_ATOMICS
16611673 # Required for tag checking in the uaccess routines
16621674 depends on ARM64_PAN
16631675 select ARCH_USES_HIGH_VMA_FLAGS
@@ -1855,12 +1867,6 @@ config CMDLINE_FROM_BOOTLOADER · 191 unmodified lines
18551867 the boot loader doesn't provide any, the default kernel command
18561868 string provided in CMDLINE will be used.
18571869
1858−config CMDLINE_EXTEND
1859− bool "Extend bootloader kernel arguments"
1860− help
1861− The command-line arguments provided by the boot loader will be
1862− appended to the default kernel command string.
1863−
18641870 config CMDLINE_FORCE
18651871 bool "Always use the default kernel command string"
18661872 help
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts+4−0
@@ -19,3 +19,7 @@ · 18 unmodified lines
1919 };
2020 };
2121 };
22+
23+&mmc0 {
24+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 push-push switch */
25+};
arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi+1−1
@@ -34,7 +34,7 @@ · 33 unmodified lines
3434 vmmc-supply = <&reg_dcdc1>;
3535 disable-wp;
3636 bus-width = <4>;
37− cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
37+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 push-pull switch */
3838 status = "okay";
3939 };
4040
arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts+0−4
@@ -289,10 +289,6 @@ · 288 unmodified lines
289289 vcc-pm-supply = <&reg_aldo1>;
290290 };
291291
292−&rtc {
293− clocks = <&ext_osc32k>;
294−};
295−
296292 &spdif {
297293 status = "okay";
298294 };
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi+2−2
@@ -995,9 +995,9 @@ · 994 unmodified lines
995995 compatible = "allwinner,sun8i-a23-rsb";
996996 reg = <0x07083000 0x400>;
997997 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
998− clocks = <&r_ccu 13>;
998+ clocks = <&r_ccu CLK_R_APB2_RSB>;
999999 clock-frequency = <3000000>;
1000− resets = <&r_ccu 7>;
1000+ resets = <&r_ccu RST_R_APB2_RSB>;
10011001 pinctrl-names = "default";
10021002 pinctrl-0 = <&r_rsb_pins>;
10031003 status = "disabled";
arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi+1−0
@@ -198,6 +198,7 @@ · 197 unmodified lines
198198 ranges = <0x0 0x00 0x1700000 0x100000>;
199199 reg = <0x00 0x1700000 0x0 0x100000>;
200200 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
201+ dma-coherent;
201202
202203 sec_jr0: jr@10000 {
203204 compatible = "fsl,sec-v5.4-job-ring",
arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi+1−0
@@ -348,6 +348,7 @@ · 347 unmodified lines
348348 ranges = <0x0 0x00 0x1700000 0x100000>;
349349 reg = <0x00 0x1700000 0x0 0x100000>;
350350 interrupts = <0 75 0x4>;
351+ dma-coherent;
351352
352353 sec_jr0: jr@10000 {
353354 compatible = "fsl,sec-v5.4-job-ring",
arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi+1−0
@@ -354,6 +354,7 @@ · 353 unmodified lines
354354 ranges = <0x0 0x00 0x1700000 0x100000>;
355355 reg = <0x00 0x1700000 0x0 0x100000>;
356356 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
357+ dma-coherent;
357358
358359 sec_jr0: jr@10000 {
359360 compatible = "fsl,sec-v5.4-job-ring",
arch/arm64/boot/dts/freescale/imx8mm-pinfunc.h+1−1
@@ -124,7 +124,7 @@ · 123 unmodified lines
124124 #define MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0x0A4 0x30C 0x000 0x0 0x0
125125 #define MX8MM_IOMUXC_SD1_CMD_GPIO2_IO1 0x0A4 0x30C 0x000 0x5 0x0
126126 #define MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x0A8 0x310 0x000 0x0 0x0
127−#define MX8MM_IOMUXC_SD1_DATA0_GPIO2_IO2 0x0A8 0x31 0x000 0x5 0x0
127+#define MX8MM_IOMUXC_SD1_DATA0_GPIO2_IO2 0x0A8 0x310 0x000 0x5 0x0
128128 #define MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x0AC 0x314 0x000 0x0 0x0
129129 #define MX8MM_IOMUXC_SD1_DATA1_GPIO2_IO3 0x0AC 0x314 0x000 0x5 0x0
130130 #define MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x0B0 0x318 0x000 0x0 0x0
arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts+1−1
@@ -35,7 +35,7 @@ · 34 unmodified lines
3535
3636 &i2c2 {
3737 clock-frequency = <400000>;
38− pinctrl-names = "default";
38+ pinctrl-names = "default", "gpio";
3939 pinctrl-0 = <&pinctrl_i2c2>;
4040 pinctrl-1 = <&pinctrl_i2c2_gpio>;
4141 sda-gpios = <&gpio5 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
arch/arm64/boot/dts/freescale/imx8mp-phycore-som.dtsi+1−1
@@ -67,7 +67,7 @@ · 66 unmodified lines
6767
6868 &i2c1 {
6969 clock-frequency = <400000>;
70− pinctrl-names = "default";
70+ pinctrl-names = "default", "gpio";
7171 pinctrl-0 = <&pinctrl_i2c1>;
7272 pinctrl-1 = <&pinctrl_i2c1_gpio>;
7373 sda-gpios = <&gpio5 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
arch/arm64/boot/dts/freescale/imx8mq-pinfunc.h+1−1
@@ -130,7 +130,7 @@ · 129 unmodified lines
130130 #define MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD 0x0A4 0x30C 0x000 0x0 0x0
131131 #define MX8MQ_IOMUXC_SD1_CMD_GPIO2_IO1 0x0A4 0x30C 0x000 0x5 0x0
132132 #define MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x0A8 0x310 0x000 0x0 0x0
133−#define MX8MQ_IOMUXC_SD1_DATA0_GPIO2_IO2 0x0A8 0x31 0x000 0x5 0x0
133+#define MX8MQ_IOMUXC_SD1_DATA0_GPIO2_IO2 0x0A8 0x310 0x000 0x5 0x0
134134 #define MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x0AC 0x314 0x000 0x0 0x0
135135 #define MX8MQ_IOMUXC_SD1_DATA1_GPIO2_IO3 0x0AC 0x314 0x000 0x5 0x0
136136 #define MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x0B0 0x318 0x000 0x0 0x0
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts+1−1
@@ -1,7 +1,7 @@
11 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
22 /*
33 * Device Tree file for CZ.NIC Turris Mox Board
4− * 2019 by Marek Behun <marek.behun@nic.cz>
4+ * 2019 by Marek Behún <kabel@kernel.org>
55 */
66
77 /dts-v1/;
arch/arm64/boot/dts/marvell/armada-cp11x.dtsi+3−3
@@ -310,9 +310,11 @@ · 309 unmodified lines
310310 };
311311
312312 CP11X_LABEL(sata0): sata@540000 {
313− compatible = "marvell,armada-8k-ahci";
313+ compatible = "marvell,armada-8k-ahci",
314+ "generic-ahci";
314315 reg = <0x540000 0x30000>;
315316 dma-coherent;
317+ interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
316318 clocks = <&CP11X_LABEL(clk) 1 15>,
317319 <&CP11X_LABEL(clk) 1 16>;
318320 #address-cells = <1>;
@@ -320,12 +322,10 @@ · 1 unmodified line
320322 status = "disabled";
321323
322324 sata-port@0 {
323− interrupts = <109 IRQ_TYPE_LEVEL_HIGH>;
324325 reg = <0>;
325326 };
326327
327328 sata-port@1 {
328− interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
329329 reg = <1>;
330330 };
331331 };
arch/arm64/include/asm/alternative-macros.h+4−4
@@ -97,9 +97,9 @@ · 96 unmodified lines
9797 .popsection
9898 .subsection 1
9999 663: \insn2
100−664: .previous
101− .org . - (664b-663b) + (662b-661b)
100+664: .org . - (664b-663b) + (662b-661b)
102101 .org . - (662b-661b) + (664b-663b)
102+ .previous
103103 .endif
104104 .endm
105105
@@ -169,11 +169,11 @@ · 63 unmodified lines
169169 */
170170 .macro alternative_endif
171171 664:
172+ .org . - (664b-663b) + (662b-661b)
173+ .org . - (662b-661b) + (664b-663b)
172174 .if .Lasm_alt_mode==0
173175 .previous
174176 .endif
175− .org . - (664b-663b) + (662b-661b)
176− .org . - (662b-661b) + (664b-663b)
177177 .endm
178178
179179 /*
arch/arm64/include/asm/checksum.h+1−1
@@ -37,7 +37,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) · 36 unmodified lines
3737 } while (--n > 0);
3838
3939 sum += ((sum >> 32) | (sum << 32));
40− return csum_fold((__force u32)(sum >> 32));
40+ return csum_fold((__force __wsum)(sum >> 32));
4141 }
4242 #define ip_fast_csum ip_fast_csum
4343
arch/arm64/include/asm/cpucaps.h+2−1
@@ -66,7 +66,8 @@ · 65 unmodified lines
6666 #define ARM64_WORKAROUND_1508412 58
6767 #define ARM64_HAS_LDAPR 59
6868 #define ARM64_KVM_PROTECTED_MODE 60
69+#define ARM64_WORKAROUND_NVIDIA_CARMEL_CNP 61
6970
70−#define ARM64_NCAPS 61
71+#define ARM64_NCAPS 62
7172
7273 #endif /* __ASM_CPUCAPS_H */
arch/arm64/include/asm/kvm_arm.h+1−0
@@ -278,6 +278,7 @@ · 277 unmodified lines
278278 #define CPTR_EL2_DEFAULT CPTR_EL2_RES1
279279
280280 /* Hyp Debug Configuration Register bits */
281+#define MDCR_EL2_TTRF (1 << 19)
281282 #define MDCR_EL2_TPMS (1 << 14)
282283 #define MDCR_EL2_E2PB_MASK (UL(0x3))
283284 #define MDCR_EL2_E2PB_SHIFT (UL(12))
arch/arm64/include/asm/kvm_asm.h+4−4
@@ -47,10 +47,10 @@ · 46 unmodified lines
4747 #define __KVM_HOST_SMCCC_FUNC___kvm_flush_vm_context 2
4848 #define __KVM_HOST_SMCCC_FUNC___kvm_tlb_flush_vmid_ipa 3
4949 #define __KVM_HOST_SMCCC_FUNC___kvm_tlb_flush_vmid 4
50−#define __KVM_HOST_SMCCC_FUNC___kvm_tlb_flush_local_vmid 5
50+#define __KVM_HOST_SMCCC_FUNC___kvm_flush_cpu_context 5
5151 #define __KVM_HOST_SMCCC_FUNC___kvm_timer_set_cntvoff 6
5252 #define __KVM_HOST_SMCCC_FUNC___kvm_enable_ssbs 7
53−#define __KVM_HOST_SMCCC_FUNC___vgic_v3_get_ich_vtr_el2 8
53+#define __KVM_HOST_SMCCC_FUNC___vgic_v3_get_gic_config 8
5454 #define __KVM_HOST_SMCCC_FUNC___vgic_v3_read_vmcr 9
5555 #define __KVM_HOST_SMCCC_FUNC___vgic_v3_write_vmcr 10
5656 #define __KVM_HOST_SMCCC_FUNC___vgic_v3_init_lrs 11
@@ -183,16 +183,16 @@ DECLARE_KVM_HYP_SYM(__bp_harden_hyp_vecs); · 126 unmodified lines
183183 #define __bp_harden_hyp_vecs CHOOSE_HYP_SYM(__bp_harden_hyp_vecs)
184184
185185 extern void __kvm_flush_vm_context(void);
186+extern void __kvm_flush_cpu_context(struct kvm_s2_mmu *mmu);
186187 extern void __kvm_tlb_flush_vmid_ipa(struct kvm_s2_mmu *mmu, phys_addr_t ipa,
187188 int level);
188189 extern void __kvm_tlb_flush_vmid(struct kvm_s2_mmu *mmu);
189−extern void __kvm_tlb_flush_local_vmid(struct kvm_s2_mmu *mmu);
190190
191191 extern void __kvm_timer_set_cntvoff(u64 cntvoff);
192192
193193 extern int __kvm_vcpu_run(struct kvm_vcpu *vcpu);
194194
195−extern u64 __vgic_v3_get_ich_vtr_el2(void);
195+extern u64 __vgic_v3_get_gic_config(void);
196196 extern u64 __vgic_v3_read_vmcr(void);
197197 extern void __vgic_v3_write_vmcr(u32 vmcr);
198198 extern void __vgic_v3_init_lrs(void);
arch/arm64/include/asm/kvm_hyp.h+7−1
@@ -83,6 +83,11 @@ void sysreg_restore_guest_state_vhe(struct kvm_cpu_context *ctxt); · 82 unmodified lines
8383 void __debug_switch_to_guest(struct kvm_vcpu *vcpu);
8484 void __debug_switch_to_host(struct kvm_vcpu *vcpu);
8585
86+#ifdef __KVM_NVHE_HYPERVISOR__
87+void __debug_save_host_buffers_nvhe(struct kvm_vcpu *vcpu);
88+void __debug_restore_host_buffers_nvhe(struct kvm_vcpu *vcpu);
89+#endif
90+
8691 void __fpsimd_save_state(struct user_fpsimd_state *fp_regs);
8792 void __fpsimd_restore_state(struct user_fpsimd_state *fp_regs);
8893
@@ -97,7 +102,8 @@ bool kvm_host_psci_handler(struct kvm_cpu_context *host_ctxt); · 8 unmodified lines
97102
98103 void __noreturn hyp_panic(void);
99104 #ifdef __KVM_NVHE_HYPERVISOR__
100−void __noreturn __hyp_do_panic(bool restore_host, u64 spsr, u64 elr, u64 par);
105+void __noreturn __hyp_do_panic(struct kvm_cpu_context *host_ctxt, u64 spsr,
106+ u64 elr, u64 par);
101107 #endif
102108
103109 #endif /* __ARM64_KVM_HYP_H__ */
arch/arm64/include/asm/memory.h+5−0
@@ -328,6 +328,11 @@ static inline void *phys_to_virt(phys_addr_t x) · 327 unmodified lines
328328 #define ARCH_PFN_OFFSET ((unsigned long)PHYS_PFN_OFFSET)
329329
330330 #if !defined(CONFIG_SPARSEMEM_VMEMMAP) || defined(CONFIG_DEBUG_VIRTUAL)
331+#define page_to_virt(x) ({ \
332+ __typeof__(x) __page = x; \
333+ void *__addr = __va(page_to_phys(__page)); \
334+ (void *)__tag_set((const void *)__addr, page_kasan_tag(__page));\
335+})
331336 #define virt_to_page(x) pfn_to_page(virt_to_pfn(x))
332337 #else
333338 #define page_to_virt(x) ({ \
arch/arm64/include/asm/mmu_context.h+0−17
@@ -63,23 +63,6 @@ static inline void cpu_switch_mm(pgd_t *pgd, struct mm_struct *mm) · 62 unmodified lines
6363 extern u64 idmap_t0sz;
6464 extern u64 idmap_ptrs_per_pgd;
6565
66−static inline bool __cpu_uses_extended_idmap(void)
67−{
68− if (IS_ENABLED(CONFIG_ARM64_VA_BITS_52))
69− return false;
70−
71− return unlikely(idmap_t0sz != TCR_T0SZ(VA_BITS));
72−}
73−
74−/*
75− * True if the extended ID map requires an extra level of translation table
76− * to be configured.
77− */
78−static inline bool __cpu_uses_extended_idmap_level(void)
79−{
80− return ARM64_HW_PGTABLE_LEVELS(64 - idmap_t0sz) > CONFIG_PGTABLE_LEVELS;
81−}
82−
8366 /*
8467 * Ensure TCR.T0SZ is set to the provided value.
8568 */
arch/arm64/include/asm/pgtable-prot.h+0−1
@@ -66,7 +66,6 @@ extern bool arm64_use_ng_mappings; · 65 unmodified lines
6666 #define _PAGE_DEFAULT (_PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL))
6767
6868 #define PAGE_KERNEL __pgprot(PROT_NORMAL)
69−#define PAGE_KERNEL_TAGGED __pgprot(PROT_NORMAL_TAGGED)
7069 #define PAGE_KERNEL_RO __pgprot((PROT_NORMAL & ~PTE_WRITE) | PTE_RDONLY)
7170 #define PAGE_KERNEL_ROX __pgprot((PROT_NORMAL & ~(PTE_WRITE | PTE_PXN)) | PTE_RDONLY)
7271 #define PAGE_KERNEL_EXEC __pgprot(PROT_NORMAL & ~PTE_PXN)
arch/arm64/include/asm/pgtable.h+3−0
@@ -486,6 +486,9 @@ static inline pmd_t pmd_mkdevmap(pmd_t pmd) · 485 unmodified lines
486486 __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
487487 #define pgprot_device(prot) \
488488 __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_PXN | PTE_UXN)
489+#define pgprot_tagged(prot) \
490+ __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_TAGGED))
491+#define pgprot_mhp pgprot_tagged
489492 /*
490493 * DMA allocations for non-coherent devices use what the Arm architecture calls
491494 * "Normal non-cacheable" memory, which permits speculation, unaligned accesses
arch/arm64/include/asm/processor.h+2−0
@@ -251,6 +251,8 @@ unsigned long get_wchan(struct task_struct *p); · 250 unmodified lines
251251 extern struct task_struct *cpu_switch_to(struct task_struct *prev,
252252 struct task_struct *next);
253253
254+asmlinkage void arm64_preempt_schedule_irq(void);
255+
254256 #define task_pt_regs(p) \
255257 ((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1)
256258
arch/arm64/include/asm/sysreg.h+14−6
@@ -796,6 +796,11 @@ · 795 unmodified lines
796796 #define ID_AA64MMFR0_PARANGE_48 0x5
797797 #define ID_AA64MMFR0_PARANGE_52 0x6
798798
799+#define ID_AA64MMFR0_TGRAN_2_SUPPORTED_DEFAULT 0x0
800+#define ID_AA64MMFR0_TGRAN_2_SUPPORTED_NONE 0x1
801+#define ID_AA64MMFR0_TGRAN_2_SUPPORTED_MIN 0x2
802+#define ID_AA64MMFR0_TGRAN_2_SUPPORTED_MAX 0x7
803+
799804 #ifdef CONFIG_ARM64_PA_BITS_52
800805 #define ID_AA64MMFR0_PARANGE_MAX ID_AA64MMFR0_PARANGE_52
801806 #else
@@ -961,14 +966,17 @@ · 159 unmodified lines
961966 #define ID_PFR1_PROGMOD_SHIFT 0
962967
963968 #if defined(CONFIG_ARM64_4K_PAGES)
964−#define ID_AA64MMFR0_TGRAN_SHIFT ID_AA64MMFR0_TGRAN4_SHIFT
965−#define ID_AA64MMFR0_TGRAN_SUPPORTED ID_AA64MMFR0_TGRAN4_SUPPORTED
969+#define ID_AA64MMFR0_TGRAN_SHIFT ID_AA64MMFR0_TGRAN4_SHIFT
970+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MIN ID_AA64MMFR0_TGRAN4_SUPPORTED
971+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MAX 0x7
966972 #elif defined(CONFIG_ARM64_16K_PAGES)
967−#define ID_AA64MMFR0_TGRAN_SHIFT ID_AA64MMFR0_TGRAN16_SHIFT
968−#define ID_AA64MMFR0_TGRAN_SUPPORTED ID_AA64MMFR0_TGRAN16_SUPPORTED
973+#define ID_AA64MMFR0_TGRAN_SHIFT ID_AA64MMFR0_TGRAN16_SHIFT
974+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MIN ID_AA64MMFR0_TGRAN16_SUPPORTED
975+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MAX 0xF
969976 #elif defined(CONFIG_ARM64_64K_PAGES)
970−#define ID_AA64MMFR0_TGRAN_SHIFT ID_AA64MMFR0_TGRAN64_SHIFT
971−#define ID_AA64MMFR0_TGRAN_SUPPORTED ID_AA64MMFR0_TGRAN64_SUPPORTED
977+#define ID_AA64MMFR0_TGRAN_SHIFT ID_AA64MMFR0_TGRAN64_SHIFT
978+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MIN ID_AA64MMFR0_TGRAN64_SUPPORTED
979+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MAX 0x7
972980 #endif
973981
974982 #define MVFR2_FPMISC_SHIFT 4
arch/arm64/include/asm/thread_info.h+2−0
@@ -55,6 +55,8 @@ void arch_setup_new_exec(void); · 54 unmodified lines
5555 #define arch_setup_new_exec arch_setup_new_exec
5656
5757 void arch_release_task_struct(struct task_struct *tsk);
58+int arch_dup_task_struct(struct task_struct *dst,
59+ struct task_struct *src);
5860
5961 #endif
6062
arch/arm64/include/asm/word-at-a-time.h+5−5
@@ -53,7 +53,7 @@ static inline unsigned long find_zero(unsigned long mask) · 52 unmodified lines
5353 */
5454 static inline unsigned long load_unaligned_zeropad(const void *addr)
5555 {
56− unsigned long ret, offset;
56+ unsigned long ret, tmp;
5757
5858 /* Load word from unaligned pointer addr */
5959 asm(
@@ -61,9 +61,9 @@ static inline unsigned long load_unaligned_zeropad(const void *addr) · 1 unmodified line
6161 "2:\n"
6262 " .pushsection .fixup,\"ax\"\n"
6363 " .align 2\n"
64− "3: and %1, %2, #0x7\n"
65− " bic %2, %2, #0x7\n"
66− " ldr %0, [%2]\n"
64+ "3: bic %1, %2, #0x7\n"
65+ " ldr %0, [%1]\n"
66+ " and %1, %2, #0x7\n"
6767 " lsl %1, %1, #0x3\n"
6868 #ifndef __AARCH64EB__
6969 " lsr %0, %0, %1\n"
@@ -73,7 +73,7 @@ static inline unsigned long load_unaligned_zeropad(const void *addr) · 3 unmodified lines
7373 " b 2b\n"
7474 " .popsection\n"
7575 _ASM_EXTABLE(1b, 3b)
76− : "=&r" (ret), "=&r" (offset)
76+ : "=&r" (ret), "=&r" (tmp)
7777 : "r" (addr), "Q" (*(unsigned long *)addr));
7878
7979 return ret;
arch/arm64/kernel/cpu_errata.c+8−0
@@ -525,6 +525,14 @@ const struct arm64_cpu_capabilities arm64_errata[] = { · 524 unmodified lines
525525 0, 0,
526526 1, 0),
527527 },
528+#endif
529+#ifdef CONFIG_NVIDIA_CARMEL_CNP_ERRATUM
530+ {
531+ /* NVIDIA Carmel */
532+ .desc = "NVIDIA Carmel CNP erratum",
533+ .capability = ARM64_WORKAROUND_NVIDIA_CARMEL_CNP,
534+ ERRATA_MIDR_ALL_VERSIONS(MIDR_NVIDIA_CARMEL),
535+ },
528536 #endif
529537 {
530538 }
arch/arm64/kernel/cpufeature.c+4−2
@@ -383,7 +383,6 @@ static const struct arm64_ftr_bits ftr_id_aa64dfr0[] = { · 382 unmodified lines
383383 * of support.
384384 */
385385 S_ARM64_FTR_BITS(FTR_HIDDEN, FTR_NONSTRICT, FTR_EXACT, ID_AA64DFR0_PMUVER_SHIFT, 4, 0),
386− ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_EXACT, ID_AA64DFR0_TRACEVER_SHIFT, 4, 0),
387386 ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_EXACT, ID_AA64DFR0_DEBUGVER_SHIFT, 4, 0x6),
388387 ARM64_FTR_END,
389388 };
@@ -1321,7 +1320,10 @@ has_useable_cnp(const struct arm64_cpu_capabilities *entry, int scope) · 931 unmodified lines
13211320 * may share TLB entries with a CPU stuck in the crashed
13221321 * kernel.
13231322 */
1324− if (is_kdump_kernel())
1323+ if (is_kdump_kernel())
1324+ return false;
1325+
1326+ if (cpus_have_const_cap(ARM64_WORKAROUND_NVIDIA_CARMEL_CNP))
13251327 return false;
13261328
13271329 return has_cpuid_feature(entry, scope);
arch/arm64/kernel/cpuinfo.c+1−1
@@ -353,7 +353,7 @@ static void __cpuinfo_store_cpu(struct cpuinfo_arm64 *info) · 352 unmodified lines
353353 * with the CLIDR_EL1 fields to avoid triggering false warnings
354354 * when there is a mismatch across the CPUs. Keep track of the
355355 * effective value of the CTR_EL0 in our internal records for
356− * acurate sanity check and feature enablement.
356+ * accurate sanity check and feature enablement.
357357 */
358358 info->reg_ctr = read_cpuid_effective_cachetype();
359359 info->reg_dczid = read_cpuid(DCZID_EL0);
arch/arm64/kernel/crash_dump.c+2−0
@@ -64,5 +64,7 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf, · 63 unmodified lines
6464 ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos)
6565 {
6666 memcpy(buf, phys_to_virt((phys_addr_t)*ppos), count);
67+ *ppos += count;
68+
6769 return count;
6870 }
arch/arm64/kernel/entry.S+6−4
@@ -148,16 +148,18 @@ alternative_cb_end · 147 unmodified lines
148148 .endm
149149
150150 /* Check for MTE asynchronous tag check faults */
151− .macro check_mte_async_tcf, flgs, tmp
151+ .macro check_mte_async_tcf, tmp, ti_flags
152152 #ifdef CONFIG_ARM64_MTE
153+ .arch_extension lse
153154 alternative_if_not ARM64_MTE
154155 b 1f
155156 alternative_else_nop_endif
156157 mrs_s \tmp, SYS_TFSRE0_EL1
157158 tbz \tmp, #SYS_TFSR_EL1_TF0_SHIFT, 1f
158159 /* Asynchronous TCF occurred for TTBR0 access, set the TI flag */
159− orr \flgs, \flgs, #_TIF_MTE_ASYNC_FAULT
160− str \flgs, [tsk, #TSK_TI_FLAGS]
160+ mov \tmp, #_TIF_MTE_ASYNC_FAULT
161+ add \ti_flags, tsk, #TSK_TI_FLAGS
162+ stset \tmp, [\ti_flags]
161163 msr_s SYS_TFSRE0_EL1, xzr
162164 1:
163165 #endif
@@ -244,7 +246,7 @@ alternative_else_nop_endif · 80 unmodified lines
244246 disable_step_tsk x19, x20
245247
246248 /* Check for asynchronous tag check faults in user space */
247− check_mte_async_tcf x19, x22
249+ check_mte_async_tcf x22, x23
248250 apply_ssbd 1, x22, x23
249251
250252 ptrauth_keys_install_kernel tsk, x20, x22, x23
arch/arm64/kernel/head.S+5−3
@@ -319,7 +319,7 @@ SYM_FUNC_START_LOCAL(__create_page_tables) · 318 unmodified lines
319319 */
320320 adrp x5, __idmap_text_end
321321 clz x5, x5
322− cmp x5, TCR_T0SZ(VA_BITS) // default T0SZ small enough?
322+ cmp x5, TCR_T0SZ(VA_BITS_MIN) // default T0SZ small enough?
323323 b.ge 1f // .. then skip VA range extension
324324
325325 adr_l x6, idmap_t0sz
@@ -655,8 +655,10 @@ SYM_FUNC_END(__secondary_too_slow) · 329 unmodified lines
655655 SYM_FUNC_START(__enable_mmu)
656656 mrs x2, ID_AA64MMFR0_EL1
657657 ubfx x2, x2, #ID_AA64MMFR0_TGRAN_SHIFT, 4
658− cmp x2, #ID_AA64MMFR0_TGRAN_SUPPORTED
659− b.ne __no_granule_support
658+ cmp x2, #ID_AA64MMFR0_TGRAN_SUPPORTED_MIN
659+ b.lt __no_granule_support
660+ cmp x2, #ID_AA64MMFR0_TGRAN_SUPPORTED_MAX
661+ b.gt __no_granule_support
660662 update_early_cpu_boot_status 0, x2, x3
661663 adrp x2, idmap_pg_dir
662664 phys_to_ttbr x1, x1
arch/arm64/kernel/idreg-override.c+23−20
@@ -163,33 +163,36 @@ static __init void __parse_cmdline(const char *cmdline, bool parse_aliases) · 162 unmodified lines
163163 } while (1);
164164 }
165165
166−static __init void parse_cmdline(void)
166+static __init const u8 *get_bootargs_cmdline(void)
167167 {
168− if (!IS_ENABLED(CONFIG_CMDLINE_FORCE)) {
169− const u8 *prop;
170− void *fdt;
171− int node;
168+ const u8 *prop;
169+ void *fdt;
170+ int node;
172171
173− fdt = get_early_fdt_ptr();
174− if (!fdt)
175− goto out;
172+ fdt = get_early_fdt_ptr();
173+ if (!fdt)
174+ return NULL;
176175
177− node = fdt_path_offset(fdt, "/chosen");
178− if (node < 0)
179− goto out;
176+ node = fdt_path_offset(fdt, "/chosen");
177+ if (node < 0)
178+ return NULL;
180179
181− prop = fdt_getprop(fdt, node, "bootargs", NULL);
182− if (!prop)
183− goto out;
180+ prop = fdt_getprop(fdt, node, "bootargs", NULL);
181+ if (!prop)
182+ return NULL;
184183
185− __parse_cmdline(prop, true);
184+ return strlen(prop) ? prop : NULL;
185+}
186186
187− if (!IS_ENABLED(CONFIG_CMDLINE_EXTEND))
188− return;
189− }
187+static __init void parse_cmdline(void)
188+{
189+ const u8 *prop = get_bootargs_cmdline();
190190
191−out:
192− __parse_cmdline(CONFIG_CMDLINE, true);
191+ if (IS_ENABLED(CONFIG_CMDLINE_FORCE) || !prop)
192+ __parse_cmdline(CONFIG_CMDLINE, true);
193+
194+ if (!IS_ENABLED(CONFIG_CMDLINE_FORCE) && prop)
195+ __parse_cmdline(prop, true);
193196 }
194197
195198 /* Keep checkers quiet */
arch/arm64/kernel/image-vars.h+3−0
@@ -101,6 +101,9 @@ KVM_NVHE_ALIAS(__stop___kvm_ex_table); · 100 unmodified lines
101101 /* Array containing bases of nVHE per-CPU memory regions. */
102102 KVM_NVHE_ALIAS(kvm_arm_hyp_percpu_base);
103103
104+/* PMU available static key */
105+KVM_NVHE_ALIAS(kvm_arm_pmu_available);
106+
104107 #endif /* CONFIG_KVM */
105108
106109 #endif /* __ARM64_KERNEL_IMAGE_VARS_H */
arch/arm64/kernel/perf_event.c+1−1
@@ -460,7 +460,7 @@ static inline int armv8pmu_counter_has_overflowed(u32 pmnc, int idx) · 459 unmodified lines
460460 return pmnc & BIT(ARMV8_IDX_TO_COUNTER(idx));
461461 }
462462
463−static inline u32 armv8pmu_read_evcntr(int idx)
463+static inline u64 armv8pmu_read_evcntr(int idx)
464464 {
465465 u32 counter = ARMV8_IDX_TO_COUNTER(idx);
466466
arch/arm64/kernel/probes/kprobes.c+4−2
@@ -267,10 +267,12 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr) · 266 unmodified lines
267267 if (!instruction_pointer(regs))
268268 BUG();
269269
270− if (kcb->kprobe_status == KPROBE_REENTER)
270+ if (kcb->kprobe_status == KPROBE_REENTER) {
271271 restore_previous_kprobe(kcb);
272− else
272+ } else {
273+ kprobes_restore_local_irqflag(kcb, regs);
273274 reset_current_kprobe();
275+ }
274276
275277 break;
276278 case KPROBE_HIT_ACTIVE:
arch/arm64/kernel/process.c+2−0
@@ -57,6 +57,8 @@ · 56 unmodified lines
5757 #include <asm/processor.h>
5858 #include <asm/pointer_auth.h>
5959 #include <asm/stacktrace.h>
60+#include <asm/switch_to.h>
61+#include <asm/system_misc.h>
6062
6163 #if defined(CONFIG_STACKPROTECTOR) && !defined(CONFIG_STACKPROTECTOR_PER_TASK)
6264 #include <linux/stackprotector.h>
arch/arm64/kernel/sleep.S+1−1
@@ -134,7 +134,7 @@ SYM_FUNC_START(_cpu_resume) · 133 unmodified lines
134134 */
135135 bl cpu_do_resume
136136
137−#if defined(CONFIG_KASAN) && CONFIG_KASAN_STACK
137+#if defined(CONFIG_KASAN) && defined(CONFIG_KASAN_STACK)
138138 mov x0, sp
139139 bl kasan_unpoison_task_stack_below
140140 #endif
arch/arm64/kernel/stacktrace.c+5−4
@@ -194,8 +194,9 @@ void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl) · 193 unmodified lines
194194
195195 #ifdef CONFIG_STACKTRACE
196196
197−void arch_stack_walk(stack_trace_consume_fn consume_entry, void *cookie,
198− struct task_struct *task, struct pt_regs *regs)
197+noinline void arch_stack_walk(stack_trace_consume_fn consume_entry,
198+ void *cookie, struct task_struct *task,
199+ struct pt_regs *regs)
199200 {
200201 struct stackframe frame;
201202
@@ -203,8 +204,8 @@ void arch_stack_walk(stack_trace_consume_fn consume_entry, void *cookie, · 1 unmodified line
203204 start_backtrace(&frame, regs->regs[29], regs->pc);
204205 else if (task == current)
205206 start_backtrace(&frame,
206− (unsigned long)__builtin_frame_address(0),
207− (unsigned long)arch_stack_walk);
207+ (unsigned long)__builtin_frame_address(1),
208+ (unsigned long)__builtin_return_address(0));
208209 else
209210 start_backtrace(&frame, thread_saved_fp(task),
210211 thread_saved_pc(task));
arch/arm64/kvm/arm.c+6−1
@@ -385,11 +385,16 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) · 384 unmodified lines
385385 last_ran = this_cpu_ptr(mmu->last_vcpu_ran);
386386
387387 /*
388+ * We guarantee that both TLBs and I-cache are private to each
389+ * vcpu. If detecting that a vcpu from the same VM has
390+ * previously run on the same physical CPU, call into the
391+ * hypervisor code to nuke the relevant contexts.
392+ *
388393 * We might get preempted before the vCPU actually runs, but
389394 * over-invalidation doesn't affect correctness.
390395 */
391396 if (*last_ran != vcpu->vcpu_id) {
392− kvm_call_hyp(__kvm_tlb_flush_local_vmid, mmu);
397+ kvm_call_hyp(__kvm_flush_cpu_context, mmu);
393398 *last_ran = vcpu->vcpu_id;
394399 }
395400
arch/arm64/kvm/debug.c+2−0
@@ -89,6 +89,7 @@ void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu) · 88 unmodified lines
8989 * - Debug ROM Address (MDCR_EL2_TDRA)
9090 * - OS related registers (MDCR_EL2_TDOSA)
9191 * - Statistical profiler (MDCR_EL2_TPMS/MDCR_EL2_E2PB)
92+ * - Self-hosted Trace Filter controls (MDCR_EL2_TTRF)
9293 *
9394 * Additionally, KVM only traps guest accesses to the debug registers if
9495 * the guest is not actively using them (see the KVM_ARM64_DEBUG_DIRTY
@@ -112,6 +113,7 @@ void kvm_arm_setup_debug(struct kvm_vcpu *vcpu) · 17 unmodified lines
112113 vcpu->arch.mdcr_el2 = __this_cpu_read(mdcr_el2) & MDCR_EL2_HPMN_MASK;
113114 vcpu->arch.mdcr_el2 |= (MDCR_EL2_TPM |
114115 MDCR_EL2_TPMS |
116+ MDCR_EL2_TTRF |
115117 MDCR_EL2_TPMCR |
116118 MDCR_EL2_TDRA |
117119 MDCR_EL2_TDOSA);
arch/arm64/kvm/hyp/entry.S+5−3
@@ -85,8 +85,10 @@ SYM_INNER_LABEL(__guest_exit_panic, SYM_L_GLOBAL) · 84 unmodified lines
8585
8686 // If the hyp context is loaded, go straight to hyp_panic
8787 get_loaded_vcpu x0, x1
88− cbz x0, hyp_panic
88+ cbnz x0, 1f
89+ b hyp_panic
8990
91+1:
9092 // The hyp context is saved so make sure it is restored to allow
9193 // hyp_panic to run at hyp and, subsequently, panic to run in the host.
9294 // This makes use of __guest_exit to avoid duplication but sets the
@@ -94,7 +96,7 @@ SYM_INNER_LABEL(__guest_exit_panic, SYM_L_GLOBAL) · 1 unmodified line
9496 // current state is saved to the guest context but it will only be
9597 // accurate if the guest had been completely restored.
9698 adr_this_cpu x0, kvm_hyp_ctxt, x1
97− adr x1, hyp_panic
99+ adr_l x1, hyp_panic
98100 str x1, [x0, #CPU_XREG_OFFSET(30)]
99101
100102 get_vcpu_ptr x1, x0
@@ -146,7 +148,7 @@ SYM_INNER_LABEL(__guest_exit, SYM_L_GLOBAL) · 45 unmodified lines
146148 // Now restore the hyp regs
147149 restore_callee_saved_regs x2
148150
149− set_loaded_vcpu xzr, x1, x2
151+ set_loaded_vcpu xzr, x2, x3
150152
151153 alternative_if ARM64_HAS_RAS_EXTN
152154 // If we have the RAS extensions we can consume a pending error
arch/arm64/kvm/hyp/include/hyp/switch.h+6−3
@@ -90,15 +90,18 @@ static inline void __activate_traps_common(struct kvm_vcpu *vcpu) · 89 unmodified lines
9090 * counter, which could make a PMXEVCNTR_EL0 access UNDEF at
9191 * EL1 instead of being trapped to EL2.
9292 */
93− write_sysreg(0, pmselr_el0);
94− write_sysreg(ARMV8_PMU_USERENR_MASK, pmuserenr_el0);
93+ if (kvm_arm_support_pmu_v3()) {
94+ write_sysreg(0, pmselr_el0);
95+ write_sysreg(ARMV8_PMU_USERENR_MASK, pmuserenr_el0);
96+ }
9597 write_sysreg(vcpu->arch.mdcr_el2, mdcr_el2);
9698 }
9799
98100 static inline void __deactivate_traps_common(void)
99101 {
100102 write_sysreg(0, hstr_el2);
101− write_sysreg(0, pmuserenr_el0);
103+ if (kvm_arm_support_pmu_v3())
104+ write_sysreg(0, pmuserenr_el0);
102105 }
103106
104107 static inline void ___activate_traps(struct kvm_vcpu *vcpu)
arch/arm64/kvm/hyp/nvhe/debug-sr.c+10−2
@@ -58,16 +58,24 @@ static void __debug_restore_spe(u64 pmscr_el1) · 57 unmodified lines
5858 write_sysreg_s(pmscr_el1, SYS_PMSCR_EL1);
5959 }
6060
61−void __debug_switch_to_guest(struct kvm_vcpu *vcpu)
61+void __debug_save_host_buffers_nvhe(struct kvm_vcpu *vcpu)
6262 {
6363 /* Disable and flush SPE data generation */
6464 __debug_save_spe(&vcpu->arch.host_debug_state.pmscr_el1);
65+}
66+
67+void __debug_switch_to_guest(struct kvm_vcpu *vcpu)
68+{
6569 __debug_switch_to_guest_common(vcpu);
6670 }
6771
68−void __debug_switch_to_host(struct kvm_vcpu *vcpu)
72+void __debug_restore_host_buffers_nvhe(struct kvm_vcpu *vcpu)
6973 {
7074 __debug_restore_spe(vcpu->arch.host_debug_state.pmscr_el1);
75+}
76+
77+void __debug_switch_to_host(struct kvm_vcpu *vcpu)
78+{
7179 __debug_switch_to_host_common(vcpu);
7280 }
7381
arch/arm64/kvm/hyp/nvhe/host.S+8−7
@@ -71,7 +71,8 @@ SYM_FUNC_START(__host_enter) · 70 unmodified lines
7171 SYM_FUNC_END(__host_enter)
7272
7373 /*
74− * void __noreturn __hyp_do_panic(bool restore_host, u64 spsr, u64 elr, u64 par);
74+ * void __noreturn __hyp_do_panic(struct kvm_cpu_context *host_ctxt, u64 spsr,
75+ * u64 elr, u64 par);
7576 */
7677 SYM_FUNC_START(__hyp_do_panic)
7778 /* Prepare and exit to the host's panic funciton. */
@@ -82,9 +83,11 @@ SYM_FUNC_START(__hyp_do_panic) · 4 unmodified lines
8283 hyp_kimg_va lr, x6
8384 msr elr_el2, lr
8485
85− /* Set the panic format string. Use the, now free, LR as scratch. */
86− ldr lr, =__hyp_panic_string
87− hyp_kimg_va lr, x6
86+ mov x29, x0
87+
88+ /* Load the format string into x0 and arguments into x1-7 */
89+ ldr x0, =__hyp_panic_string
90+ hyp_kimg_va x0, x6
8891
8992 /* Load the format arguments into x1-7. */
9093 mov x6, x3
@@ -94,9 +97,7 @@ SYM_FUNC_START(__hyp_do_panic) · 3 unmodified lines
9497 mrs x5, hpfar_el2
9598
9699 /* Enter the host, conditionally restoring the host context. */
97− cmp x0, xzr
98− mov x0, lr
99− b.eq __host_enter_without_restoring
100+ cbz x29, __host_enter_without_restoring
100101 b __host_enter_for_panic
101102 SYM_FUNC_END(__hyp_do_panic)
102103
arch/arm64/kvm/hyp/nvhe/hyp-main.c+6−6
@@ -46,11 +46,11 @@ static void handle___kvm_tlb_flush_vmid(struct kvm_cpu_context *host_ctxt) · 45 unmodified lines
4646 __kvm_tlb_flush_vmid(kern_hyp_va(mmu));
4747 }
4848
49−static void handle___kvm_tlb_flush_local_vmid(struct kvm_cpu_context *host_ctxt)
49+static void handle___kvm_flush_cpu_context(struct kvm_cpu_context *host_ctxt)
5050 {
5151 DECLARE_REG(struct kvm_s2_mmu *, mmu, host_ctxt, 1);
5252
53− __kvm_tlb_flush_local_vmid(kern_hyp_va(mmu));
53+ __kvm_flush_cpu_context(kern_hyp_va(mmu));
5454 }
5555
5656 static void handle___kvm_timer_set_cntvoff(struct kvm_cpu_context *host_ctxt)
@@ -67,9 +67,9 @@ static void handle___kvm_enable_ssbs(struct kvm_cpu_context *host_ctxt) · 10 unmodified lines
6767 write_sysreg_el2(tmp, SYS_SCTLR);
6868 }
6969
70−static void handle___vgic_v3_get_ich_vtr_el2(struct kvm_cpu_context *host_ctxt)
70+static void handle___vgic_v3_get_gic_config(struct kvm_cpu_context *host_ctxt)
7171 {
72− cpu_reg(host_ctxt, 1) = __vgic_v3_get_ich_vtr_el2();
72+ cpu_reg(host_ctxt, 1) = __vgic_v3_get_gic_config();
7373 }
7474
7575 static void handle___vgic_v3_read_vmcr(struct kvm_cpu_context *host_ctxt)
@@ -115,10 +115,10 @@ static const hcall_t host_hcall[] = { · 39 unmodified lines
115115 HANDLE_FUNC(__kvm_flush_vm_context),
116116 HANDLE_FUNC(__kvm_tlb_flush_vmid_ipa),
117117 HANDLE_FUNC(__kvm_tlb_flush_vmid),
118− HANDLE_FUNC(__kvm_tlb_flush_local_vmid),
118+ HANDLE_FUNC(__kvm_flush_cpu_context),
119119 HANDLE_FUNC(__kvm_timer_set_cntvoff),
120120 HANDLE_FUNC(__kvm_enable_ssbs),
121− HANDLE_FUNC(__vgic_v3_get_ich_vtr_el2),
121+ HANDLE_FUNC(__vgic_v3_get_gic_config),
122122 HANDLE_FUNC(__vgic_v3_read_vmcr),
123123 HANDLE_FUNC(__vgic_v3_write_vmcr),
124124 HANDLE_FUNC(__vgic_v3_init_lrs),
arch/arm64/kvm/hyp/nvhe/switch.c+11−3
@@ -192,6 +192,14 @@ int __kvm_vcpu_run(struct kvm_vcpu *vcpu) · 191 unmodified lines
192192 pmu_switch_needed = __pmu_switch_to_guest(host_ctxt);
193193
194194 __sysreg_save_state_nvhe(host_ctxt);
195+ /*
196+ * We must flush and disable the SPE buffer for nVHE, as
197+ * the translation regime(EL1&0) is going to be loaded with
198+ * that of the guest. And we must do this before we change the
199+ * translation regime to EL2 (via MDCR_EL2_E2PB == 0) and
200+ * before we load guest Stage1.
201+ */
202+ __debug_save_host_buffers_nvhe(vcpu);
195203
196204 __adjust_pc(vcpu);
197205
@@ -234,11 +242,12 @@ int __kvm_vcpu_run(struct kvm_vcpu *vcpu) · 36 unmodified lines
234242 if (vcpu->arch.flags & KVM_ARM64_FP_ENABLED)
235243 __fpsimd_save_fpexc32(vcpu);
236244
245+ __debug_switch_to_host(vcpu);
237246 /*
238247 * This must come after restoring the host sysregs, since a non-VHE
239248 * system may enable SPE here and make use of the TTBRs.
240249 */
241− __debug_switch_to_host(vcpu);
250+ __debug_restore_host_buffers_nvhe(vcpu);
242251
243252 if (pmu_switch_needed)
244253 __pmu_switch_to_host(host_ctxt);
@@ -257,7 +266,6 @@ void __noreturn hyp_panic(void) · 12 unmodified lines
257266 u64 spsr = read_sysreg_el2(SYS_SPSR);
258267 u64 elr = read_sysreg_el2(SYS_ELR);
259268 u64 par = read_sysreg_par();
260− bool restore_host = true;
261269 struct kvm_cpu_context *host_ctxt;
262270 struct kvm_vcpu *vcpu;
263271
@@ -271,7 +279,7 @@ void __noreturn hyp_panic(void) · 7 unmodified lines
271279 __sysreg_restore_state_nvhe(host_ctxt);
272280 }
273281
274− __hyp_do_panic(restore_host, spsr, elr, par);
282+ __hyp_do_panic(host_ctxt, spsr, elr, par);
275283 unreachable();
276284 }
277285
arch/arm64/kvm/hyp/nvhe/tlb.c+2−1
@@ -123,7 +123,7 @@ void __kvm_tlb_flush_vmid(struct kvm_s2_mmu *mmu) · 122 unmodified lines
123123 __tlb_switch_to_host(&cxt);
124124 }
125125
126−void __kvm_tlb_flush_local_vmid(struct kvm_s2_mmu *mmu)
126+void __kvm_flush_cpu_context(struct kvm_s2_mmu *mmu)
127127 {
128128 struct tlb_inv_context cxt;
129129
@@ -131,6 +131,7 @@ void __kvm_tlb_flush_local_vmid(struct kvm_s2_mmu *mmu) · 1 unmodified line
131131 __tlb_switch_to_guest(mmu, &cxt);
132132
133133 __tlbi(vmalle1);
134+ asm volatile("ic iallu");
134135 dsb(nsh);
135136 isb();
136137
arch/arm64/kvm/hyp/pgtable.c+1−0
@@ -223,6 +223,7 @@ static inline int __kvm_pgtable_visit(struct kvm_pgtable_walk_data *data, · 222 unmodified lines
223223 goto out;
224224
225225 if (!table) {
226+ data->addr = ALIGN_DOWN(data->addr, kvm_granule_size(level));
226227 data->addr += kvm_granule_size(level);
227228 goto out;
228229 }
arch/arm64/kvm/hyp/vgic-v3-sr.c+47−2
@@ -405,9 +405,54 @@ void __vgic_v3_init_lrs(void) · 404 unmodified lines
405405 __gic_v3_set_lr(0, i);
406406 }
407407
408−u64 __vgic_v3_get_ich_vtr_el2(void)
408+/*
409+ * Return the GIC CPU configuration:
410+ * - [31:0] ICH_VTR_EL2
411+ * - [62:32] RES0
412+ * - [63] MMIO (GICv2) capable
413+ */
414+u64 __vgic_v3_get_gic_config(void)
409415 {
410− return read_gicreg(ICH_VTR_EL2);
416+ u64 val, sre = read_gicreg(ICC_SRE_EL1);
417+ unsigned long flags = 0;
418+
419+ /*
420+ * To check whether we have a MMIO-based (GICv2 compatible)
421+ * CPU interface, we need to disable the system register
422+ * view. To do that safely, we have to prevent any interrupt
423+ * from firing (which would be deadly).
424+ *
425+ * Note that this only makes sense on VHE, as interrupts are
426+ * already masked for nVHE as part of the exception entry to
427+ * EL2.
428+ */
429+ if (has_vhe())
430+ flags = local_daif_save();
431+
432+ /*
433+ * Table 11-2 "Permitted ICC_SRE_ELx.SRE settings" indicates
434+ * that to be able to set ICC_SRE_EL1.SRE to 0, all the
435+ * interrupt overrides must be set. You've got to love this.
436+ */
437+ sysreg_clear_set(hcr_el2, 0, HCR_AMO | HCR_FMO | HCR_IMO);
438+ isb();
439+ write_gicreg(0, ICC_SRE_EL1);
440+ isb();
441+
442+ val = read_gicreg(ICC_SRE_EL1);
443+
444+ write_gicreg(sre, ICC_SRE_EL1);
445+ isb();
446+ sysreg_clear_set(hcr_el2, HCR_AMO | HCR_FMO | HCR_IMO, 0);
447+ isb();
448+
449+ if (has_vhe())
450+ local_daif_restore(flags);
451+
452+ val = (val & ICC_SRE_EL1_SRE) ? 0 : (1ULL << 63);
453+ val |= read_gicreg(ICH_VTR_EL2);
454+
455+ return val;
411456 }
412457
413458 u64 __vgic_v3_read_vmcr(void)
arch/arm64/kvm/hyp/vhe/tlb.c+2−1
@@ -127,7 +127,7 @@ void __kvm_tlb_flush_vmid(struct kvm_s2_mmu *mmu) · 126 unmodified lines
127127 __tlb_switch_to_host(&cxt);
128128 }
129129
130−void __kvm_tlb_flush_local_vmid(struct kvm_s2_mmu *mmu)
130+void __kvm_flush_cpu_context(struct kvm_s2_mmu *mmu)
131131 {
132132 struct tlb_inv_context cxt;
133133
@@ -135,6 +135,7 @@ void __kvm_tlb_flush_local_vmid(struct kvm_s2_mmu *mmu) · 1 unmodified line
135135 __tlb_switch_to_guest(mmu, &cxt);
136136
137137 __tlbi(vmalle1);
138+ asm volatile("ic iallu");
138139 dsb(nsh);
139140 isb();
140141
arch/arm64/kvm/mmu.c+1−2
@@ -1312,8 +1312,7 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm, · 1311 unmodified lines
13121312 * Prevent userspace from creating a memory region outside of the IPA
13131313 * space addressable by the KVM guest IPA space.
13141314 */
1315− if (memslot->base_gfn + memslot->npages >=
1316− (kvm_phys_size(kvm) >> PAGE_SHIFT))
1315+ if ((memslot->base_gfn + memslot->npages) > (kvm_phys_size(kvm) >> PAGE_SHIFT))
13171316 return -EFAULT;
13181317
13191318 mmap_read_lock(current->mm);
arch/arm64/kvm/perf.c+10−0
@@ -11,6 +11,8 @@ · 10 unmodified lines
1111
1212 #include <asm/kvm_emulate.h>
1313
14+DEFINE_STATIC_KEY_FALSE(kvm_arm_pmu_available);
15+
1416 static int kvm_is_in_guest(void)
1517 {
1618 return kvm_get_running_vcpu() != NULL;
@@ -48,6 +50,14 @@ static struct perf_guest_info_callbacks kvm_guest_cbs = { · 31 unmodified lines
4850
4951 int kvm_perf_init(void)
5052 {
53+ /*
54+ * Check if HW_PERF_EVENTS are supported by checking the number of
55+ * hardware performance counters. This could ensure the presence of
56+ * a physical PMU and CONFIG_PERF_EVENT is selected.
57+ */
58+ if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0)
59+ static_branch_enable(&kvm_arm_pmu_available);
60+
5161 return perf_register_guest_info_callbacks(&kvm_guest_cbs);
5262 }
5363
arch/arm64/kvm/pmu-emul.c+0−10
@@ -823,16 +823,6 @@ u64 kvm_pmu_get_pmceid(struct kvm_vcpu *vcpu, bool pmceid1) · 822 unmodified lines
823823 return val & mask;
824824 }
825825
826−bool kvm_arm_support_pmu_v3(void)
827−{
828− /*
829− * Check if HW_PERF_EVENTS are supported by checking the number of
830− * hardware performance counters. This could ensure the presence of
831− * a physical PMU and CONFIG_PERF_EVENT is selected.
832− */
833− return (perf_num_counters() > 0);
834−}
835−
836826 int kvm_arm_pmu_v3_enable(struct kvm_vcpu *vcpu)
837827 {
838828 if (!kvm_vcpu_has_pmu(vcpu))
arch/arm64/kvm/reset.c+14−8
@@ -311,23 +311,24 @@ int kvm_set_ipa_limit(void) · 310 unmodified lines
311311 }
312312
313313 switch (cpuid_feature_extract_unsigned_field(mmfr0, tgran_2)) {
314− default:
315− case 1:
314+ case ID_AA64MMFR0_TGRAN_2_SUPPORTED_NONE:
316315 kvm_err("PAGE_SIZE not supported at Stage-2, giving up\n");
317316 return -EINVAL;
318− case 0:
317+ case ID_AA64MMFR0_TGRAN_2_SUPPORTED_DEFAULT:
319318 kvm_debug("PAGE_SIZE supported at Stage-2 (default)\n");
320319 break;
321− case 2:
320+ case ID_AA64MMFR0_TGRAN_2_SUPPORTED_MIN ... ID_AA64MMFR0_TGRAN_2_SUPPORTED_MAX:
322321 kvm_debug("PAGE_SIZE supported at Stage-2 (advertised)\n");
323322 break;
323+ default:
324+ kvm_err("Unsupported value for TGRAN_2, giving up\n");
325+ return -EINVAL;
324326 }
325327
326328 kvm_ipa_limit = id_aa64mmfr0_parange_to_phys_shift(parange);
327− WARN(kvm_ipa_limit < KVM_PHYS_SHIFT,
328− "KVM IPA Size Limit (%d bits) is smaller than default size\n",
329− kvm_ipa_limit);
330− kvm_info("IPA Size Limit: %d bits\n", kvm_ipa_limit);
329+ kvm_info("IPA Size Limit: %d bits%s\n", kvm_ipa_limit,
330+ ((kvm_ipa_limit < KVM_PHYS_SHIFT) ?
331+ " (Reduced IPA size, limited VM/VMM compatibility)" : ""));
331332
332333 return 0;
333334 }
@@ -356,6 +357,11 @@ int kvm_arm_setup_stage2(struct kvm *kvm, unsigned long type) · 22 unmodified lines
356357 return -EINVAL;
357358 } else {
358359 phys_shift = KVM_PHYS_SHIFT;
360+ if (phys_shift > kvm_ipa_limit) {
361+ pr_warn_once("%s using unsupported default IPA limit, upgrade your VMM\n",
362+ current->comm);
363+ return -EINVAL;
364+ }
359365 }
360366
361367 mmfr0 = read_sanitised_ftr_reg(SYS_ID_AA64MMFR0_EL1);
arch/arm64/kvm/vgic/vgic-v3.c+9−3
@@ -574,9 +574,13 @@ early_param("kvm-arm.vgic_v4_enable", early_gicv4_enable); · 573 unmodified lines
574574 */
575575 int vgic_v3_probe(const struct gic_kvm_info *info)
576576 {
577− u32 ich_vtr_el2 = kvm_call_hyp_ret(__vgic_v3_get_ich_vtr_el2);
577+ u64 ich_vtr_el2 = kvm_call_hyp_ret(__vgic_v3_get_gic_config);
578+ bool has_v2;
578579 int ret;
579580
581+ has_v2 = ich_vtr_el2 >> 63;
582+ ich_vtr_el2 = (u32)ich_vtr_el2;
583+
580584 /*
581585 * The ListRegs field is 5 bits, but there is an architectural
582586 * maximum of 16 list registers. Just ignore bit 4...
@@ -594,13 +598,15 @@ int vgic_v3_probe(const struct gic_kvm_info *info) · 11 unmodified lines
594598 gicv4_enable ? "en" : "dis");
595599 }
596600
601+ kvm_vgic_global_state.vcpu_base = 0;
602+
597603 if (!info->vcpu.start) {
598604 kvm_info("GICv3: no GICV resource entry\n");
599− kvm_vgic_global_state.vcpu_base = 0;
605+ } else if (!has_v2) {
606+ pr_warn(FW_BUG "CPU interface incapable of MMIO access\n");
600607 } else if (!PAGE_ALIGNED(info->vcpu.start)) {
601608 pr_warn("GICV physical address 0x%llx not page aligned\n",
602609 (unsigned long long)info->vcpu.start);
603− kvm_vgic_global_state.vcpu_base = 0;
604610 } else {
605611 kvm_vgic_global_state.vcpu_base = info->vcpu.start;
606612 kvm_vgic_global_state.can_emulate_gicv2 = true;
arch/arm64/mm/init.c+26−3
@@ -219,17 +219,40 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max) · 218 unmodified lines
219219
220220 int pfn_valid(unsigned long pfn)
221221 {
222− phys_addr_t addr = pfn << PAGE_SHIFT;
222+ phys_addr_t addr = PFN_PHYS(pfn);
223223
224− if ((addr >> PAGE_SHIFT) != pfn)
224+ /*
225+ * Ensure the upper PAGE_SHIFT bits are clear in the
226+ * pfn. Else it might lead to false positives when
227+ * some of the upper bits are set, but the lower bits
228+ * match a valid pfn.
229+ */
230+ if (PHYS_PFN(addr) != pfn)
225231 return 0;
226232
227233 #ifdef CONFIG_SPARSEMEM
234+{
235+ struct mem_section *ms;
236+
228237 if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)
229238 return 0;
230239
231− if (!valid_section(__pfn_to_section(pfn)))
240+ ms = __pfn_to_section(pfn);
241+ if (!valid_section(ms))
232242 return 0;
243+
244+ /*
245+ * ZONE_DEVICE memory does not have the memblock entries.
246+ * memblock_is_map_memory() check for ZONE_DEVICE based
247+ * addresses will always fail. Even the normal hotplugged
248+ * memory will never have MEMBLOCK_NOMAP flag set in their
249+ * memblock entries. Skip memblock search for all non early
250+ * memory sections covering all of hotplug memory including
251+ * both normal and ZONE_DEVICE based.
252+ */
253+ if (!early_section(ms))
254+ return pfn_section_valid(ms, pfn);
255+}
233256 #endif
234257 return memblock_is_map_memory(addr);
235258 }
arch/arm64/mm/mmu.c+22−4
@@ -40,7 +40,7 @@ · 39 unmodified lines
4040 #define NO_BLOCK_MAPPINGS BIT(0)
4141 #define NO_CONT_MAPPINGS BIT(1)
4242
43−u64 idmap_t0sz = TCR_T0SZ(VA_BITS);
43+u64 idmap_t0sz = TCR_T0SZ(VA_BITS_MIN);
4444 u64 idmap_ptrs_per_pgd = PTRS_PER_PGD;
4545
4646 u64 __section(".mmuoff.data.write") vabits_actual;
@@ -512,7 +512,8 @@ static void __init map_mem(pgd_t *pgdp) · 465 unmodified lines
512512 * if MTE is present. Otherwise, it has the same attributes as
513513 * PAGE_KERNEL.
514514 */
515− __map_memblock(pgdp, start, end, PAGE_KERNEL_TAGGED, flags);
515+ __map_memblock(pgdp, start, end, pgprot_tagged(PAGE_KERNEL),
516+ flags);
516517 }
517518
518519 /*
@@ -1447,6 +1448,22 @@ static void __remove_pgd_mapping(pgd_t *pgdir, unsigned long start, u64 size) · 928 unmodified lines
14471448 struct range arch_get_mappable_range(void)
14481449 {
14491450 struct range mhp_range;
1451+ u64 start_linear_pa = __pa(_PAGE_OFFSET(vabits_actual));
1452+ u64 end_linear_pa = __pa(PAGE_END - 1);
1453+
1454+ if (IS_ENABLED(CONFIG_RANDOMIZE_BASE)) {
1455+ /*
1456+ * Check for a wrap, it is possible because of randomized linear
1457+ * mapping the start physical address is actually bigger than
1458+ * the end physical address. In this case set start to zero
1459+ * because [0, end_linear_pa] range must still be able to cover
1460+ * all addressable physical addresses.
1461+ */
1462+ if (start_linear_pa > end_linear_pa)
1463+ start_linear_pa = 0;
1464+ }
1465+
1466+ WARN_ON(start_linear_pa > end_linear_pa);
14501467
14511468 /*
14521469 * Linear mapping region is the range [PAGE_OFFSET..(PAGE_END - 1)]
@@ -1454,8 +1471,9 @@ struct range arch_get_mappable_range(void) · 1 unmodified line
14541471 * range which can be mapped inside this linear mapping range, must
14551472 * also be derived from its end points.
14561473 */
1457− mhp_range.start = __pa(_PAGE_OFFSET(vabits_actual));
1458− mhp_range.end = __pa(PAGE_END - 1);
1474+ mhp_range.start = start_linear_pa;
1475+ mhp_range.end = end_linear_pa;
1476+
14591477 return mhp_range;
14601478 }
14611479
arch/csky/Kconfig+1−1
@@ -314,7 +314,7 @@ config FORCE_MAX_ZONEORDER · 313 unmodified lines
314314 int "Maximum zone order"
315315 default "11"
316316
317−config RAM_BASE
317+config DRAM_BASE
318318 hex "DRAM start addr (the same with memory-section in dts)"
319319 default 0x0
320320
arch/csky/include/asm/page.h+1−1
@@ -28,7 +28,7 @@ · 27 unmodified lines
2828 #define SSEG_SIZE 0x20000000
2929 #define LOWMEM_LIMIT (SSEG_SIZE * 2)
3030
31−#define PHYS_OFFSET_OFFSET (CONFIG_RAM_BASE & (SSEG_SIZE - 1))
31+#define PHYS_OFFSET_OFFSET (CONFIG_DRAM_BASE & (SSEG_SIZE - 1))
3232
3333 #ifndef __ASSEMBLY__
3434
arch/csky/kernel/probes/ftrace.c+1−1
@@ -9,7 +9,7 @@ int arch_check_ftrace_location(struct kprobe *p) · 8 unmodified lines
99 return 0;
1010 }
1111
12−/* Ftrace callback handler for kprobes -- called under preepmt disabed */
12+/* Ftrace callback handler for kprobes -- called under preepmt disabled */
1313 void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
1414 struct ftrace_ops *ops, struct ftrace_regs *fregs)
1515 {
arch/ia64/configs/generic_defconfig+0−2
@@ -55,8 +55,6 @@ CONFIG_CHR_DEV_SG=m · 54 unmodified lines
5555 CONFIG_SCSI_FC_ATTRS=y
5656 CONFIG_SCSI_SYM53C8XX_2=y
5757 CONFIG_SCSI_QLOGIC_1280=y
58−CONFIG_ATA=y
59−CONFIG_ATA_PIIX=y
6058 CONFIG_SATA_VITESSE=y
6159 CONFIG_MD=y
6260 CONFIG_BLK_DEV_MD=m
arch/ia64/include/asm/ptrace.h+1−7
@@ -54,8 +54,7 @@ · 53 unmodified lines
5454
5555 static inline unsigned long user_stack_pointer(struct pt_regs *regs)
5656 {
57− /* FIXME: should this be bspstore + nr_dirty regs? */
58− return regs->ar_bspstore;
57+ return regs->r12;
5958 }
6059
6160 static inline int is_syscall_success(struct pt_regs *regs)
@@ -79,11 +78,6 @@ static inline long regs_return_value(struct pt_regs *regs) · 17 unmodified lines
7978 unsigned long __ip = instruction_pointer(regs); \
8079 (__ip & ~3UL) + ((__ip & 3UL) << 2); \
8180 })
82−/*
83− * Why not default? Because user_stack_pointer() on ia64 gives register
84− * stack backing store instead...
85− */
86−#define current_user_stack_pointer() (current_pt_regs()->r12)
8781
8882 /* given a pointer to a task_struct, return the user's pt_regs */
8983 # define task_pt_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1)
arch/ia64/include/asm/syscall.h+1−1
@@ -32,7 +32,7 @@ static inline void syscall_rollback(struct task_struct *task, · 31 unmodified lines
3232 static inline long syscall_get_error(struct task_struct *task,
3333 struct pt_regs *regs)
3434 {
35− return regs->r10 == -1 ? regs->r8:0;
35+ return regs->r10 == -1 ? -regs->r8:0;
3636 }
3737
3838 static inline long syscall_get_return_value(struct task_struct *task,
arch/ia64/kernel/err_inject.c+11−11
@@ -59,7 +59,7 @@ show_##name(struct device *dev, struct device_attribute *attr, \ · 58 unmodified lines
5959 char *buf) \
6060 { \
6161 u32 cpu=dev->id; \
62− return sprintf(buf, "%lx\n", name[cpu]); \
62+ return sprintf(buf, "%llx\n", name[cpu]); \
6363 }
6464
6565 #define store(name) \
@@ -86,9 +86,9 @@ store_call_start(struct device *dev, struct device_attribute *attr, · 20 unmodified lines
8686
8787 #ifdef ERR_INJ_DEBUG
8888 printk(KERN_DEBUG "pal_mc_err_inject for cpu%d:\n", cpu);
89− printk(KERN_DEBUG "err_type_info=%lx,\n", err_type_info[cpu]);
90− printk(KERN_DEBUG "err_struct_info=%lx,\n", err_struct_info[cpu]);
91− printk(KERN_DEBUG "err_data_buffer=%lx, %lx, %lx.\n",
89+ printk(KERN_DEBUG "err_type_info=%llx,\n", err_type_info[cpu]);
90+ printk(KERN_DEBUG "err_struct_info=%llx,\n", err_struct_info[cpu]);
91+ printk(KERN_DEBUG "err_data_buffer=%llx, %llx, %llx.\n",
9292 err_data_buffer[cpu].data1,
9393 err_data_buffer[cpu].data2,
9494 err_data_buffer[cpu].data3);
@@ -117,8 +117,8 @@ store_call_start(struct device *dev, struct device_attribute *attr, · 22 unmodified lines
117117
118118 #ifdef ERR_INJ_DEBUG
119119 printk(KERN_DEBUG "Returns: status=%d,\n", (int)status[cpu]);
120− printk(KERN_DEBUG "capabilities=%lx,\n", capabilities[cpu]);
121− printk(KERN_DEBUG "resources=%lx\n", resources[cpu]);
120+ printk(KERN_DEBUG "capabilities=%llx,\n", capabilities[cpu]);
121+ printk(KERN_DEBUG "resources=%llx\n", resources[cpu]);
122122 #endif
123123 return size;
124124 }
@@ -131,7 +131,7 @@ show_virtual_to_phys(struct device *dev, struct device_attribute *attr, · 6 unmodified lines
131131 char *buf)
132132 {
133133 unsigned int cpu=dev->id;
134− return sprintf(buf, "%lx\n", phys_addr[cpu]);
134+ return sprintf(buf, "%llx\n", phys_addr[cpu]);
135135 }
136136
137137 static ssize_t
@@ -145,7 +145,7 @@ store_virtual_to_phys(struct device *dev, struct device_attribute *attr, · 7 unmodified lines
145145 ret = get_user_pages_fast(virt_addr, 1, FOLL_WRITE, NULL);
146146 if (ret<=0) {
147147 #ifdef ERR_INJ_DEBUG
148− printk("Virtual address %lx is not existing.\n",virt_addr);
148+ printk("Virtual address %llx is not existing.\n", virt_addr);
149149 #endif
150150 return -EINVAL;
151151 }
@@ -163,7 +163,7 @@ show_err_data_buffer(struct device *dev, · 11 unmodified lines
163163 {
164164 unsigned int cpu=dev->id;
165165
166− return sprintf(buf, "%lx, %lx, %lx\n",
166+ return sprintf(buf, "%llx, %llx, %llx\n",
167167 err_data_buffer[cpu].data1,
168168 err_data_buffer[cpu].data2,
169169 err_data_buffer[cpu].data3);
@@ -178,13 +178,13 @@ store_err_data_buffer(struct device *dev, · 8 unmodified lines
178178 int ret;
179179
180180 #ifdef ERR_INJ_DEBUG
181− printk("write err_data_buffer=[%lx,%lx,%lx] on cpu%d\n",
181+ printk("write err_data_buffer=[%llx,%llx,%llx] on cpu%d\n",
182182 err_data_buffer[cpu].data1,
183183 err_data_buffer[cpu].data2,
184184 err_data_buffer[cpu].data3,
185185 cpu);
186186 #endif
187− ret=sscanf(buf, "%lx, %lx, %lx",
187+ ret = sscanf(buf, "%llx, %llx, %llx",
188188 &err_data_buffer[cpu].data1,
189189 &err_data_buffer[cpu].data2,
190190 &err_data_buffer[cpu].data3);
arch/ia64/kernel/mca.c+1−1
@@ -1824,7 +1824,7 @@ ia64_mca_cpu_init(void *cpu_data) · 1823 unmodified lines
18241824 data = mca_bootmem();
18251825 first_time = 0;
18261826 } else
1827− data = (void *)__get_free_pages(GFP_KERNEL,
1827+ data = (void *)__get_free_pages(GFP_ATOMIC,
18281828 get_order(sz));
18291829 if (!data)
18301830 panic("Could not allocate MCA memory for cpu %d\n",
arch/ia64/kernel/ptrace.c+18−6
@@ -2013,27 +2013,39 @@ static void syscall_get_set_args_cb(struct unw_frame_info *info, void *data) · 2012 unmodified lines
20132013 {
20142014 struct syscall_get_set_args *args = data;
20152015 struct pt_regs *pt = args->regs;
2016− unsigned long *krbs, cfm, ndirty;
2016+ unsigned long *krbs, cfm, ndirty, nlocals, nouts;
20172017 int i, count;
20182018
20192019 if (unw_unwind_to_user(info) < 0)
20202020 return;
20212021
2022+ /*
2023+ * We get here via a few paths:
2024+ * - break instruction: cfm is shared with caller.
2025+ * syscall args are in out= regs, locals are non-empty.
2026+ * - epsinstruction: cfm is set by br.call
2027+ * locals don't exist.
2028+ *
2029+ * For both cases argguments are reachable in cfm.sof - cfm.sol.
2030+ * CFM: [ ... | sor: 17..14 | sol : 13..7 | sof : 6..0 ]
2031+ */
20222032 cfm = pt->cr_ifs;
2033+ nlocals = (cfm >> 7) & 0x7f; /* aka sol */
2034+ nouts = (cfm & 0x7f) - nlocals; /* aka sof - sol */
20232035 krbs = (unsigned long *)info->task + IA64_RBS_OFFSET/8;
20242036 ndirty = ia64_rse_num_regs(krbs, krbs + (pt->loadrs >> 19));
20252037
20262038 count = 0;
20272039 if (in_syscall(pt))
2028− count = min_t(int, args->n, cfm & 0x7f);
2040+ count = min_t(int, args->n, nouts);
20292041
2042+ /* Iterate over outs. */
20302043 for (i = 0; i < count; i++) {
2044+ int j = ndirty + nlocals + i + args->i;
20312045 if (args->rw)
2032− *ia64_rse_skip_regs(krbs, ndirty + i + args->i) =
2033− args->args[i];
2046+ *ia64_rse_skip_regs(krbs, j) = args->args[i];
20342047 else
2035− args->args[i] = *ia64_rse_skip_regs(krbs,
2036− ndirty + i + args->i);
2048+ args->args[i] = *ia64_rse_skip_regs(krbs, j);
20372049 }
20382050
20392051 if (!args->rw) {
arch/ia64/mm/discontig.c+3−3
@@ -95,7 +95,7 @@ static int __init build_node_maps(unsigned long start, unsigned long len, · 94 unmodified lines
9595 * acpi_boot_init() (which builds the node_to_cpu_mask array) hasn't been
9696 * called yet. Note that node 0 will also count all non-existent cpus.
9797 */
98−static int __meminit early_nr_cpus_node(int node)
98+static int early_nr_cpus_node(int node)
9999 {
100100 int cpu, n = 0;
101101
@@ -110,7 +110,7 @@ static int __meminit early_nr_cpus_node(int node) · 8 unmodified lines
110110 * compute_pernodesize - compute size of pernode data
111111 * @node: the node id.
112112 */
113−static unsigned long __meminit compute_pernodesize(int node)
113+static unsigned long compute_pernodesize(int node)
114114 {
115115 unsigned long pernodesize = 0, cpus;
116116
@@ -367,7 +367,7 @@ static void __init reserve_pernode_space(void) · 250 unmodified lines
367367 }
368368 }
369369
370−static void __meminit scatter_node_data(void)
370+static void scatter_node_data(void)
371371 {
372372 pg_data_t **dst;
373373 int node;
arch/m68k/include/asm/page_mm.h+2−2
@@ -167,11 +167,11 @@ static inline __attribute_const__ int __virt_to_node_shift(void) · 166 unmodified lines
167167 ((__p) - pgdat->node_mem_map) + pgdat->node_start_pfn; \
168168 })
169169 #else
170−#define ARCH_PFN_OFFSET (m68k_memory[0].addr)
170+#define ARCH_PFN_OFFSET (m68k_memory[0].addr >> PAGE_SHIFT)
171171 #include <asm-generic/memory_model.h>
172172 #endif
173173
174−#define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
174+#define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory)
175175 #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
176176
177177 #endif /* __ASSEMBLY__ */
arch/m68k/include/asm/page_no.h+2−2
@@ -30,8 +30,8 @@ extern unsigned long memory_end; · 29 unmodified lines
3030 #define page_to_pfn(page) virt_to_pfn(page_to_virt(page))
3131 #define pfn_valid(pfn) ((pfn) < max_mapnr)
3232
33−#define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
34− ((void *)(kaddr) < (void *)memory_end))
33+#define virt_addr_valid(kaddr) (((unsigned long)(kaddr) >= PAGE_OFFSET) && \
34+ ((unsigned long)(kaddr) < memory_end))
3535
3636 #endif /* __ASSEMBLY__ */
3737
arch/mips/boot/compressed/decompress.c+8−0
@@ -14,6 +14,7 @@ · 13 unmodified lines
1414
1515 #include <asm/addrspace.h>
1616 #include <asm/unaligned.h>
17+#include <asm-generic/vmlinux.lds.h>
1718
1819 /*
1920 * These two variables specify the free mem region
@@ -120,6 +121,13 @@ void decompress_kernel(unsigned long boot_heap_start) · 100 unmodified lines
120121 /* last four bytes is always image size in little endian */
121122 image_size = get_unaligned_le32((void *)&__image_end - 4);
122123
124+ /* The device tree's address must be properly aligned */
125+ image_size = ALIGN(image_size, STRUCT_ALIGNMENT);
126+
127+ puts("Copy device tree to address ");
128+ puthex(VMLINUX_LOAD_ADDRESS_ULL + image_size);
129+ puts("\n");
130+
123131 /* copy dtb to where the booted kernel will expect it */
124132 memcpy((void *)VMLINUX_LOAD_ADDRESS_ULL + image_size,
125133 __appended_dtb, dtb_size);
arch/mips/crypto/Makefile+2−2
@@ -12,8 +12,8 @@ AFLAGS_chacha-core.o += -O2 # needed to fill branch delay slots · 11 unmodified lines
1212 obj-$(CONFIG_CRYPTO_POLY1305_MIPS) += poly1305-mips.o
1313 poly1305-mips-y := poly1305-core.o poly1305-glue.o
1414
15−perlasm-flavour-$(CONFIG_CPU_MIPS32) := o32
16−perlasm-flavour-$(CONFIG_CPU_MIPS64) := 64
15+perlasm-flavour-$(CONFIG_32BIT) := o32
16+perlasm-flavour-$(CONFIG_64BIT) := 64
1717
1818 quiet_cmd_perlasm = PERLASM $@
1919 cmd_perlasm = $(PERL) $(<) $(perlasm-flavour-y) $(@)
arch/mips/include/asm/traps.h+3−0
@@ -24,8 +24,11 @@ extern void (*board_ebase_setup)(void); · 23 unmodified lines
2424 extern void (*board_cache_error_setup)(void);
2525
2626 extern int register_nmi_notifier(struct notifier_block *nb);
27+extern void reserve_exception_space(phys_addr_t addr, unsigned long size);
2728 extern char except_vec_nmi[];
2829
30+#define VECTORSPACING 0x100 /* for EI/VI mode */
31+
2932 #define nmi_notifier(fn, pri) \
3033 ({ \
3134 static struct notifier_block fn##_nb = { \
arch/mips/kernel/cpu-probe.c+6−0
@@ -26,6 +26,7 @@ · 25 unmodified lines
2626 #include <asm/elf.h>
2727 #include <asm/pgtable-bits.h>
2828 #include <asm/spram.h>
29+#include <asm/traps.h>
2930 #include <linux/uaccess.h>
3031
3132 #include "fpu-probe.h"
@@ -1628,6 +1629,7 @@ static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu) · 1596 unmodified lines
16281629 c->cputype = CPU_BMIPS3300;
16291630 __cpu_name[cpu] = "Broadcom BMIPS3300";
16301631 set_elf_platform(cpu, "bmips3300");
1632+ reserve_exception_space(0x400, VECTORSPACING * 64);
16311633 break;
16321634 case PRID_IMP_BMIPS43XX: {
16331635 int rev = c->processor_id & PRID_REV_MASK;
@@ -1638,6 +1640,7 @@ static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu) · 4 unmodified lines
16381640 __cpu_name[cpu] = "Broadcom BMIPS4380";
16391641 set_elf_platform(cpu, "bmips4380");
16401642 c->options |= MIPS_CPU_RIXI;
1643+ reserve_exception_space(0x400, VECTORSPACING * 64);
16411644 } else {
16421645 c->cputype = CPU_BMIPS4350;
16431646 __cpu_name[cpu] = "Broadcom BMIPS4350";
@@ -1654,6 +1657,7 @@ static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu) · 10 unmodified lines
16541657 __cpu_name[cpu] = "Broadcom BMIPS5000";
16551658 set_elf_platform(cpu, "bmips5000");
16561659 c->options |= MIPS_CPU_ULRI | MIPS_CPU_RIXI;
1660+ reserve_exception_space(0x1000, VECTORSPACING * 64);
16571661 break;
16581662 }
16591663 }
@@ -2133,6 +2137,8 @@ void cpu_probe(void) · 473 unmodified lines
21332137 if (cpu == 0)
21342138 __ua_limit = ~((1ull << cpu_vmbits) - 1);
21352139 #endif
2140+
2141+ reserve_exception_space(0, 0x1000);
21362142 }
21372143
21382144 void cpu_report(void)
arch/mips/kernel/cpu-r3k-probe.c+3−0
@@ -21,6 +21,7 @@ · 20 unmodified lines
2121 #include <asm/fpu.h>
2222 #include <asm/mipsregs.h>
2323 #include <asm/elf.h>
24+#include <asm/traps.h>
2425
2526 #include "fpu-probe.h"
2627
@@ -158,6 +159,8 @@ void cpu_probe(void) · 131 unmodified lines
158159 cpu_set_fpu_opts(c);
159160 else
160161 cpu_set_nofpu_opts(c);
162+
163+ reserve_exception_space(0, 0x400);
161164 }
162165
163166 void cpu_report(void)
arch/mips/kernel/setup.c+1−1
@@ -43,7 +43,7 @@ · 42 unmodified lines
4343 #include <asm/prom.h>
4444
4545 #ifdef CONFIG_MIPS_ELF_APPENDED_DTB
46−const char __section(".appended_dtb") __appended_dtb[0x100000];
46+char __section(".appended_dtb") __appended_dtb[0x100000];
4747 #endif /* CONFIG_MIPS_ELF_APPENDED_DTB */
4848
4949 struct cpuinfo_mips cpu_data[NR_CPUS] __read_mostly;
arch/mips/kernel/traps.c+5−5
@@ -2009,13 +2009,16 @@ void __noreturn nmi_exception_handler(struct pt_regs *regs) · 2008 unmodified lines
20092009 nmi_exit();
20102010 }
20112011
2012−#define VECTORSPACING 0x100 /* for EI/VI mode */
2013−
20142012 unsigned long ebase;
20152013 EXPORT_SYMBOL_GPL(ebase);
20162014 unsigned long exception_handlers[32];
20172015 unsigned long vi_handlers[64];
20182016
2017+void reserve_exception_space(phys_addr_t addr, unsigned long size)
2018+{
2019+ memblock_reserve(addr, size);
2020+}
2021+
20192022 void __init *set_except_vector(int n, void *addr)
20202023 {
20212024 unsigned long handler = (unsigned long) addr;
@@ -2367,10 +2370,7 @@ void __init trap_init(void) · 345 unmodified lines
23672370
23682371 if (!cpu_has_mips_r2_r6) {
23692372 ebase = CAC_BASE;
2370− ebase_pa = virt_to_phys((void *)ebase);
23712373 vec_size = 0x400;
2372−
2373− memblock_reserve(ebase_pa, vec_size);
23742374 } else {
23752375 if (cpu_has_veic || cpu_has_vint)
23762376 vec_size = 0x200 + VECTORSPACING*64;
arch/mips/kernel/vmlinux.lds.S+6−0
@@ -145,6 +145,7 @@ SECTIONS · 144 unmodified lines
145145 }
146146
147147 #ifdef CONFIG_MIPS_ELF_APPENDED_DTB
148+ STRUCT_ALIGN();
148149 .appended_dtb : AT(ADDR(.appended_dtb) - LOAD_OFFSET) {
149150 *(.appended_dtb)
150151 KEEP(*(.appended_dtb))
@@ -172,6 +173,11 @@ SECTIONS · 21 unmodified lines
172173 #endif
173174
174175 #ifdef CONFIG_MIPS_RAW_APPENDED_DTB
176+ .fill : {
177+ FILL(0);
178+ BYTE(0);
179+ STRUCT_ALIGN();
180+ }
175181 __appended_dtb = .;
176182 /* leave space for appended DTB */
177183 . += 0x100000;
arch/nds32/mm/cacheflush.c+1−1
@@ -238,7 +238,7 @@ void flush_dcache_page(struct page *page) · 237 unmodified lines
238238 {
239239 struct address_space *mapping;
240240
241− mapping = page_mapping(page);
241+ mapping = page_mapping_file(page);
242242 if (mapping && !mapping_mapped(mapping))
243243 set_bit(PG_dcache_dirty, &page->flags);
244244 else {
arch/parisc/Kconfig+5−2
@@ -203,9 +203,12 @@ config PREFETCH · 202 unmodified lines
203203 def_bool y
204204 depends on PA8X00 || PA7200
205205
206+config PARISC_HUGE_KERNEL
207+ def_bool y if !MODULES || UBSAN || FTRACE || COMPILE_TEST
208+
206209 config MLONGCALLS
207− def_bool y if !MODULES || UBSAN || FTRACE
208− bool "Enable the -mlong-calls compiler option for big kernels" if MODULES && !UBSAN && !FTRACE
210+ def_bool y if PARISC_HUGE_KERNEL
211+ bool "Enable the -mlong-calls compiler option for big kernels" if !PARISC_HUGE_KERNEL
209212 depends on PA8X00
210213 help
211214 If you configure the kernel to include many drivers built-in instead
arch/parisc/include/asm/cmpxchg.h+1−1
@@ -72,7 +72,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) · 71 unmodified lines
7272 #endif
7373 case 4: return __cmpxchg_u32((unsigned int *)ptr,
7474 (unsigned int)old, (unsigned int)new_);
75− case 1: return __cmpxchg_u8((u8 *)ptr, (u8)old, (u8)new_);
75+ case 1: return __cmpxchg_u8((u8 *)ptr, old & 0xff, new_ & 0xff);
7676 }
7777 __cmpxchg_called_with_bad_pointer();
7878 return old;
arch/parisc/include/asm/processor.h+0−1
@@ -272,7 +272,6 @@ on downward growing arches, it looks like this: · 271 unmodified lines
272272 regs->gr[23] = 0; \
273273 } while(0)
274274
275−struct task_struct;
276275 struct mm_struct;
277276
278277 /* Free all resources held by a thread. */
arch/parisc/kernel/ptrace.c+0−2
@@ -567,8 +567,6 @@ static const struct user_regset_view user_parisc_native_view = { · 566 unmodified lines
567567 };
568568
569569 #ifdef CONFIG_64BIT
570−#include <linux/compat.h>
571−
572570 static int gpr32_get(struct task_struct *target,
573571 const struct user_regset *regset,
574572 struct membuf to)
arch/parisc/math-emu/fpu.h+3−29
@@ -5,34 +5,10 @@ · 4 unmodified lines
55 * Floating-point emulation code
66 * Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.org>
77 */
8−/*
9− * BEGIN_DESC
10− *
11− * File:
12− * @(#) pa/fp/fpu.h $Revision: 1.1 $
13− *
14− * Purpose:
15− * <<please update with a synopis of the functionality provided by this file>>
16− *
17− *
18− * END_DESC
19−*/
20−
21−#ifdef __NO_PA_HDRS
22− PA header file -- do not include this header file for non-PA builds.
23−#endif
24−
258
269 #ifndef _MACHINE_FPU_INCLUDED /* allows multiple inclusion */
2710 #define _MACHINE_FPU_INCLUDED
2811
29−#if 0
30−#ifndef _SYS_STDSYMS_INCLUDED
31−# include <sys/stdsyms.h>
32−#endif /* _SYS_STDSYMS_INCLUDED */
33−#include <machine/pdc/pdc_rqsts.h>
34−#endif
35−
3612 #define PA83_FPU_FLAG 0x00000001
3713 #define PA89_FPU_FLAG 0x00000002
3814 #define PA2_0_FPU_FLAG 0x00000010
@@ -43,21 +19,19 @@ · 4 unmodified lines
4319 #define COPR_FP 0x00000080 /* Floating point -- Coprocessor 0 */
4420 #define SFU_MPY_DIVIDE 0x00008000 /* Multiply/Divide __ SFU 0 */
4521
46−
4722 #define EM_FPU_TYPE_OFFSET 272
4823
4924 /* version of EMULATION software for COPR,0,0 instruction */
5025 #define EMULATION_VERSION 4
5126
5227 /*
53− * The only was to differeniate between TIMEX and ROLEX (or PCX-S and PCX-T)
54− * is thorough the potential type field from the PDC_MODEL call. The
55− * following flags are used at assist this differeniation.
28+ * The only way to differentiate between TIMEX and ROLEX (or PCX-S and PCX-T)
29+ * is through the potential type field from the PDC_MODEL call.
30+ * The following flags are used to assist this differentiation.
5631 */
5732
5833 #define ROLEX_POTENTIAL_KEY_FLAGS PDC_MODEL_CPU_KEY_WORD_TO_IO
5934 #define TIMEX_POTENTIAL_KEY_FLAGS (PDC_MODEL_CPU_KEY_QUAD_STORE | \
6035 PDC_MODEL_CPU_KEY_RECIP_SQRT)
6136
62−
6337 #endif /* ! _MACHINE_FPU_INCLUDED */
arch/powerpc/include/asm/code-patching.h+4−3
@@ -73,9 +73,10 @@ void __patch_exception(int exc, unsigned long addr); · 72 unmodified lines
7373 #endif
7474
7575 #define OP_RT_RA_MASK 0xffff0000UL
76−#define LIS_R2 0x3c020000UL
77−#define ADDIS_R2_R12 0x3c4c0000UL
78−#define ADDI_R2_R2 0x38420000UL
76+#define LIS_R2 (PPC_INST_ADDIS | __PPC_RT(R2))
77+#define ADDIS_R2_R12 (PPC_INST_ADDIS | __PPC_RT(R2) | __PPC_RA(R12))
78+#define ADDI_R2_R2 (PPC_INST_ADDI | __PPC_RT(R2) | __PPC_RA(R2))
79+
7980
8081 static inline unsigned long ppc_function_entry(void *func)
8182 {
arch/powerpc/include/asm/cpu_has_feature.h+2−2
@@ -7,7 +7,7 @@ · 6 unmodified lines
77 #include <linux/bug.h>
88 #include <asm/cputable.h>
99
10−static inline bool early_cpu_has_feature(unsigned long feature)
10+static __always_inline bool early_cpu_has_feature(unsigned long feature)
1111 {
1212 return !!((CPU_FTRS_ALWAYS & feature) ||
1313 (CPU_FTRS_POSSIBLE & cur_cpu_spec->cpu_features & feature));
@@ -46,7 +46,7 @@ static __always_inline bool cpu_has_feature(unsigned long feature) · 32 unmodified lines
4646 return static_branch_likely(&cpu_feature_keys[i]);
4747 }
4848 #else
49−static inline bool cpu_has_feature(unsigned long feature)
49+static __always_inline bool cpu_has_feature(unsigned long feature)
5050 {
5151 return early_cpu_has_feature(feature);
5252 }
arch/powerpc/include/asm/dcr-native.h+4−4
@@ -53,8 +53,8 @@ static inline void mtdcrx(unsigned int reg, unsigned int val) · 52 unmodified lines
5353 #define mfdcr(rn) \
5454 ({unsigned int rval; \
5555 if (__builtin_constant_p(rn) && rn < 1024) \
56− asm volatile("mfdcr %0," __stringify(rn) \
57− : "=r" (rval)); \
56+ asm volatile("mfdcr %0, %1" : "=r" (rval) \
57+ : "n" (rn)); \
5858 else if (likely(cpu_has_feature(CPU_FTR_INDEXED_DCR))) \
5959 rval = mfdcrx(rn); \
6060 else \
@@ -64,8 +64,8 @@ static inline void mtdcrx(unsigned int reg, unsigned int val) · 3 unmodified lines
6464 #define mtdcr(rn, v) \
6565 do { \
6666 if (__builtin_constant_p(rn) && rn < 1024) \
67− asm volatile("mtdcr " __stringify(rn) ",%0" \
68− : : "r" (v)); \
67+ asm volatile("mtdcr %0, %1" \
68+ : : "n" (rn), "r" (v)); \
6969 else if (likely(cpu_has_feature(CPU_FTR_INDEXED_DCR))) \
7070 mtdcrx(rn, v); \
7171 else \
arch/powerpc/include/asm/interrupt.h+2−1
@@ -410,7 +410,6 @@ DECLARE_INTERRUPT_HANDLER(altivec_assist_exception); · 409 unmodified lines
410410 DECLARE_INTERRUPT_HANDLER(CacheLockingException);
411411 DECLARE_INTERRUPT_HANDLER(SPEFloatingPointException);
412412 DECLARE_INTERRUPT_HANDLER(SPEFloatingPointRoundException);
413−DECLARE_INTERRUPT_HANDLER(unrecoverable_exception);
414413 DECLARE_INTERRUPT_HANDLER(WatchdogException);
415414 DECLARE_INTERRUPT_HANDLER(kernel_bad_stack);
416415
@@ -437,6 +436,8 @@ DECLARE_INTERRUPT_HANDLER_NMI(hmi_exception_realmode); · 20 unmodified lines
437436
438437 DECLARE_INTERRUPT_HANDLER_ASYNC(TAUException);
439438
439+void unrecoverable_exception(struct pt_regs *regs);
440+
440441 void replay_system_reset(void);
441442 void replay_soft_interrupts(void);
442443
arch/powerpc/include/asm/mmu.h+2−2
@@ -228,7 +228,7 @@ enum { · 227 unmodified lines
228228 #define MMU_FTRS_ALWAYS 0
229229 #endif
230230
231−static inline bool early_mmu_has_feature(unsigned long feature)
231+static __always_inline bool early_mmu_has_feature(unsigned long feature)
232232 {
233233 if (MMU_FTRS_ALWAYS & feature)
234234 return true;
@@ -286,7 +286,7 @@ static inline void mmu_feature_keys_init(void) · 51 unmodified lines
286286
287287 }
288288
289−static inline bool mmu_has_feature(unsigned long feature)
289+static __always_inline bool mmu_has_feature(unsigned long feature)
290290 {
291291 return early_mmu_has_feature(feature);
292292 }
arch/powerpc/include/asm/ptrace.h+2−2
@@ -195,7 +195,7 @@ static inline void regs_set_return_value(struct pt_regs *regs, unsigned long rc) · 194 unmodified lines
195195 #define TRAP_FLAGS_MASK 0x11
196196 #define TRAP(regs) ((regs)->trap & ~TRAP_FLAGS_MASK)
197197 #define FULL_REGS(regs) (((regs)->trap & 1) == 0)
198−#define SET_FULL_REGS(regs) ((regs)->trap |= 1)
198+#define SET_FULL_REGS(regs) ((regs)->trap &= ~1)
199199 #endif
200200 #define CHECK_FULL_REGS(regs) BUG_ON(!FULL_REGS(regs))
201201 #define NV_REG_POISON 0xdeadbeefdeadbeefUL
@@ -210,7 +210,7 @@ static inline void regs_set_return_value(struct pt_regs *regs, unsigned long rc) · 8 unmodified lines
210210 #define TRAP_FLAGS_MASK 0x1F
211211 #define TRAP(regs) ((regs)->trap & ~TRAP_FLAGS_MASK)
212212 #define FULL_REGS(regs) (((regs)->trap & 1) == 0)
213−#define SET_FULL_REGS(regs) ((regs)->trap |= 1)
213+#define SET_FULL_REGS(regs) ((regs)->trap &= ~1)
214214 #define IS_CRITICAL_EXC(regs) (((regs)->trap & 2) != 0)
215215 #define IS_MCHECK_EXC(regs) (((regs)->trap & 4) != 0)
216216 #define IS_DEBUG_EXC(regs) (((regs)->trap & 8) != 0)
arch/powerpc/include/asm/switch_to.h+10−0
@@ -71,6 +71,16 @@ static inline void disable_kernel_vsx(void) · 70 unmodified lines
7171 {
7272 msr_check_and_clear(MSR_FP|MSR_VEC|MSR_VSX);
7373 }
74+#else
75+static inline void enable_kernel_vsx(void)
76+{
77+ BUILD_BUG();
78+}
79+
80+static inline void disable_kernel_vsx(void)
81+{
82+ BUILD_BUG();
83+}
7484 #endif
7585
7686 #ifdef CONFIG_SPE
arch/powerpc/include/asm/vio.h+1−1
@@ -113,7 +113,7 @@ struct vio_driver { · 112 unmodified lines
113113 const char *name;
114114 const struct vio_device_id *id_table;
115115 int (*probe)(struct vio_dev *dev, const struct vio_device_id *id);
116− int (*remove)(struct vio_dev *dev);
116+ void (*remove)(struct vio_dev *dev);
117117 /* A driver must have a get_desired_dma() function to
118118 * be loaded in a CMO environment if it uses DMA.
119119 */
arch/powerpc/kernel/Makefile+4−0
@@ -191,3 +191,7 @@ $(obj)/prom_init_check: $(src)/prom_init_check.sh $(obj)/prom_init.o FORCE · 190 unmodified lines
191191 targets += prom_init_check
192192
193193 clean-files := vmlinux.lds
194+
195+# Force dependency (incbin is bad)
196+$(obj)/vdso32_wrapper.o : $(obj)/vdso32/vdso32.so.dbg
197+$(obj)/vdso64_wrapper.o : $(obj)/vdso64/vdso64.so.dbg
arch/powerpc/kernel/exceptions-64s.S+1−1
@@ -466,7 +466,7 @@ DEFINE_FIXED_SYMBOL(\name\()_common_real) · 465 unmodified lines
466466
467467 ld r10,PACAKMSR(r13) /* get MSR value for kernel */
468468 /* MSR[RI] is clear iff using SRR regs */
469− .if IHSRR == EXC_HV_OR_STD
469+ .if IHSRR_IF_HVMODE
470470 BEGIN_FTR_SECTION
471471 xori r10,r10,MSR_RI
472472 END_FTR_SECTION_IFCLR(CPU_FTR_HVMODE)
arch/powerpc/kernel/head_book3s_32.S+6−3
@@ -457,11 +457,12 @@ InstructionTLBMiss: · 456 unmodified lines
457457 cmplw 0,r1,r3
458458 #endif
459459 mfspr r2, SPRN_SDR1
460− li r1,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_EXEC
460+ li r1,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_EXEC | _PAGE_USER
461461 rlwinm r2, r2, 28, 0xfffff000
462462 #ifdef CONFIG_MODULES
463463 bgt- 112f
464464 lis r2, (swapper_pg_dir - PAGE_OFFSET)@ha /* if kernel address, use */
465+ li r1,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_EXEC
465466 addi r2, r2, (swapper_pg_dir - PAGE_OFFSET)@l /* kernel page table */
466467 #endif
467468 112: rlwimi r2,r3,12,20,29 /* insert top 10 bits of address */
@@ -520,10 +521,11 @@ DataLoadTLBMiss: · 52 unmodified lines
520521 lis r1, TASK_SIZE@h /* check if kernel address */
521522 cmplw 0,r1,r3
522523 mfspr r2, SPRN_SDR1
523− li r1, _PAGE_PRESENT | _PAGE_ACCESSED
524+ li r1, _PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_USER
524525 rlwinm r2, r2, 28, 0xfffff000
525526 bgt- 112f
526527 lis r2, (swapper_pg_dir - PAGE_OFFSET)@ha /* if kernel address, use */
528+ li r1, _PAGE_PRESENT | _PAGE_ACCESSED
527529 addi r2, r2, (swapper_pg_dir - PAGE_OFFSET)@l /* kernel page table */
528530 112: rlwimi r2,r3,12,20,29 /* insert top 10 bits of address */
529531 lwz r2,0(r2) /* get pmd entry */
@@ -597,10 +599,11 @@ DataStoreTLBMiss: · 67 unmodified lines
597599 lis r1, TASK_SIZE@h /* check if kernel address */
598600 cmplw 0,r1,r3
599601 mfspr r2, SPRN_SDR1
600− li r1, _PAGE_RW | _PAGE_DIRTY | _PAGE_PRESENT | _PAGE_ACCESSED
602+ li r1, _PAGE_RW | _PAGE_DIRTY | _PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_USER
601603 rlwinm r2, r2, 28, 0xfffff000
602604 bgt- 112f
603605 lis r2, (swapper_pg_dir - PAGE_OFFSET)@ha /* if kernel address, use */
606+ li r1, _PAGE_RW | _PAGE_DIRTY | _PAGE_PRESENT | _PAGE_ACCESSED
604607 addi r2, r2, (swapper_pg_dir - PAGE_OFFSET)@l /* kernel page table */
605608 112: rlwimi r2,r3,12,20,29 /* insert top 10 bits of address */
606609 lwz r2,0(r2) /* get pmd entry */
arch/powerpc/kernel/interrupt.c+1−2
@@ -149,7 +149,7 @@ notrace long system_call_exception(long r3, long r4, long r5, · 148 unmodified lines
149149 * enabled when the interrupt handler returns (indicating a process-context /
150150 * synchronous interrupt) then irqs_enabled should be true.
151151 */
152−static notrace inline bool __prep_irq_for_enabled_exit(bool clear_ri)
152+static notrace __always_inline bool __prep_irq_for_enabled_exit(bool clear_ri)
153153 {
154154 /* This must be done with RI=1 because tracing may touch vmaps */
155155 trace_hardirqs_on();
@@ -436,7 +436,6 @@ again: · 280 unmodified lines
436436 return ret;
437437 }
438438
439−void unrecoverable_exception(struct pt_regs *regs);
440439 void preempt_schedule_irq(void);
441440
442441 notrace unsigned long interrupt_exit_kernel_prepare(struct pt_regs *regs, unsigned long msr)
arch/powerpc/kernel/ptrace/Makefile+2−2
@@ -6,11 +6,11 @@ · 5 unmodified lines
66 CFLAGS_ptrace-view.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
77
88 obj-y += ptrace.o ptrace-view.o
9−obj-$(CONFIG_PPC_FPU_REGS) += ptrace-fpu.o
9+obj-y += ptrace-fpu.o
1010 obj-$(CONFIG_COMPAT) += ptrace32.o
1111 obj-$(CONFIG_VSX) += ptrace-vsx.o
1212 ifneq ($(CONFIG_VSX),y)
13−obj-$(CONFIG_PPC_FPU_REGS) += ptrace-novsx.o
13+obj-y += ptrace-novsx.o
1414 endif
1515 obj-$(CONFIG_ALTIVEC) += ptrace-altivec.o
1616 obj-$(CONFIG_SPE) += ptrace-spe.o
arch/powerpc/kernel/ptrace/ptrace-decl.h+0−14
@@ -165,22 +165,8 @@ int ptrace_put_reg(struct task_struct *task, int regno, unsigned long data); · 164 unmodified lines
165165 extern const struct user_regset_view user_ppc_native_view;
166166
167167 /* ptrace-fpu */
168−#ifdef CONFIG_PPC_FPU_REGS
169168 int ptrace_get_fpr(struct task_struct *child, int index, unsigned long *data);
170169 int ptrace_put_fpr(struct task_struct *child, int index, unsigned long data);
171−#else
172−static inline int
173−ptrace_get_fpr(struct task_struct *child, int index, unsigned long *data)
174−{
175− return -EIO;
176−}
177−
178−static inline int
179−ptrace_put_fpr(struct task_struct *child, int index, unsigned long data)
180−{
181− return -EIO;
182−}
183−#endif
184170
185171 /* ptrace-(no)adv */
186172 void ppc_gethwdinfo(struct ppc_debug_info *dbginfo);
arch/powerpc/kernel/ptrace/ptrace-fpu.c+10−0
@@ -8,32 +8,42 @@ · 7 unmodified lines
88
99 int ptrace_get_fpr(struct task_struct *child, int index, unsigned long *data)
1010 {
11+#ifdef CONFIG_PPC_FPU_REGS
1112 unsigned int fpidx = index - PT_FPR0;
13+#endif
1214
1315 if (index > PT_FPSCR)
1416 return -EIO;
1517
18+#ifdef CONFIG_PPC_FPU_REGS
1619 flush_fp_to_thread(child);
1720 if (fpidx < (PT_FPSCR - PT_FPR0))
1821 memcpy(data, &child->thread.TS_FPR(fpidx), sizeof(long));
1922 else
2023 *data = child->thread.fp_state.fpscr;
24+#else
25+ *data = 0;
26+#endif
2127
2228 return 0;
2329 }
2430
2531 int ptrace_put_fpr(struct task_struct *child, int index, unsigned long data)
2632 {
33+#ifdef CONFIG_PPC_FPU_REGS
2734 unsigned int fpidx = index - PT_FPR0;
35+#endif
2836
2937 if (index > PT_FPSCR)
3038 return -EIO;
3139
40+#ifdef CONFIG_PPC_FPU_REGS
3241 flush_fp_to_thread(child);
3342 if (fpidx < (PT_FPSCR - PT_FPR0))
3443 memcpy(&child->thread.TS_FPR(fpidx), &data, sizeof(long));
3544 else
3645 child->thread.fp_state.fpscr = data;
46+#endif
3747
3848 return 0;
3949 }
arch/powerpc/kernel/ptrace/ptrace-novsx.c+8−0
@@ -21,12 +21,16 @@ · 20 unmodified lines
2121 int fpr_get(struct task_struct *target, const struct user_regset *regset,
2222 struct membuf to)
2323 {
24+#ifdef CONFIG_PPC_FPU_REGS
2425 BUILD_BUG_ON(offsetof(struct thread_fp_state, fpscr) !=
2526 offsetof(struct thread_fp_state, fpr[32]));
2627
2728 flush_fp_to_thread(target);
2829
2930 return membuf_write(&to, &target->thread.fp_state, 33 * sizeof(u64));
31+#else
32+ return membuf_write(&to, &empty_zero_page, 33 * sizeof(u64));
33+#endif
3034 }
3135
3236 /*
@@ -46,6 +50,7 @@ int fpr_set(struct task_struct *target, const struct user_regset *regset, · 13 unmodified lines
4650 unsigned int pos, unsigned int count,
4751 const void *kbuf, const void __user *ubuf)
4852 {
53+#ifdef CONFIG_PPC_FPU_REGS
4954 BUILD_BUG_ON(offsetof(struct thread_fp_state, fpscr) !=
5055 offsetof(struct thread_fp_state, fpr[32]));
5156
@@ -53,4 +58,7 @@ int fpr_set(struct task_struct *target, const struct user_regset *regset, · 1 unmodified line
5358
5459 return user_regset_copyin(&pos, &count, &kbuf, &ubuf,
5560 &target->thread.fp_state, 0, -1);
61+#else
62+ return 0;
63+#endif
5664 }
arch/powerpc/kernel/ptrace/ptrace-view.c+0−2
@@ -522,13 +522,11 @@ static const struct user_regset native_regsets[] = { · 521 unmodified lines
522522 .size = sizeof(long), .align = sizeof(long),
523523 .regset_get = gpr_get, .set = gpr_set
524524 },
525−#ifdef CONFIG_PPC_FPU_REGS
526525 [REGSET_FPR] = {
527526 .core_note_type = NT_PRFPREG, .n = ELF_NFPREG,
528527 .size = sizeof(double), .align = sizeof(double),
529528 .regset_get = fpr_get, .set = fpr_set
530529 },
531−#endif
532530 #ifdef CONFIG_ALTIVEC
533531 [REGSET_VMX] = {
534532 .core_note_type = NT_PPC_VMX, .n = 34,
arch/powerpc/kernel/signal_32.c+8−12
@@ -775,7 +775,7 @@ int handle_rt_signal32(struct ksignal *ksig, sigset_t *oldset, · 774 unmodified lines
775775 else
776776 prepare_save_user_regs(1);
777777
778− if (!user_write_access_begin(frame, sizeof(*frame)))
778+ if (!user_access_begin(frame, sizeof(*frame)))
779779 goto badframe;
780780
781781 /* Put the siginfo & fill in most of the ucontext */
@@ -809,17 +809,15 @@ int handle_rt_signal32(struct ksignal *ksig, sigset_t *oldset, · 27 unmodified lines
809809 unsafe_put_user(PPC_INST_ADDI + __NR_rt_sigreturn, &mctx->mc_pad[0],
810810 failed);
811811 unsafe_put_user(PPC_INST_SC, &mctx->mc_pad[1], failed);
812+ asm("dcbst %y0; sync; icbi %y0; sync" :: "Z" (mctx->mc_pad[0]));
812813 }
813814 unsafe_put_sigset_t(&frame->uc.uc_sigmask, oldset, failed);
814815
815− user_write_access_end();
816+ user_access_end();
816817
817818 if (copy_siginfo_to_user(&frame->info, &ksig->info))
818819 goto badframe;
819820
820− if (tramp == (unsigned long)mctx->mc_pad)
821− flush_icache_range(tramp, tramp + 2 * sizeof(unsigned long));
822−
823821 regs->link = tramp;
824822
825823 #ifdef CONFIG_PPC_FPU_REGS
@@ -844,7 +842,7 @@ int handle_rt_signal32(struct ksignal *ksig, sigset_t *oldset, · 18 unmodified lines
844842 return 0;
845843
846844 failed:
847− user_write_access_end();
845+ user_access_end();
848846
849847 badframe:
850848 signal_fault(tsk, regs, "handle_rt_signal32", frame);
@@ -879,7 +877,7 @@ int handle_signal32(struct ksignal *ksig, sigset_t *oldset, · 28 unmodified lines
879877 else
880878 prepare_save_user_regs(1);
881879
882− if (!user_write_access_begin(frame, sizeof(*frame)))
880+ if (!user_access_begin(frame, sizeof(*frame)))
883881 goto badframe;
884882 sc = (struct sigcontext __user *) &frame->sctx;
885883
@@ -908,11 +906,9 @@ int handle_signal32(struct ksignal *ksig, sigset_t *oldset, · 22 unmodified lines
908906 /* Set up the sigreturn trampoline: li r0,sigret; sc */
909907 unsafe_put_user(PPC_INST_ADDI + __NR_sigreturn, &mctx->mc_pad[0], failed);
910908 unsafe_put_user(PPC_INST_SC, &mctx->mc_pad[1], failed);
909+ asm("dcbst %y0; sync; icbi %y0; sync" :: "Z" (mctx->mc_pad[0]));
911910 }
912− user_write_access_end();
913−
914− if (tramp == (unsigned long)mctx->mc_pad)
915− flush_icache_range(tramp, tramp + 2 * sizeof(unsigned long));
911+ user_access_end();
916912
917913 regs->link = tramp;
918914
@@ -935,7 +931,7 @@ int handle_signal32(struct ksignal *ksig, sigset_t *oldset, · 16 unmodified lines
935931 return 0;
936932
937933 failed:
938− user_write_access_end();
934+ user_access_end();
939935
940936 badframe:
941937 signal_fault(tsk, regs, "handle_signal32", frame);
arch/powerpc/kernel/traps.c+1−1
@@ -2170,7 +2170,7 @@ DEFINE_INTERRUPT_HANDLER(SPEFloatingPointRoundException) · 2169 unmodified lines
21702170 * in the MSR is 0. This indicates that SRR0/1 are live, and that
21712171 * we therefore lost state by taking this exception.
21722172 */
2173−DEFINE_INTERRUPT_HANDLER(unrecoverable_exception)
2173+void unrecoverable_exception(struct pt_regs *regs)
21742174 {
21752175 pr_emerg("Unrecoverable exception %lx at %lx (msr=%lx)\n",
21762176 regs->trap, regs->nip, regs->msr);
arch/powerpc/kernel/vdso32/gettimeofday.S+11−0
@@ -65,3 +65,14 @@ V_FUNCTION_END(__kernel_clock_getres) · 64 unmodified lines
6565 V_FUNCTION_BEGIN(__kernel_time)
6666 cvdso_call_time __c_kernel_time
6767 V_FUNCTION_END(__kernel_time)
68+
69+/* Routines for restoring integer registers, called by the compiler. */
70+/* Called with r11 pointing to the stack header word of the caller of the */
71+/* function, just beyond the end of the integer restore area. */
72+_GLOBAL(_restgpr_31_x)
73+_GLOBAL(_rest32gpr_31_x)
74+ lwz r0,4(r11)
75+ lwz r31,-4(r11)
76+ mtlr r0
77+ mr r1,r11
78+ blr
arch/powerpc/lib/sstep.c+2−2
@@ -904,7 +904,7 @@ static nokprobe_inline int do_vsx_load(struct instruction_op *op, · 903 unmodified lines
904904 if (!address_ok(regs, ea, size) || copy_mem_in(mem, ea, size, regs))
905905 return -EFAULT;
906906
907− nr_vsx_regs = size / sizeof(__vector128);
907+ nr_vsx_regs = max(1ul, size / sizeof(__vector128));
908908 emulate_vsx_load(op, buf, mem, cross_endian);
909909 preempt_disable();
910910 if (reg < 32) {
@@ -951,7 +951,7 @@ static nokprobe_inline int do_vsx_store(struct instruction_op *op, · 40 unmodified lines
951951 if (!address_ok(regs, ea, size))
952952 return -EFAULT;
953953
954− nr_vsx_regs = size / sizeof(__vector128);
954+ nr_vsx_regs = max(1ul, size / sizeof(__vector128));
955955 preempt_disable();
956956 if (reg < 32) {
957957 /* FP regs + extensions */
arch/powerpc/perf/core-book3s.c+2−2
@@ -222,7 +222,7 @@ static inline void perf_get_data_addr(struct perf_event *event, struct pt_regs * · 221 unmodified lines
222222 if (!(mmcra & MMCRA_SAMPLE_ENABLE) || sdar_valid)
223223 *addrp = mfspr(SPRN_SDAR);
224224
225− if (is_kernel_addr(mfspr(SPRN_SDAR)) && perf_allow_kernel(&event->attr) != 0)
225+ if (is_kernel_addr(mfspr(SPRN_SDAR)) && event->attr.exclude_kernel)
226226 *addrp = 0;
227227 }
228228
@@ -507,7 +507,7 @@ static void power_pmu_bhrb_read(struct perf_event *event, struct cpu_hw_events * · 278 unmodified lines
507507 * addresses, hence include a check before filtering code
508508 */
509509 if (!(ppmu->flags & PPMU_ARCH_31) &&
510− is_kernel_addr(addr) && perf_allow_kernel(&event->attr) != 0)
510+ is_kernel_addr(addr) && event->attr.exclude_kernel)
511511 continue;
512512
513513 /* Branches are read most recent first (ie. mfbhrb 0 is
arch/powerpc/platforms/pseries/lpar.c+2−1
@@ -887,7 +887,8 @@ static long pSeries_lpar_hpte_updatepp(unsigned long slot, · 886 unmodified lines
887887
888888 want_v = hpte_encode_avpn(vpn, psize, ssize);
889889
890− flags = (newpp & 7) | H_AVPN;
890+ flags = (newpp & (HPTE_R_PP | HPTE_R_N | HPTE_R_KEY_LO)) | H_AVPN;
891+ flags |= (newpp & HPTE_R_KEY_HI) >> 48;
891892 if (mmu_has_feature(MMU_FTR_KERNEL_RO))
892893 /* Move pp0 into bit 8 (IBM 55) */
893894 flags |= (newpp & HPTE_R_PP0) >> 55;
arch/powerpc/platforms/pseries/mobility.c+44−4
@@ -452,12 +452,28 @@ static int do_suspend(void) · 451 unmodified lines
452452 return ret;
453453 }
454454
455+/**
456+ * struct pseries_suspend_info - State shared between CPUs for join/suspend.
457+ * @counter: Threads are to increment this upon resuming from suspend
458+ * or if an error is received from H_JOIN. The thread which performs
459+ * the first increment (i.e. sets it to 1) is responsible for
460+ * waking the other threads.
461+ * @done: False if join/suspend is in progress. True if the operation is
462+ * complete (successful or not).
463+ */
464+struct pseries_suspend_info {
465+ atomic_t counter;
466+ bool done;
467+};
468+
455469 static int do_join(void *arg)
456470 {
457− atomic_t *counter = arg;
471+ struct pseries_suspend_info *info = arg;
472+ atomic_t *counter = &info->counter;
458473 long hvrc;
459474 int ret;
460475
476+retry:
461477 /* Must ensure MSR.EE off for H_JOIN. */
462478 hard_irq_disable();
463479 hvrc = plpar_hcall_norets(H_JOIN);
@@ -473,8 +489,20 @@ static int do_join(void *arg) · 9 unmodified lines
473489 case H_SUCCESS:
474490 /*
475491 * The suspend is complete and this cpu has received a
476− * prod.
492+ * prod, or we've received a stray prod from unrelated
493+ * code (e.g. paravirt spinlocks) and we need to join
494+ * again.
495+ *
496+ * This barrier orders the return from H_JOIN above vs
497+ * the load of info->done. It pairs with the barrier
498+ * in the wakeup/prod path below.
477499 */
500+ smp_mb();
501+ if (READ_ONCE(info->done) == false) {
502+ pr_info_ratelimited("premature return from H_JOIN on CPU %i, retrying",
503+ smp_processor_id());
504+ goto retry;
505+ }
478506 ret = 0;
479507 break;
480508 case H_BAD_MODE:
@@ -488,6 +516,13 @@ static int do_join(void *arg) · 7 unmodified lines
488516
489517 if (atomic_inc_return(counter) == 1) {
490518 pr_info("CPU %u waking all threads\n", smp_processor_id());
519+ WRITE_ONCE(info->done, true);
520+ /*
521+ * This barrier orders the store to info->done vs subsequent
522+ * H_PRODs to wake the other CPUs. It pairs with the barrier
523+ * in the H_SUCCESS case above.
524+ */
525+ smp_mb();
491526 prod_others();
492527 }
493528 /*
@@ -535,11 +570,16 @@ static int pseries_suspend(u64 handle) · 41 unmodified lines
535570 int ret;
536571
537572 while (true) {
538− atomic_t counter = ATOMIC_INIT(0);
573+ struct pseries_suspend_info info;
539574 unsigned long vasi_state;
540575 int vasi_err;
541576
542− ret = stop_machine(do_join, &counter, cpu_online_mask);
577+ info = (struct pseries_suspend_info) {
578+ .counter = ATOMIC_INIT(0),
579+ .done = false,
580+ };
581+
582+ ret = stop_machine(do_join, &info, cpu_online_mask);
543583 if (ret == 0)
544584 break;
545585 /*
arch/powerpc/platforms/pseries/msi.c+23−2
@@ -4,6 +4,7 @@ · 3 unmodified lines
44 * Copyright 2006-2007 Michael Ellerman, IBM Corp.
55 */
66
7+#include <linux/crash_dump.h>
78 #include <linux/device.h>
89 #include <linux/irq.h>
910 #include <linux/msi.h>
@@ -458,8 +459,28 @@ again: · 448 unmodified lines
458459 return hwirq;
459460 }
460461
461− virq = irq_create_mapping_affinity(NULL, hwirq,
462− entry->affinity);
462+ /*
463+ * Depending on the number of online CPUs in the original
464+ * kernel, it is likely for CPU #0 to be offline in a kdump
465+ * kernel. The associated IRQs in the affinity mappings
466+ * provided by irq_create_affinity_masks() are thus not
467+ * started by irq_startup(), as per-design for managed IRQs.
468+ * This can be a problem with multi-queue block devices driven
469+ * by blk-mq : such a non-started IRQ is very likely paired
470+ * with the single queue enforced by blk-mq during kdump (see
471+ * blk_mq_alloc_tag_set()). This causes the device to remain
472+ * silent and likely hangs the guest at some point.
473+ *
474+ * We don't really care for fine-grained affinity when doing
475+ * kdump actually : simply ignore the pre-computed affinity
476+ * masks in this case and let the default mask with all CPUs
477+ * be used when creating the IRQ mappings.
478+ */
479+ if (is_kdump_kernel())
480+ virq = irq_create_mapping(NULL, hwirq);
481+ else
482+ virq = irq_create_mapping_affinity(NULL, hwirq,
483+ entry->affinity);
463484
464485 if (!virq) {
465486 pr_debug("rtas_msi: Failed mapping hwirq %d\n", hwirq);
arch/powerpc/platforms/pseries/vio.c+3−4
@@ -1261,7 +1261,6 @@ static int vio_bus_remove(struct device *dev) · 1260 unmodified lines
12611261 struct vio_dev *viodev = to_vio_dev(dev);
12621262 struct vio_driver *viodrv = to_vio_driver(dev->driver);
12631263 struct device *devptr;
1264− int ret = 1;
12651264
12661265 /*
12671266 * Hold a reference to the device after the remove function is called
@@ -1270,13 +1269,13 @@ static int vio_bus_remove(struct device *dev) · 2 unmodified lines
12701269 devptr = get_device(dev);
12711270
12721271 if (viodrv->remove)
1273− ret = viodrv->remove(viodev);
1272+ viodrv->remove(viodev);
12741273
1275− if (!ret && firmware_has_feature(FW_FEATURE_CMO))
1274+ if (firmware_has_feature(FW_FEATURE_CMO))
12761275 vio_cmo_bus_remove(viodev);
12771276
12781277 put_device(devptr);
1279− return ret;
1278+ return 0;
12801279 }
12811280
12821281 /**
arch/riscv/Kconfig+3−3
@@ -93,7 +93,6 @@ config RISCV · 92 unmodified lines
9393 select PCI_MSI if PCI
9494 select RISCV_INTC
9595 select RISCV_TIMER if RISCV_SBI
96− select SPARSEMEM_STATIC if 32BIT
9796 select SPARSE_IRQ
9897 select SYSCTL_EXCEPTION_TRACE
9998 select THREAD_INFO_IN_TASK
@@ -154,7 +153,8 @@ config ARCH_FLATMEM_ENABLE · 54 unmodified lines
154153 config ARCH_SPARSEMEM_ENABLE
155154 def_bool y
156155 depends on MMU
157− select SPARSEMEM_VMEMMAP_ENABLE
156+ select SPARSEMEM_STATIC if 32BIT && SPARSEMEM
157+ select SPARSEMEM_VMEMMAP_ENABLE if 64BIT
158158
159159 config ARCH_SELECT_MEMORY_MODEL
160160 def_bool ARCH_SPARSEMEM_ENABLE
@@ -314,7 +314,7 @@ endchoice · 153 unmodified lines
314314 # Common NUMA Features
315315 config NUMA
316316 bool "NUMA Memory Allocation and Scheduler Support"
317− depends on SMP
317+ depends on SMP && MMU
318318 select GENERIC_ARCH_NUMA
319319 select OF_NUMA
320320 select ARCH_SUPPORTS_NUMA_BALANCING
arch/riscv/Kconfig.socs+2−0
@@ -31,6 +31,8 @@ config SOC_CANAAN · 30 unmodified lines
3131 select SIFIVE_PLIC
3232 select ARCH_HAS_RESET_CONTROLLER
3333 select PINCTRL
34+ select COMMON_CLK
35+ select COMMON_CLK_K210
3436 help
3537 This enables support for Canaan Kendryte K210 SoC platform hardware.
3638
arch/riscv/include/asm/asm-prototypes.h+16−0
@@ -9,4 +9,20 @@ long long __lshrti3(long long a, int b); · 8 unmodified lines
99 long long __ashrti3(long long a, int b);
1010 long long __ashlti3(long long a, int b);
1111
12+
13+#define DECLARE_DO_ERROR_INFO(name) asmlinkage void name(struct pt_regs *regs)
14+
15+DECLARE_DO_ERROR_INFO(do_trap_unknown);
16+DECLARE_DO_ERROR_INFO(do_trap_insn_misaligned);
17+DECLARE_DO_ERROR_INFO(do_trap_insn_fault);
18+DECLARE_DO_ERROR_INFO(do_trap_insn_illegal);
19+DECLARE_DO_ERROR_INFO(do_trap_load_fault);
20+DECLARE_DO_ERROR_INFO(do_trap_load_misaligned);
21+DECLARE_DO_ERROR_INFO(do_trap_store_misaligned);
22+DECLARE_DO_ERROR_INFO(do_trap_store_fault);
23+DECLARE_DO_ERROR_INFO(do_trap_ecall_u);
24+DECLARE_DO_ERROR_INFO(do_trap_ecall_s);
25+DECLARE_DO_ERROR_INFO(do_trap_ecall_m);
26+DECLARE_DO_ERROR_INFO(do_trap_break);
27+
1228 #endif /* _ASM_RISCV_PROTOTYPES_H */
arch/riscv/include/asm/irq.h+2−0
@@ -12,4 +12,6 @@ · 11 unmodified lines
1212
1313 #include <asm-generic/irq.h>
1414
15+extern void __init init_IRQ(void);
16+
1517 #endif /* _ASM_RISCV_IRQ_H */
arch/riscv/include/asm/processor.h+1−0
@@ -71,6 +71,7 @@ int riscv_of_processor_hartid(struct device_node *node); · 70 unmodified lines
7171 int riscv_of_parent_hartid(struct device_node *node);
7272
7373 extern void riscv_fill_hwcap(void);
74+extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src);
7475
7576 #endif /* __ASSEMBLY__ */
7677
arch/riscv/include/asm/ptrace.h+5−0
@@ -119,6 +119,11 @@ extern int regs_query_register_offset(const char *name); · 118 unmodified lines
119119 extern unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs,
120120 unsigned int n);
121121
122+void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
123+ unsigned long frame_pointer);
124+int do_syscall_trace_enter(struct pt_regs *regs);
125+void do_syscall_trace_exit(struct pt_regs *regs);
126+
122127 /**
123128 * regs_get_register() - get register value from its offset
124129 * @regs: pt_regs from which register value is gotten
arch/riscv/include/asm/sbi.h+2−2
@@ -51,10 +51,10 @@ enum sbi_ext_rfence_fid { · 50 unmodified lines
5151 SBI_EXT_RFENCE_REMOTE_FENCE_I = 0,
5252 SBI_EXT_RFENCE_REMOTE_SFENCE_VMA,
5353 SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID,
54− SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA,
5554 SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID,
56− SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA,
55+ SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA,
5756 SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID,
57+ SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA,
5858 };
5959
6060 enum sbi_ext_hsm_fid {
arch/riscv/include/asm/timex.h+2−0
@@ -88,4 +88,6 @@ static inline int read_current_timer(unsigned long *timer_val) · 87 unmodified lines
8888 return 0;
8989 }
9090
91+extern void time_init(void);
92+
9193 #endif /* _ASM_RISCV_TIMEX_H */
arch/riscv/include/asm/uaccess.h+5−2
@@ -306,7 +306,9 @@ do { \ · 305 unmodified lines
306306 * data types like structures or arrays.
307307 *
308308 * @ptr must have pointer-to-simple-variable type, and @x must be assignable
309− * to the result of dereferencing @ptr.
309+ * to the result of dereferencing @ptr. The value of @x is copied to avoid
310+ * re-ordering where @x is evaluated inside the block that enables user-space
311+ * access (thus bypassing user space protection if @x is a function).
310312 *
311313 * Caller must check the pointer with access_ok() before calling this
312314 * function.
@@ -316,12 +318,13 @@ do { \ · 3 unmodified lines
316318 #define __put_user(x, ptr) \
317319 ({ \
318320 __typeof__(*(ptr)) __user *__gu_ptr = (ptr); \
321+ __typeof__(*__gu_ptr) __val = (x); \
319322 long __pu_err = 0; \
320323 \
321324 __chk_user_ptr(__gu_ptr); \
322325 \
323326 __enable_user_access(); \
324− __put_user_nocheck(x, __gu_ptr, __pu_err); \
327+ __put_user_nocheck(__val, __gu_ptr, __pu_err); \
325328 __disable_user_access(); \
326329 \
327330 __pu_err; \
arch/riscv/kernel/Makefile+1−0
@@ -8,6 +8,7 @@ CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE) · 7 unmodified lines
88 CFLAGS_REMOVE_patch.o = $(CC_FLAGS_FTRACE)
99 CFLAGS_REMOVE_sbi.o = $(CC_FLAGS_FTRACE)
1010 endif
11+CFLAGS_syscall_table.o += $(call cc-option,-Wno-override-init,)
1112
1213 extra-y += head.o
1314 extra-y += vmlinux.lds
arch/riscv/kernel/entry.S+4−0
@@ -130,6 +130,9 @@ skip_context_tracking: · 129 unmodified lines
130130 */
131131 andi t0, s1, SR_PIE
132132 beqz t0, 1f
133+ /* kprobes, entered via ebreak, must have interrupts disabled. */
134+ li t0, EXC_BREAKPOINT
135+ beq s4, t0, 1f
133136 #ifdef CONFIG_TRACE_IRQFLAGS
134137 call trace_hardirqs_on
135138 #endif
@@ -447,6 +450,7 @@ ENDPROC(__switch_to) · 311 unmodified lines
447450 #endif
448451
449452 .section ".rodata"
453+ .align LGREG
450454 /* Exception vector table */
451455 ENTRY(excp_vect_table)
452456 RISCV_PTR do_trap_insn_misaligned
arch/riscv/kernel/probes/ftrace.c+20−9
@@ -2,39 +2,47 @@ · 1 unmodified line
22
33 #include <linux/kprobes.h>
44
5−/* Ftrace callback handler for kprobes -- called under preepmt disabed */
5+/* Ftrace callback handler for kprobes -- called under preepmt disabled */
66 void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
7− struct ftrace_ops *ops, struct ftrace_regs *regs)
7+ struct ftrace_ops *ops, struct ftrace_regs *fregs)
88 {
99 struct kprobe *p;
10+ struct pt_regs *regs;
1011 struct kprobe_ctlblk *kcb;
12+ int bit;
1113
14+ bit = ftrace_test_recursion_trylock(ip, parent_ip);
15+ if (bit < 0)
16+ return;
17+
18+ preempt_disable_notrace();
1219 p = get_kprobe((kprobe_opcode_t *)ip);
1320 if (unlikely(!p) || kprobe_disabled(p))
14− return;
21+ goto out;
1522
23+ regs = ftrace_get_regs(fregs);
1624 kcb = get_kprobe_ctlblk();
1725 if (kprobe_running()) {
1826 kprobes_inc_nmissed_count(p);
1927 } else {
20− unsigned long orig_ip = instruction_pointer(&(regs->regs));
28+ unsigned long orig_ip = instruction_pointer(regs);
2129
22− instruction_pointer_set(&(regs->regs), ip);
30+ instruction_pointer_set(regs, ip);
2331
2432 __this_cpu_write(current_kprobe, p);
2533 kcb->kprobe_status = KPROBE_HIT_ACTIVE;
26− if (!p->pre_handler || !p->pre_handler(p, &(regs->regs))) {
34+ if (!p->pre_handler || !p->pre_handler(p, regs)) {
2735 /*
2836 * Emulate singlestep (and also recover regs->pc)
2937 * as if there is a nop
3038 */
31− instruction_pointer_set(&(regs->regs),
39+ instruction_pointer_set(regs,
3240 (unsigned long)p->addr + MCOUNT_INSN_SIZE);
3341 if (unlikely(p->post_handler)) {
3442 kcb->kprobe_status = KPROBE_HIT_SSDONE;
35− p->post_handler(p, &(regs->regs), 0);
43+ p->post_handler(p, regs, 0);
3644 }
37− instruction_pointer_set(&(regs->regs), orig_ip);
45+ instruction_pointer_set(regs, orig_ip);
3846 }
3947
4048 /*
@@ -43,6 +51,9 @@ void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip, · 2 unmodified lines
4351 */
4452 __this_cpu_write(current_kprobe, NULL);
4553 }
54+out:
55+ preempt_enable_notrace();
56+ ftrace_test_recursion_unlock(bit);
4657 }
4758 NOKPROBE_SYMBOL(kprobe_ftrace_handler);
4859
arch/riscv/kernel/probes/kprobes.c+1−2
@@ -256,8 +256,7 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, unsigned int trapnr) · 255 unmodified lines
256256 * normal page fault.
257257 */
258258 regs->epc = (unsigned long) cur->addr;
259− if (!instruction_pointer(regs))
260− BUG();
259+ BUG_ON(!instruction_pointer(regs));
261260
262261 if (kcb->kprobe_status == KPROBE_REENTER)
263262 restore_previous_kprobe(kcb);
arch/riscv/kernel/process.c+1−0
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 #include <linux/cpu.h>
1111 #include <linux/kernel.h>
1212 #include <linux/sched.h>
13+#include <linux/sched/debug.h>
1314 #include <linux/sched/task_stack.h>
1415 #include <linux/tick.h>
1516 #include <linux/ptrace.h>
arch/riscv/kernel/sbi.c+1−1
@@ -116,7 +116,7 @@ void sbi_clear_ipi(void) · 115 unmodified lines
116116 EXPORT_SYMBOL(sbi_clear_ipi);
117117
118118 /**
119− * sbi_set_timer_v01() - Program the timer for next timer event.
119+ * __sbi_set_timer_v01() - Program the timer for next timer event.
120120 * @stime_value: The value after which next timer event should fire.
121121 *
122122 * Return: None
arch/riscv/kernel/setup.c+2−1
@@ -147,7 +147,8 @@ static void __init init_resources(void) · 146 unmodified lines
147147 bss_res.end = __pa_symbol(__bss_stop) - 1;
148148 bss_res.flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY;
149149
150− mem_res_sz = (memblock.memory.cnt + memblock.reserved.cnt) * sizeof(*mem_res);
150+ /* + 1 as memblock_alloc() might increase memblock.reserved.cnt */
151+ mem_res_sz = (memblock.memory.cnt + memblock.reserved.cnt + 1) * sizeof(*mem_res);
151152 mem_res = memblock_alloc(mem_res_sz, SMP_CACHE_BYTES);
152153 if (!mem_res)
153154 panic("%s: Failed to allocate %zu bytes\n", __func__, mem_res_sz);
arch/riscv/kernel/stacktrace.c+1−1
@@ -14,7 +14,7 @@ · 13 unmodified lines
1414
1515 #include <asm/stacktrace.h>
1616
17−register const unsigned long sp_in_global __asm__("sp");
17+register unsigned long sp_in_global __asm__("sp");
1818
1919 #ifdef CONFIG_FRAME_POINTER
2020
arch/riscv/kernel/time.c+1−0
@@ -9,6 +9,7 @@ · 8 unmodified lines
99 #include <linux/delay.h>
1010 #include <asm/sbi.h>
1111 #include <asm/processor.h>
12+#include <asm/timex.h>
1213
1314 unsigned long riscv_timebase;
1415 EXPORT_SYMBOL_GPL(riscv_timebase);
arch/riscv/kernel/traps.c+2−0
@@ -17,6 +17,7 @@ · 16 unmodified lines
1717 #include <linux/module.h>
1818 #include <linux/irq.h>
1919
20+#include <asm/asm-prototypes.h>
2021 #include <asm/bug.h>
2122 #include <asm/processor.h>
2223 #include <asm/ptrace.h>
@@ -177,6 +178,7 @@ asmlinkage __visible void do_trap_break(struct pt_regs *regs) · 154 unmodified lines
177178 else
178179 die(regs, "Kernel BUG");
179180 }
181+NOKPROBE_SYMBOL(do_trap_break);
180182
181183 #ifdef CONFIG_GENERIC_BUG
182184 int is_valid_bugaddr(unsigned long pc)
arch/riscv/mm/fault.c+1−0
@@ -328,3 +328,4 @@ good_area: · 327 unmodified lines
328328 }
329329 return;
330330 }
331+NOKPROBE_SYMBOL(do_page_fault);
arch/riscv/mm/kasan_init.c+4−2
@@ -155,7 +155,7 @@ static void __init kasan_populate(void *start, void *end) · 154 unmodified lines
155155 memset(start, KASAN_SHADOW_INIT, end - start);
156156 }
157157
158−void __init kasan_shallow_populate(void *start, void *end)
158+static void __init kasan_shallow_populate(void *start, void *end)
159159 {
160160 unsigned long vaddr = (unsigned long)start & PAGE_MASK;
161161 unsigned long vend = PAGE_ALIGN((unsigned long)end);
@@ -187,6 +187,8 @@ void __init kasan_shallow_populate(void *start, void *end) · 25 unmodified lines
187187 }
188188 vaddr += PAGE_SIZE;
189189 }
190+
191+ local_flush_tlb_all();
190192 }
191193
192194 void __init kasan_init(void)
@@ -214,7 +216,7 @@ void __init kasan_init(void) · 21 unmodified lines
214216 break;
215217
216218 kasan_populate(kasan_mem_to_shadow(start), kasan_mem_to_shadow(end));
217− };
219+ }
218220
219221 for (i = 0; i < PTRS_PER_PTE; i++)
220222 set_pte(&kasan_early_shadow_pte[i],
arch/s390/configs/debug_defconfig+3−13
@@ -275,9 +275,9 @@ CONFIG_IP_VS_DH=m · 274 unmodified lines
275275 CONFIG_IP_VS_SH=m
276276 CONFIG_IP_VS_SED=m
277277 CONFIG_IP_VS_NQ=m
278+CONFIG_IP_VS_TWOS=m
278279 CONFIG_IP_VS_FTP=m
279280 CONFIG_IP_VS_PE_SIP=m
280−CONFIG_NF_TABLES_IPV4=y
281281 CONFIG_NFT_FIB_IPV4=m
282282 CONFIG_NF_TABLES_ARP=y
283283 CONFIG_IP_NF_IPTABLES=m
@@ -298,7 +298,6 @@ CONFIG_IP_NF_SECURITY=m · 14 unmodified lines
298298 CONFIG_IP_NF_ARPTABLES=m
299299 CONFIG_IP_NF_ARPFILTER=m
300300 CONFIG_IP_NF_ARP_MANGLE=m
301−CONFIG_NF_TABLES_IPV6=y
302301 CONFIG_NFT_FIB_IPV6=m
303302 CONFIG_IP6_NF_IPTABLES=m
304303 CONFIG_IP6_NF_MATCH_AH=m
@@ -481,7 +480,6 @@ CONFIG_NLMON=m · 176 unmodified lines
481480 # CONFIG_NET_VENDOR_AQUANTIA is not set
482481 # CONFIG_NET_VENDOR_ARC is not set
483482 # CONFIG_NET_VENDOR_ATHEROS is not set
484−# CONFIG_NET_VENDOR_AURORA is not set
485483 # CONFIG_NET_VENDOR_BROADCOM is not set
486484 # CONFIG_NET_VENDOR_BROCADE is not set
487485 # CONFIG_NET_VENDOR_CADENCE is not set
@@ -581,7 +579,6 @@ CONFIG_VIRTIO_BALLOON=m · 93 unmodified lines
581579 CONFIG_VIRTIO_INPUT=y
582580 CONFIG_VHOST_NET=m
583581 CONFIG_VHOST_VSOCK=m
584−# CONFIG_SURFACE_PLATFORMS is not set
585582 CONFIG_S390_CCW_IOMMU=y
586583 CONFIG_S390_AP_IOMMU=y
587584 CONFIG_EXT4_FS=y
@@ -635,6 +632,7 @@ CONFIG_NTFS_RW=y · 47 unmodified lines
635632 CONFIG_PROC_KCORE=y
636633 CONFIG_TMPFS=y
637634 CONFIG_TMPFS_POSIX_ACL=y
635+CONFIG_TMPFS_INODE64=y
638636 CONFIG_HUGETLBFS=y
639637 CONFIG_CONFIGFS_FS=m
640638 CONFIG_ECRYPT_FS=m
@@ -714,12 +712,8 @@ CONFIG_CRYPTO_VMAC=m · 73 unmodified lines
714712 CONFIG_CRYPTO_CRC32=m
715713 CONFIG_CRYPTO_BLAKE2S=m
716714 CONFIG_CRYPTO_MICHAEL_MIC=m
717−CONFIG_CRYPTO_RMD128=m
718715 CONFIG_CRYPTO_RMD160=m
719−CONFIG_CRYPTO_RMD256=m
720−CONFIG_CRYPTO_RMD320=m
721716 CONFIG_CRYPTO_SHA3=m
722−CONFIG_CRYPTO_TGR192=m
723717 CONFIG_CRYPTO_WP512=m
724718 CONFIG_CRYPTO_AES_TI=m
725719 CONFIG_CRYPTO_ANUBIS=m
@@ -731,7 +725,6 @@ CONFIG_CRYPTO_CAST6=m · 5 unmodified lines
731725 CONFIG_CRYPTO_DES=m
732726 CONFIG_CRYPTO_FCRYPT=m
733727 CONFIG_CRYPTO_KHAZAD=m
734−CONFIG_CRYPTO_SALSA20=m
735728 CONFIG_CRYPTO_SEED=m
736729 CONFIG_CRYPTO_SERPENT=m
737730 CONFIG_CRYPTO_SM4=m
@@ -796,12 +789,9 @@ CONFIG_DEBUG_OBJECTS_RCU_HEAD=y · 58 unmodified lines
796789 CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
797790 CONFIG_SLUB_DEBUG_ON=y
798791 CONFIG_SLUB_STATS=y
799−CONFIG_DEBUG_KMEMLEAK=y
800−CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y
801792 CONFIG_DEBUG_STACK_USAGE=y
802793 CONFIG_DEBUG_VM=y
803794 CONFIG_DEBUG_VM_VMACACHE=y
804−CONFIG_DEBUG_VM_RB=y
805795 CONFIG_DEBUG_VM_PGFLAGS=y
806796 CONFIG_DEBUG_MEMORY_INIT=y
807797 CONFIG_MEMORY_NOTIFIER_ERROR_INJECT=m
@@ -838,6 +828,7 @@ CONFIG_BPF_KPROBE_OVERRIDE=y · 30 unmodified lines
838828 CONFIG_HIST_TRIGGERS=y
839829 CONFIG_FTRACE_STARTUP_TEST=y
840830 # CONFIG_EVENT_TRACE_STARTUP_TEST is not set
831+CONFIG_DEBUG_ENTRY=y
841832 CONFIG_NOTIFIER_ERROR_INJECTION=m
842833 CONFIG_NETDEV_NOTIFIER_ERROR_INJECT=m
843834 CONFIG_FAULT_INJECTION=y
@@ -861,4 +852,3 @@ CONFIG_PERCPU_TEST=m · 17 unmodified lines
861852 CONFIG_ATOMIC64_SELFTEST=y
862853 CONFIG_TEST_BITOPS=m
863854 CONFIG_TEST_BPF=m
864−CONFIG_DEBUG_ENTRY=y
arch/s390/configs/defconfig+2−9
@@ -266,9 +266,9 @@ CONFIG_IP_VS_DH=m · 265 unmodified lines
266266 CONFIG_IP_VS_SH=m
267267 CONFIG_IP_VS_SED=m
268268 CONFIG_IP_VS_NQ=m
269+CONFIG_IP_VS_TWOS=m
269270 CONFIG_IP_VS_FTP=m
270271 CONFIG_IP_VS_PE_SIP=m
271−CONFIG_NF_TABLES_IPV4=y
272272 CONFIG_NFT_FIB_IPV4=m
273273 CONFIG_NF_TABLES_ARP=y
274274 CONFIG_IP_NF_IPTABLES=m
@@ -289,7 +289,6 @@ CONFIG_IP_NF_SECURITY=m · 14 unmodified lines
289289 CONFIG_IP_NF_ARPTABLES=m
290290 CONFIG_IP_NF_ARPFILTER=m
291291 CONFIG_IP_NF_ARP_MANGLE=m
292−CONFIG_NF_TABLES_IPV6=y
293292 CONFIG_NFT_FIB_IPV6=m
294293 CONFIG_IP6_NF_IPTABLES=m
295294 CONFIG_IP6_NF_MATCH_AH=m
@@ -473,7 +472,6 @@ CONFIG_NLMON=m · 177 unmodified lines
473472 # CONFIG_NET_VENDOR_AQUANTIA is not set
474473 # CONFIG_NET_VENDOR_ARC is not set
475474 # CONFIG_NET_VENDOR_ATHEROS is not set
476−# CONFIG_NET_VENDOR_AURORA is not set
477475 # CONFIG_NET_VENDOR_BROADCOM is not set
478476 # CONFIG_NET_VENDOR_BROCADE is not set
479477 # CONFIG_NET_VENDOR_CADENCE is not set
@@ -573,7 +571,6 @@ CONFIG_VIRTIO_BALLOON=m · 93 unmodified lines
573571 CONFIG_VIRTIO_INPUT=y
574572 CONFIG_VHOST_NET=m
575573 CONFIG_VHOST_VSOCK=m
576−# CONFIG_SURFACE_PLATFORMS is not set
577574 CONFIG_S390_CCW_IOMMU=y
578575 CONFIG_S390_AP_IOMMU=y
579576 CONFIG_EXT4_FS=y
@@ -623,6 +620,7 @@ CONFIG_NTFS_RW=y · 43 unmodified lines
623620 CONFIG_PROC_KCORE=y
624621 CONFIG_TMPFS=y
625622 CONFIG_TMPFS_POSIX_ACL=y
623+CONFIG_TMPFS_INODE64=y
626624 CONFIG_HUGETLBFS=y
627625 CONFIG_CONFIGFS_FS=m
628626 CONFIG_ECRYPT_FS=m
@@ -703,12 +701,8 @@ CONFIG_CRYPTO_VMAC=m · 74 unmodified lines
703701 CONFIG_CRYPTO_CRC32=m
704702 CONFIG_CRYPTO_BLAKE2S=m
705703 CONFIG_CRYPTO_MICHAEL_MIC=m
706−CONFIG_CRYPTO_RMD128=m
707704 CONFIG_CRYPTO_RMD160=m
708−CONFIG_CRYPTO_RMD256=m
709−CONFIG_CRYPTO_RMD320=m
710705 CONFIG_CRYPTO_SHA3=m
711−CONFIG_CRYPTO_TGR192=m
712706 CONFIG_CRYPTO_WP512=m
713707 CONFIG_CRYPTO_AES_TI=m
714708 CONFIG_CRYPTO_ANUBIS=m
@@ -720,7 +714,6 @@ CONFIG_CRYPTO_CAST6=m · 5 unmodified lines
720714 CONFIG_CRYPTO_DES=m
721715 CONFIG_CRYPTO_FCRYPT=m
722716 CONFIG_CRYPTO_KHAZAD=m
723−CONFIG_CRYPTO_SALSA20=m
724717 CONFIG_CRYPTO_SEED=m
725718 CONFIG_CRYPTO_SERPENT=m
726719 CONFIG_CRYPTO_SM4=m
arch/s390/configs/zfcpdump_defconfig+0−3
@@ -26,7 +26,6 @@ CONFIG_CRASH_DUMP=y · 25 unmodified lines
2626 # CONFIG_SECCOMP is not set
2727 # CONFIG_GCC_PLUGINS is not set
2828 CONFIG_PARTITION_ADVANCED=y
29−CONFIG_IBM_PARTITION=y
3029 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
3130 # CONFIG_COMPACTION is not set
3231 # CONFIG_MIGRATION is not set
@@ -61,11 +60,9 @@ CONFIG_RAW_DRIVER=y · 28 unmodified lines
6160 # CONFIG_HID is not set
6261 # CONFIG_VIRTIO_MENU is not set
6362 # CONFIG_VHOST_MENU is not set
64−# CONFIG_SURFACE_PLATFORMS is not set
6563 # CONFIG_IOMMU_SUPPORT is not set
6664 # CONFIG_DNOTIFY is not set
6765 # CONFIG_INOTIFY_USER is not set
68−CONFIG_CONFIGFS_FS=y
6966 # CONFIG_MISC_FILESYSTEMS is not set
7067 # CONFIG_NETWORK_FILESYSTEMS is not set
7168 CONFIG_LSM="yama,loadpin,safesetid,integrity"
arch/s390/include/asm/idle.h+6−6
@@ -14,12 +14,12 @@ · 13 unmodified lines
1414
1515 struct s390_idle_data {
1616 seqcount_t seqcount;
17− unsigned long long idle_count;
18− unsigned long long idle_time;
19− unsigned long long clock_idle_enter;
20− unsigned long long clock_idle_exit;
21− unsigned long long timer_idle_enter;
22− unsigned long long timer_idle_exit;
17+ unsigned long idle_count;
18+ unsigned long idle_time;
19+ unsigned long clock_idle_enter;
20+ unsigned long clock_idle_exit;
21+ unsigned long timer_idle_enter;
22+ unsigned long timer_idle_exit;
2323 unsigned long mt_cycles_enter[8];
2424 };
2525
arch/s390/include/asm/pci.h+1−1
@@ -202,7 +202,7 @@ extern unsigned int s390_pci_no_rid; · 201 unmodified lines
202202 ----------------------------------------------------------------------------- */
203203 /* Base stuff */
204204 int zpci_create_device(u32 fid, u32 fh, enum zpci_state state);
205−void zpci_remove_device(struct zpci_dev *zdev);
205+void zpci_remove_device(struct zpci_dev *zdev, bool set_error);
206206 int zpci_enable_device(struct zpci_dev *);
207207 int zpci_disable_device(struct zpci_dev *);
208208 int zpci_register_ioat(struct zpci_dev *, u8, u64, u64, u64);
arch/s390/include/asm/stacktrace.h+1−0
@@ -12,6 +12,7 @@ enum stack_type { · 11 unmodified lines
1212 STACK_TYPE_IRQ,
1313 STACK_TYPE_NODAT,
1414 STACK_TYPE_RESTART,
15+ STACK_TYPE_MCCK,
1516 };
1617
1718 struct stack_info {
arch/s390/include/asm/timex.h+18−18
@@ -98,10 +98,10 @@ extern unsigned char ptff_function_mask[16]; · 97 unmodified lines
9898
9999 /* Query TOD offset result */
100100 struct ptff_qto {
101− unsigned long long physical_clock;
102− unsigned long long tod_offset;
103− unsigned long long logical_tod_offset;
104− unsigned long long tod_epoch_difference;
101+ unsigned long physical_clock;
102+ unsigned long tod_offset;
103+ unsigned long logical_tod_offset;
104+ unsigned long tod_epoch_difference;
105105 } __packed;
106106
107107 static inline int ptff_query(unsigned int nr)
@@ -151,9 +151,9 @@ struct ptff_qui { · 43 unmodified lines
151151 rc; \
152152 })
153153
154−static inline unsigned long long local_tick_disable(void)
154+static inline unsigned long local_tick_disable(void)
155155 {
156− unsigned long long old;
156+ unsigned long old;
157157
158158 old = S390_lowcore.clock_comparator;
159159 S390_lowcore.clock_comparator = clock_comparator_max;
@@ -161,7 +161,7 @@ static inline unsigned long long local_tick_disable(void) · 1 unmodified line
161161 return old;
162162 }
163163
164−static inline void local_tick_enable(unsigned long long comp)
164+static inline void local_tick_enable(unsigned long comp)
165165 {
166166 S390_lowcore.clock_comparator = comp;
167167 set_clock_comparator(S390_lowcore.clock_comparator);
@@ -169,9 +169,9 @@ static inline void local_tick_enable(unsigned long long comp) · 1 unmodified line
169169
170170 #define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
171171
172−typedef unsigned long long cycles_t;
172+typedef unsigned long cycles_t;
173173
174−static inline unsigned long long get_tod_clock(void)
174+static inline unsigned long get_tod_clock(void)
175175 {
176176 union tod_clock clk;
177177
@@ -179,10 +179,10 @@ static inline unsigned long long get_tod_clock(void) · 1 unmodified line
179179 return clk.tod;
180180 }
181181
182−static inline unsigned long long get_tod_clock_fast(void)
182+static inline unsigned long get_tod_clock_fast(void)
183183 {
184184 #ifdef CONFIG_HAVE_MARCH_Z9_109_FEATURES
185− unsigned long long clk;
185+ unsigned long clk;
186186
187187 asm volatile("stckf %0" : "=Q" (clk) : : "cc");
188188 return clk;
@@ -208,9 +208,9 @@ extern union tod_clock tod_clock_base; · 19 unmodified lines
208208 * Therefore preemption must be disabled, otherwise the returned
209209 * value is not guaranteed to be monotonic.
210210 */
211−static inline unsigned long long get_tod_clock_monotonic(void)
211+static inline unsigned long get_tod_clock_monotonic(void)
212212 {
213− unsigned long long tod;
213+ unsigned long tod;
214214
215215 preempt_disable_notrace();
216216 tod = get_tod_clock() - tod_clock_base.tod;
@@ -237,7 +237,7 @@ static inline unsigned long long get_tod_clock_monotonic(void) · 20 unmodified lines
237237 * -> ns = (th * 125) + ((tl * 125) >> 9);
238238 *
239239 */
240−static inline unsigned long long tod_to_ns(unsigned long long todval)
240+static inline unsigned long tod_to_ns(unsigned long todval)
241241 {
242242 return ((todval >> 9) * 125) + (((todval & 0x1ff) * 125) >> 9);
243243 }
@@ -249,10 +249,10 @@ static inline unsigned long long tod_to_ns(unsigned long long todval) · 5 unmodified lines
249249 *
250250 * Returns: true if a is later than b
251251 */
252−static inline int tod_after(unsigned long long a, unsigned long long b)
252+static inline int tod_after(unsigned long a, unsigned long b)
253253 {
254254 if (MACHINE_HAS_SCC)
255− return (long long) a > (long long) b;
255+ return (long) a > (long) b;
256256 return a > b;
257257 }
258258
@@ -263,10 +263,10 @@ static inline int tod_after(unsigned long long a, unsigned long long b) · 4 unmodified lines
263263 *
264264 * Returns: true if a is later than b
265265 */
266−static inline int tod_after_eq(unsigned long long a, unsigned long long b)
266+static inline int tod_after_eq(unsigned long a, unsigned long b)
267267 {
268268 if (MACHINE_HAS_SCC)
269− return (long long) a >= (long long) b;
269+ return (long) a >= (long) b;
270270 return a >= b;
271271 }
272272
arch/s390/include/asm/vdso/data.h+1−1
@@ -6,7 +6,7 @@ · 5 unmodified lines
66 #include <vdso/datapage.h>
77
88 struct arch_vdso_data {
9− __u64 tod_steering_delta;
9+ __s64 tod_steering_delta;
1010 __u64 tod_steering_end;
1111 };
1212
arch/s390/include/uapi/asm/hwctrset.hrenamed from arch/s390/include/uapi/asm/perf_cpum_cf_diag.h+0−0

File renamed without changes.

arch/s390/kernel/cpcmd.c+4−2
@@ -37,10 +37,12 @@ static int diag8_noresponse(int cmdlen) · 36 unmodified lines
3737
3838 static int diag8_response(int cmdlen, char *response, int *rlen)
3939 {
40+ unsigned long _cmdlen = cmdlen | 0x40000000L;
41+ unsigned long _rlen = *rlen;
4042 register unsigned long reg2 asm ("2") = (addr_t) cpcmd_buf;
4143 register unsigned long reg3 asm ("3") = (addr_t) response;
42− register unsigned long reg4 asm ("4") = cmdlen | 0x40000000L;
43− register unsigned long reg5 asm ("5") = *rlen;
44+ register unsigned long reg4 asm ("4") = _cmdlen;
45+ register unsigned long reg5 asm ("5") = _rlen;
4446
4547 asm volatile(
4648 " diag %2,%0,0x8\n"
arch/s390/kernel/dumpstack.c+11−1
@@ -79,6 +79,15 @@ static bool in_nodat_stack(unsigned long sp, struct stack_info *info) · 78 unmodified lines
7979 return in_stack(sp, info, STACK_TYPE_NODAT, top - THREAD_SIZE, top);
8080 }
8181
82+static bool in_mcck_stack(unsigned long sp, struct stack_info *info)
83+{
84+ unsigned long frame_size, top;
85+
86+ frame_size = STACK_FRAME_OVERHEAD + sizeof(struct pt_regs);
87+ top = S390_lowcore.mcck_stack + frame_size;
88+ return in_stack(sp, info, STACK_TYPE_MCCK, top - THREAD_SIZE, top);
89+}
90+
8291 static bool in_restart_stack(unsigned long sp, struct stack_info *info)
8392 {
8493 unsigned long frame_size, top;
@@ -108,7 +117,8 @@ int get_stack_info(unsigned long sp, struct task_struct *task, · 23 unmodified lines
108117 /* Check per-cpu stacks */
109118 if (!in_irq_stack(sp, info) &&
110119 !in_nodat_stack(sp, info) &&
111− !in_restart_stack(sp, info))
120+ !in_restart_stack(sp, info) &&
121+ !in_mcck_stack(sp, info))
112122 goto unknown;
113123
114124 recursion_check:
arch/s390/kernel/entry.S+3−4
@@ -401,15 +401,13 @@ ENTRY(\name) · 400 unmodified lines
401401 brasl %r14,.Lcleanup_sie_int
402402 #endif
403403 0: CHECK_STACK __LC_SAVE_AREA_ASYNC
404− lgr %r11,%r15
405404 aghi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
406− stg %r11,__SF_BACKCHAIN(%r15)
407405 j 2f
408406 1: BPENTER __TI_flags(%r12),_TIF_ISOLATE_BP
409407 lctlg %c1,%c1,__LC_KERNEL_ASCE
410408 lg %r15,__LC_KERNEL_STACK
411− xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
412−2: la %r11,STACK_FRAME_OVERHEAD(%r15)
409+2: xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
410+ la %r11,STACK_FRAME_OVERHEAD(%r15)
413411 stmg %r0,%r7,__PT_R0(%r11)
414412 # clear user controlled registers to prevent speculative use
415413 xgr %r0,%r0
@@ -445,6 +443,7 @@ INT_HANDLER io_int_handler,__LC_IO_OLD_PSW,do_io_irq · 29 unmodified lines
445443 * Load idle PSW.
446444 */
447445 ENTRY(psw_idle)
446+ stg %r14,(__SF_GPRS+8*8)(%r15)
448447 stg %r3,__SF_EMPTY(%r15)
449448 larl %r1,psw_idle_exit
450449 stg %r1,__SF_EMPTY+8(%r15)
arch/s390/kernel/idle.c+6−6
@@ -47,7 +47,7 @@ void account_idle_time_irq(void) · 46 unmodified lines
4747 void arch_cpu_idle(void)
4848 {
4949 struct s390_idle_data *idle = this_cpu_ptr(&s390_idle);
50− unsigned long long idle_time;
50+ unsigned long idle_time;
5151 unsigned long psw_mask;
5252
5353 /* Wait for external, I/O or machine check interrupt. */
@@ -73,7 +73,7 @@ static ssize_t show_idle_count(struct device *dev, · 19 unmodified lines
7373 struct device_attribute *attr, char *buf)
7474 {
7575 struct s390_idle_data *idle = &per_cpu(s390_idle, dev->id);
76− unsigned long long idle_count;
76+ unsigned long idle_count;
7777 unsigned int seq;
7878
7979 do {
@@ -82,14 +82,14 @@ static ssize_t show_idle_count(struct device *dev, · 2 unmodified lines
8282 if (READ_ONCE(idle->clock_idle_enter))
8383 idle_count++;
8484 } while (read_seqcount_retry(&idle->seqcount, seq));
85− return sprintf(buf, "%llu\n", idle_count);
85+ return sprintf(buf, "%lu\n", idle_count);
8686 }
8787 DEVICE_ATTR(idle_count, 0444, show_idle_count, NULL);
8888
8989 static ssize_t show_idle_time(struct device *dev,
9090 struct device_attribute *attr, char *buf)
9191 {
92− unsigned long long now, idle_time, idle_enter, idle_exit, in_idle;
92+ unsigned long now, idle_time, idle_enter, idle_exit, in_idle;
9393 struct s390_idle_data *idle = &per_cpu(s390_idle, dev->id);
9494 unsigned int seq;
9595
@@ -109,14 +109,14 @@ static ssize_t show_idle_time(struct device *dev, · 13 unmodified lines
109109 }
110110 }
111111 idle_time += in_idle;
112− return sprintf(buf, "%llu\n", idle_time >> 12);
112+ return sprintf(buf, "%lu\n", idle_time >> 12);
113113 }
114114 DEVICE_ATTR(idle_time_us, 0444, show_idle_time, NULL);
115115
116116 u64 arch_cpu_idle_time(int cpu)
117117 {
118118 struct s390_idle_data *idle = &per_cpu(s390_idle, cpu);
119− unsigned long long now, idle_enter, idle_exit, in_idle;
119+ unsigned long now, idle_enter, idle_exit, in_idle;
120120 unsigned int seq;
121121
122122 do {
arch/s390/kernel/irq.c+1−1
@@ -174,7 +174,7 @@ void noinstr do_ext_irq(struct pt_regs *regs) · 173 unmodified lines
174174
175175 memcpy(&regs->int_code, &S390_lowcore.ext_cpu_addr, 4);
176176 regs->int_parm = S390_lowcore.ext_params;
177− regs->int_parm_long = *(unsigned long *)S390_lowcore.ext_params2;
177+ regs->int_parm_long = S390_lowcore.ext_params2;
178178
179179 from_idle = !user_mode(regs) && regs->psw.addr == (unsigned long)psw_idle_exit;
180180 if (from_idle)
arch/s390/kernel/perf_cpum_cf.c+1−1
@@ -269,7 +269,7 @@ static int __hw_perf_event_init(struct perf_event *event, unsigned int type) · 268 unmodified lines
269269 case CPUMF_CTR_SET_MAX:
270270 /* The counter could not be associated to a counter set */
271271 return -EINVAL;
272− };
272+ }
273273
274274 /* Initialize for using the CPU-measurement counter facility */
275275 if (!atomic_inc_not_zero(&num_events)) {
arch/s390/kernel/perf_cpum_cf_diag.c+5−18
@@ -26,12 +26,10 @@ · 25 unmodified lines
2626 #include <asm/timex.h>
2727 #include <asm/debug.h>
2828
29−#include <asm/perf_cpum_cf_diag.h>
29+#include <asm/hwctrset.h>
3030
3131 #define CF_DIAG_CTRSET_DEF 0xfeef /* Counter set header mark */
32−#define CF_DIAG_MIN_INTERVAL 60 /* Minimum counter set read */
3332 /* interval in seconds */
34−static unsigned long cf_diag_interval = CF_DIAG_MIN_INTERVAL;
3533 static unsigned int cf_diag_cpu_speed;
3634 static debug_info_t *cf_diag_dbg;
3735
@@ -729,7 +727,6 @@ static DEFINE_MUTEX(cf_diag_ctrset_mutex); · 691 unmodified lines
729727 static struct cf_diag_ctrset {
730728 unsigned long ctrset; /* Bit mask of counter set to read */
731729 cpumask_t mask; /* CPU mask to read from */
732− time64_t lastread; /* Epoch counter set last read */
733730 } cf_diag_ctrset;
734731
735732 static void cf_diag_ctrset_clear(void)
@@ -866,27 +863,16 @@ static int cf_diag_all_read(unsigned long arg) · 130 unmodified lines
866863 {
867864 struct cf_diag_call_on_cpu_parm p;
868865 cpumask_var_t mask;
869− time64_t now;
870− int rc = 0;
866+ int rc;
871867
872868 debug_sprintf_event(cf_diag_dbg, 5, "%s\n", __func__);
873869 if (!alloc_cpumask_var(&mask, GFP_KERNEL))
874870 return -ENOMEM;
875− now = ktime_get_seconds();
876− if (cf_diag_ctrset.lastread + cf_diag_interval > now) {
877− debug_sprintf_event(cf_diag_dbg, 5, "%s now %lld "
878− " lastread %lld\n", __func__, now,
879− cf_diag_ctrset.lastread);
880− rc = -EAGAIN;
881− goto out;
882− } else {
883− cf_diag_ctrset.lastread = now;
884− }
871+
885872 p.sets = cf_diag_ctrset.ctrset;
886873 cpumask_and(mask, &cf_diag_ctrset.mask, cpu_online_mask);
887874 on_each_cpu_mask(mask, cf_diag_cpu_read, &p, 1);
888875 rc = cf_diag_all_copy(arg, mask);
889−out:
890876 free_cpumask_var(mask);
891877 debug_sprintf_event(cf_diag_dbg, 5, "%s rc %d\n", __func__, rc);
892878 return rc;
@@ -982,7 +968,7 @@ static int cf_diag_all_start(void) · 89 unmodified lines
982968 */
983969 static size_t cf_diag_needspace(unsigned int sets)
984970 {
985− struct cpu_cf_events *cpuhw = this_cpu_ptr(&cpu_cf_events);
971+ struct cpu_cf_events *cpuhw = get_cpu_ptr(&cpu_cf_events);
986972 size_t bytes = 0;
987973 int i;
988974
@@ -998,6 +984,7 @@ static size_t cf_diag_needspace(unsigned int sets) · 9 unmodified lines
998984 sizeof(((struct s390_ctrset_cpudata *)0)->no_sets));
999985 debug_sprintf_event(cf_diag_dbg, 5, "%s bytes %ld\n", __func__,
1000986 bytes);
987+ put_cpu_ptr(&cpu_cf_events);
1001988 return bytes;
1002989 }
1003990
arch/s390/kernel/setup.c+1−1
@@ -354,7 +354,7 @@ static int __init stack_realloc(void) · 353 unmodified lines
354354 if (!new)
355355 panic("Couldn't allocate machine check stack");
356356 WRITE_ONCE(S390_lowcore.mcck_stack, new + STACK_INIT_OFFSET);
357− memblock_free(old, THREAD_SIZE);
357+ memblock_free_late(old, THREAD_SIZE);
358358 return 0;
359359 }
360360 early_initcall(stack_realloc);
arch/s390/kernel/time.c+22−16
@@ -68,10 +68,10 @@ EXPORT_SYMBOL(s390_epoch_delta_notifier); · 67 unmodified lines
6868
6969 unsigned char ptff_function_mask[16];
7070
71−static unsigned long long lpar_offset;
72−static unsigned long long initial_leap_seconds;
73−static unsigned long long tod_steering_end;
74−static long long tod_steering_delta;
71+static unsigned long lpar_offset;
72+static unsigned long initial_leap_seconds;
73+static unsigned long tod_steering_end;
74+static long tod_steering_delta;
7575
7676 /*
7777 * Get time offsets with PTFF
@@ -80,10 +80,12 @@ void __init time_early_init(void) · 2 unmodified lines
8080 {
8181 struct ptff_qto qto;
8282 struct ptff_qui qui;
83+ int cs;
8384
8485 /* Initialize TOD steering parameters */
8586 tod_steering_end = tod_clock_base.tod;
86− vdso_data->arch_data.tod_steering_end = tod_steering_end;
87+ for (cs = 0; cs < CS_BASES; cs++)
88+ vdso_data[cs].arch_data.tod_steering_end = tod_steering_end;
8789
8890 if (!test_facility(28))
8991 return;
@@ -96,7 +98,7 @@ void __init time_early_init(void) · 6 unmodified lines
9698
9799 /* get initial leap seconds */
98100 if (ptff_query(PTFF_QUI) && ptff(&qui, sizeof(qui), PTFF_QUI) == 0)
99− initial_leap_seconds = (unsigned long long)
101+ initial_leap_seconds = (unsigned long)
100102 ((long) qui.old_leap * 4096000000L);
101103 }
102104
@@ -222,7 +224,7 @@ void __init read_persistent_wall_and_boot_offset(struct timespec64 *wall_time, · 119 unmodified lines
222224
223225 static u64 read_tod_clock(struct clocksource *cs)
224226 {
225− unsigned long long now, adj;
227+ unsigned long now, adj;
226228
227229 preempt_disable(); /* protect from changes to steering parameters */
228230 now = get_tod_clock();
@@ -362,10 +364,11 @@ static inline int check_sync_clock(void) · 133 unmodified lines
362364 * Apply clock delta to the global data structures.
363365 * This is called once on the CPU that performed the clock sync.
364366 */
365−static void clock_sync_global(unsigned long long delta)
367+static void clock_sync_global(unsigned long delta)
366368 {
367369 unsigned long now, adj;
368370 struct ptff_qto qto;
371+ int cs;
369372
370373 /* Fixup the monotonic sched clock. */
371374 tod_clock_base.eitod += delta;
@@ -378,10 +381,13 @@ static void clock_sync_global(unsigned long long delta) · 6 unmodified lines
378381 -(adj >> 15) : (adj >> 15);
379382 tod_steering_delta += delta;
380383 if ((abs(tod_steering_delta) >> 48) != 0)
381− panic("TOD clock sync offset %lli is too large to drift\n",
384+ panic("TOD clock sync offset %li is too large to drift\n",
382385 tod_steering_delta);
383386 tod_steering_end = now + (abs(tod_steering_delta) << 15);
384− vdso_data->arch_data.tod_steering_end = tod_steering_end;
387+ for (cs = 0; cs < CS_BASES; cs++) {
388+ vdso_data[cs].arch_data.tod_steering_end = tod_steering_end;
389+ vdso_data[cs].arch_data.tod_steering_delta = tod_steering_delta;
390+ }
385391
386392 /* Update LPAR offset. */
387393 if (ptff_query(PTFF_QTO) && ptff(&qto, sizeof(qto), PTFF_QTO) == 0)
@@ -394,7 +400,7 @@ static void clock_sync_global(unsigned long long delta) · 6 unmodified lines
394400 * Apply clock delta to the per-CPU data structures of this CPU.
395401 * This is called for each online CPU after the call to clock_sync_global.
396402 */
397−static void clock_sync_local(unsigned long long delta)
403+static void clock_sync_local(unsigned long delta)
398404 {
399405 /* Add the delta to the clock comparator. */
400406 if (S390_lowcore.clock_comparator != clock_comparator_max) {
@@ -418,7 +424,7 @@ static void __init time_init_wq(void) · 17 unmodified lines
418424 struct clock_sync_data {
419425 atomic_t cpus;
420426 int in_sync;
421− unsigned long long clock_delta;
427+ unsigned long clock_delta;
422428 };
423429
424430 /*
@@ -538,7 +544,7 @@ static int stpinfo_valid(void) · 113 unmodified lines
538544 static int stp_sync_clock(void *data)
539545 {
540546 struct clock_sync_data *sync = data;
541− unsigned long long clock_delta, flags;
547+ u64 clock_delta, flags;
542548 static int first;
543549 int rc;
544550
@@ -720,8 +726,8 @@ static ssize_t ctn_id_show(struct device *dev, · 175 unmodified lines
720726
721727 mutex_lock(&stp_mutex);
722728 if (stpinfo_valid())
723− ret = sprintf(buf, "%016llx\n",
724− *(unsigned long long *) stp_info.ctnid);
729+ ret = sprintf(buf, "%016lx\n",
730+ *(unsigned long *) stp_info.ctnid);
725731 mutex_unlock(&stp_mutex);
726732 return ret;
727733 }
@@ -794,7 +800,7 @@ static ssize_t leap_seconds_scheduled_show(struct device *dev, · 66 unmodified lines
794800 if (!stzi.lsoib.p)
795801 return sprintf(buf, "0,0\n");
796802
797− return sprintf(buf, "%llu,%d\n",
803+ return sprintf(buf, "%lu,%d\n",
798804 tod_to_ns(stzi.lsoib.nlsout - TOD_UNIX_EPOCH) / NSEC_PER_SEC,
799805 stzi.lsoib.nlso - stzi.lsoib.also);
800806 }
arch/s390/kernel/topology.c+0−2
@@ -76,8 +76,6 @@ static void cpu_group_map(cpumask_t *dst, struct mask_info *info, unsigned int c · 75 unmodified lines
7676 }
7777 info = info->next;
7878 }
79− if (cpumask_empty(&mask))
80− cpumask_copy(&mask, cpumask_of(cpu));
8179 break;
8280 case TOPOLOGY_MODE_PACKAGE:
8381 cpumask_copy(&mask, cpu_present_mask);
arch/s390/kernel/vtime.c+1−1
@@ -214,7 +214,7 @@ void vtime_flush(struct task_struct *tsk) · 213 unmodified lines
214214 avg_steal = S390_lowcore.avg_steal_timer / 2;
215215 if ((s64) steal > 0) {
216216 S390_lowcore.steal_timer = 0;
217− account_steal_time(steal);
217+ account_steal_time(cputime_to_nsecs(steal));
218218 avg_steal += steal;
219219 }
220220 S390_lowcore.avg_steal_timer = avg_steal;
arch/s390/kvm/interrupt.c+1−1
@@ -1287,7 +1287,7 @@ static u64 __calculate_sltime(struct kvm_vcpu *vcpu) · 1286 unmodified lines
12871287 /* already expired? */
12881288 if (cputm >> 63)
12891289 return 0;
1290− return min(sltime, tod_to_ns(cputm));
1290+ return min_t(u64, sltime, tod_to_ns(cputm));
12911291 }
12921292 } else if (cpu_timer_interrupts_enabled(vcpu)) {
12931293 sltime = kvm_s390_get_cpu_timer(vcpu);
arch/s390/pci/pci.c+24−4
@@ -682,16 +682,36 @@ int zpci_disable_device(struct zpci_dev *zdev) · 681 unmodified lines
682682 }
683683 EXPORT_SYMBOL_GPL(zpci_disable_device);
684684
685−void zpci_remove_device(struct zpci_dev *zdev)
685+/* zpci_remove_device - Removes the given zdev from the PCI core
686+ * @zdev: the zdev to be removed from the PCI core
687+ * @set_error: if true the device's error state is set to permanent failure
688+ *
689+ * Sets a zPCI device to a configured but offline state; the zPCI
690+ * device is still accessible through its hotplug slot and the zPCI
691+ * API but is removed from the common code PCI bus, making it
692+ * no longer available to drivers.
693+ */
694+void zpci_remove_device(struct zpci_dev *zdev, bool set_error)
686695 {
687696 struct zpci_bus *zbus = zdev->zbus;
688697 struct pci_dev *pdev;
689698
699+ if (!zdev->zbus->bus)
700+ return;
701+
690702 pdev = pci_get_slot(zbus->bus, zdev->devfn);
691703 if (pdev) {
692− if (pdev->is_virtfn)
693− return zpci_iov_remove_virtfn(pdev, zdev->vfn);
704+ if (set_error)
705+ pdev->error_state = pci_channel_io_perm_failure;
706+ if (pdev->is_virtfn) {
707+ zpci_iov_remove_virtfn(pdev, zdev->vfn);
708+ /* balance pci_get_slot */
709+ pci_dev_put(pdev);
710+ return;
711+ }
694712 pci_stop_and_remove_bus_device_locked(pdev);
713+ /* balance pci_get_slot */
714+ pci_dev_put(pdev);
695715 }
696716 }
697717
@@ -765,7 +785,7 @@ void zpci_release_device(struct kref *kref) · 67 unmodified lines
765785 struct zpci_dev *zdev = container_of(kref, struct zpci_dev, kref);
766786
767787 if (zdev->zbus->bus)
768− zpci_remove_device(zdev);
788+ zpci_remove_device(zdev, false);
769789
770790 switch (zdev->state) {
771791 case ZPCI_FN_STATE_ONLINE:
arch/s390/pci/pci_event.c+6−12
@@ -76,13 +76,10 @@ void zpci_event_error(void *data) · 75 unmodified lines
7676 static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
7777 {
7878 struct zpci_dev *zdev = get_zdev_by_fid(ccdf->fid);
79− struct pci_dev *pdev = NULL;
8079 enum zpci_state state;
80+ struct pci_dev *pdev;
8181 int ret;
8282
83− if (zdev && zdev->zbus->bus)
84− pdev = pci_get_slot(zdev->zbus->bus, zdev->devfn);
85−
8683 zpci_err("avail CCDF:\n");
8784 zpci_err_hex(ccdf, sizeof(*ccdf));
8885
@@ -124,8 +121,7 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf) · 35 unmodified lines
124121 case 0x0303: /* Deconfiguration requested */
125122 if (!zdev)
126123 break;
127− if (pdev)
128− zpci_remove_device(zdev);
124+ zpci_remove_device(zdev, false);
129125
130126 ret = zpci_disable_device(zdev);
131127 if (ret)
@@ -140,12 +136,10 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf) · 8 unmodified lines
140136 case 0x0304: /* Configured -> Standby|Reserved */
141137 if (!zdev)
142138 break;
143− if (pdev) {
144− /* Give the driver a hint that the function is
145− * already unusable. */
146− pdev->error_state = pci_channel_io_perm_failure;
147− zpci_remove_device(zdev);
148− }
139+ /* Give the driver a hint that the function is
140+ * already unusable.
141+ */
142+ zpci_remove_device(zdev, true);
149143
150144 zdev->fh = ccdf->fh;
151145 zpci_disable_device(zdev);
arch/sparc/configs/sparc64_defconfig+1−3
@@ -93,7 +93,7 @@ CONFIG_NETDEVICES=y · 92 unmodified lines
9393 CONFIG_NET_ETHERNET=y
9494 CONFIG_MII=m
9595 CONFIG_SUNLANCE=m
96−CONFIG_HAPPYMEAL=m
96+CONFIG_HAPPYMEAL=y
9797 CONFIG_SUNGEM=m
9898 CONFIG_SUNVNET=m
9999 CONFIG_LDMVSW=m
@@ -234,9 +234,7 @@ CONFIG_CRYPTO_TWOFISH=m · 134 unmodified lines
234234 CONFIG_CRC16=m
235235 CONFIG_LIBCRC32C=m
236236 CONFIG_VCC=m
237−CONFIG_ATA=y
238237 CONFIG_PATA_CMD64X=y
239−CONFIG_HAPPYMEAL=y
240238 CONFIG_IP_PNP=y
241239 CONFIG_IP_PNP_DHCP=y
242240 CONFIG_DEVTMPFS=y
arch/sparc/include/asm/elf_64.h+0−1
@@ -8,7 +8,6 @@ · 7 unmodified lines
88
99 #include <asm/ptrace.h>
1010 #include <asm/processor.h>
11−#include <asm/extable_64.h>
1211 #include <asm/spitfire.h>
1312 #include <asm/adi.h>
1413
arch/sparc/include/asm/extable.hrenamed from arch/sparc/include/asm/extable_64.h+2−2
@@ -1,6 +1,6 @@
11 /* SPDX-License-Identifier: GPL-2.0 */
2−#ifndef __ASM_EXTABLE64_H
3−#define __ASM_EXTABLE64_H
2+#ifndef __ASM_EXTABLE_H
3+#define __ASM_EXTABLE_H
44 /*
55 * The exception table consists of pairs of addresses: the first is the
66 * address of an instruction that is allowed to fault, and the second is
arch/sparc/include/asm/processor_32.h+1−5
@@ -50,16 +50,12 @@ struct thread_struct { · 49 unmodified lines
5050 unsigned long fsr;
5151 unsigned long fpqdepth;
5252 struct fpq fpqueue[16];
53− unsigned long flags;
5453 mm_segment_t current_ds;
5554 };
5655
57−#define SPARC_FLAG_KTHREAD 0x1 /* task is a kernel thread */
58−#define SPARC_FLAG_UNALIGNED 0x2 /* is allowed to do unaligned accesses */
59−
6056 #define INIT_THREAD { \
61− .flags = SPARC_FLAG_KTHREAD, \
6257 .current_ds = KERNEL_DS, \
58+ .kregs = (struct pt_regs *)(init_stack+THREAD_SIZE)-1 \
6359 }
6460
6561 /* Do necessary setup to start up a newly executed thread. */
arch/sparc/include/asm/thread_info_64.h+1−0
@@ -118,6 +118,7 @@ struct thread_info { · 117 unmodified lines
118118 .task = &tsk, \
119119 .current_ds = ASI_P, \
120120 .preempt_count = INIT_PREEMPT_COUNT, \
121+ .kregs = (struct pt_regs *)(init_stack+THREAD_SIZE)-1 \
121122 }
122123
123124 /* how to get the thread information struct from C */
arch/sparc/include/asm/uaccess.h+3−0
@@ -1,6 +1,9 @@
11 /* SPDX-License-Identifier: GPL-2.0 */
22 #ifndef ___ASM_SPARC_UACCESS_H
33 #define ___ASM_SPARC_UACCESS_H
4+
5+#include <asm/extable.h>
6+
47 #if defined(__sparc__) && defined(__arch64__)
58 #include <asm/uaccess_64.h>
69 #else
arch/sparc/include/asm/uaccess_32.h+0−38
@@ -13,9 +13,6 @@ · 12 unmodified lines
1313
1414 #include <asm/processor.h>
1515
16−#define ARCH_HAS_SORT_EXTABLE
17−#define ARCH_HAS_SEARCH_EXTABLE
18−
1916 /* Sparc is not segmented, however we need to be able to fool access_ok()
2017 * when doing system calls from kernel mode legitimately.
2118 *
@@ -40,36 +37,6 @@ · 18 unmodified lines
4037 #define __access_ok(addr, size) (__user_ok((addr) & get_fs().seg, (size)))
4138 #define access_ok(addr, size) __access_ok((unsigned long)(addr), size)
4239
43−/*
44− * The exception table consists of pairs of addresses: the first is the
45− * address of an instruction that is allowed to fault, and the second is
46− * the address at which the program should continue. No registers are
47− * modified, so it is entirely up to the continuation code to figure out
48− * what to do.
49− *
50− * All the routines below use bits of fixup code that are out of line
51− * with the main instruction path. This means when everything is well,
52− * we don't even have to jump over them. Further, they do not intrude
53− * on our cache or tlb entries.
54− *
55− * There is a special way how to put a range of potentially faulting
56− * insns (like twenty ldd/std's with now intervening other instructions)
57− * You specify address of first in insn and 0 in fixup and in the next
58− * exception_table_entry you specify last potentially faulting insn + 1
59− * and in fixup the routine which should handle the fault.
60− * That fixup code will get
61− * (faulting_insn_address - first_insn_in_the_range_address)/4
62− * in %g2 (ie. index of the faulting instruction in the range).
63− */
64−
65−struct exception_table_entry
66−{
67− unsigned long insn, fixup;
68−};
69−
70−/* Returns 0 if exception not found and fixup otherwise. */
71−unsigned long search_extables_range(unsigned long addr, unsigned long *g2);
72−
7340 /* Uh, these should become the main single-value transfer routines..
7441 * They automatically use the right size if we just have the right
7542 * pointer type..
@@ -252,12 +219,7 @@ static inline unsigned long __clear_user(void __user *addr, unsigned long size) · 176 unmodified lines
252219 unsigned long ret;
253220
254221 __asm__ __volatile__ (
255− ".section __ex_table,#alloc\n\t"
256− ".align 4\n\t"
257− ".word 1f,3\n\t"
258− ".previous\n\t"
259222 "mov %2, %%o1\n"
260− "1:\n\t"
261223 "call __bzero\n\t"
262224 " mov %1, %%o0\n\t"
263225 "mov %%o0, %0\n"
arch/sparc/include/asm/uaccess_64.h+0−1
@@ -10,7 +10,6 @@ · 9 unmodified lines
1010 #include <linux/string.h>
1111 #include <asm/asi.h>
1212 #include <asm/spitfire.h>
13−#include <asm/extable_64.h>
1413
1514 #include <asm/processor.h>
1615
arch/sparc/kernel/head_32.S+1−1
@@ -515,7 +515,7 @@ continue_boot: · 514 unmodified lines
515515
516516 /* I want a kernel stack NOW! */
517517 set init_thread_union, %g1
518− set (THREAD_SIZE - STACKFRAME_SZ), %g2
518+ set (THREAD_SIZE - STACKFRAME_SZ - TRACEREG_SZ), %g2
519519 add %g1, %g2, %sp
520520 mov 0, %fp /* And for good luck */
521521
arch/sparc/kernel/head_64.S+1−1
@@ -706,7 +706,7 @@ tlb_fixup_done: · 705 unmodified lines
706706 wr %g0, ASI_P, %asi
707707 mov 1, %g1
708708 sllx %g1, THREAD_SHIFT, %g1
709− sub %g1, (STACKFRAME_SZ + STACK_BIAS), %g1
709+ sub %g1, (STACKFRAME_SZ + STACK_BIAS + TRACEREG_SZ), %g1
710710 add %g6, %g1, %sp
711711
712712 /* Set per-cpu pointer initially to zero, this makes
arch/sparc/kernel/process_32.c+0−12
@@ -216,16 +216,6 @@ void flush_thread(void) · 215 unmodified lines
216216 clear_thread_flag(TIF_USEDFPU);
217217 #endif
218218 }
219−
220− /* This task is no longer a kernel thread. */
221− if (current->thread.flags & SPARC_FLAG_KTHREAD) {
222− current->thread.flags &= ~SPARC_FLAG_KTHREAD;
223−
224− /* We must fixup kregs as well. */
225− /* XXX This was not fixed for ti for a while, worked. Unused? */
226− current->thread.kregs = (struct pt_regs *)
227− (task_stack_page(current) + (THREAD_SIZE - TRACEREG_SZ));
228− }
229219 }
230220
231221 static inline struct sparc_stackf __user *
@@ -313,7 +303,6 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, unsigned long arg, · 81 unmodified lines
313303 extern int nwindows;
314304 unsigned long psr;
315305 memset(new_stack, 0, STACKFRAME_SZ + TRACEREG_SZ);
316− p->thread.flags |= SPARC_FLAG_KTHREAD;
317306 p->thread.current_ds = KERNEL_DS;
318307 ti->kpc = (((unsigned long) ret_from_kernel_thread) - 0x8);
319308 childregs->u_regs[UREG_G1] = sp; /* function */
@@ -325,7 +314,6 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, unsigned long arg, · 5 unmodified lines
325314 }
326315 memcpy(new_stack, (char *)regs - STACKFRAME_SZ, STACKFRAME_SZ + TRACEREG_SZ);
327316 childregs->u_regs[UREG_FP] = sp;
328− p->thread.flags &= ~SPARC_FLAG_KTHREAD;
329317 p->thread.current_ds = USER_DS;
330318 ti->kpc = (((unsigned long) ret_from_fork) - 0x8);
331319 ti->kpsr = current->thread.fork_kpsr | PSR_PIL;
arch/sparc/kernel/setup_32.c+0−3
@@ -266,7 +266,6 @@ static __init void leon_patch(void) · 265 unmodified lines
266266 }
267267
268268 struct tt_entry *sparc_ttable;
269−static struct pt_regs fake_swapper_regs;
270269
271270 /* Called from head_32.S - before we have setup anything
272271 * in the kernel. Be very careful with what you do here.
@@ -363,8 +362,6 @@ void __init setup_arch(char **cmdline_p) · 90 unmodified lines
363362 (*(linux_dbvec->teach_debugger))();
364363 }
365364
366− init_task.thread.kregs = &fake_swapper_regs;
367−
368365 /* Run-time patch instructions to match the cpu model */
369366 per_cpu_patch();
370367
arch/sparc/kernel/setup_64.c+0−4
@@ -165,8 +165,6 @@ extern int root_mountflags; · 164 unmodified lines
165165
166166 char reboot_command[COMMAND_LINE_SIZE];
167167
168−static struct pt_regs fake_swapper_regs = { { 0, }, 0, 0, 0, 0 };
169−
170168 static void __init per_cpu_patch(void)
171169 {
172170 struct cpuid_patch_entry *p;
@@ -661,8 +659,6 @@ void __init setup_arch(char **cmdline_p) · 488 unmodified lines
661659 rd_image_start = ram_flags & RAMDISK_IMAGE_START_MASK;
662660 #endif
663661
664− task_thread_info(&init_task)->kregs = &fake_swapper_regs;
665−
666662 #ifdef CONFIG_IP_PNP
667663 if (!ic_set_manually) {
668664 phandle chosen = prom_finddevice("/chosen");
arch/sparc/kernel/traps_64.c+6−7
@@ -275,14 +275,13 @@ bool is_no_fault_exception(struct pt_regs *regs) · 274 unmodified lines
275275 asi = (regs->tstate >> 24); /* saved %asi */
276276 else
277277 asi = (insn >> 5); /* immediate asi */
278− if ((asi & 0xf2) == ASI_PNF) {
279− if (insn & 0x1000000) { /* op3[5:4]=3 */
280− handle_ldf_stq(insn, regs);
281− return true;
282− } else if (insn & 0x200000) { /* op3[2], stores */
278+ if ((asi & 0xf6) == ASI_PNF) {
279+ if (insn & 0x200000) /* op3[2], stores */
283280 return false;
284− }
285− handle_ld_nf(insn, regs);
281+ if (insn & 0x1000000) /* op3[5:4]=3 (fp) */
282+ handle_ldf_stq(insn, regs);
283+ else
284+ handle_ld_nf(insn, regs);
286285 return true;
287286 }
288287 }
arch/sparc/kernel/unaligned_32.c+6−100
@@ -16,6 +16,7 @@ · 15 unmodified lines
1616 #include <linux/uaccess.h>
1717 #include <linux/smp.h>
1818 #include <linux/perf_event.h>
19+#include <linux/extable.h>
1920
2021 #include <asm/setup.h>
2122
@@ -213,10 +214,10 @@ static inline int ok_for_kernel(unsigned int insn) · 191 unmodified lines
213214
214215 static void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn)
215216 {
216− unsigned long g2 = regs->u_regs [UREG_G2];
217− unsigned long fixup = search_extables_range(regs->pc, &g2);
217+ const struct exception_table_entry *entry;
218218
219− if (!fixup) {
219+ entry = search_exception_tables(regs->pc);
220+ if (!entry) {
220221 unsigned long address = compute_effective_address(regs, insn);
221222 if(address < PAGE_SIZE) {
222223 printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference in mna handler");
@@ -232,9 +233,8 @@ static void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn) · 9 unmodified lines
232233 die_if_kernel("Oops", regs);
233234 /* Not reached */
234235 }
235− regs->pc = fixup;
236+ regs->pc = entry->fixup;
236237 regs->npc = regs->pc + 4;
237− regs->u_regs [UREG_G2] = g2;
238238 }
239239
240240 asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn)
@@ -274,103 +274,9 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) · 33 unmodified lines
274274 }
275275 }
276276
277−static inline int ok_for_user(struct pt_regs *regs, unsigned int insn,
278− enum direction dir)
279−{
280− unsigned int reg;
281− int size = ((insn >> 19) & 3) == 3 ? 8 : 4;
282−
283− if ((regs->pc | regs->npc) & 3)
284− return 0;
285−
286− /* Must access_ok() in all the necessary places. */
287−#define WINREG_ADDR(regnum) \
288− ((void __user *)(((unsigned long *)regs->u_regs[UREG_FP])+(regnum)))
289−
290− reg = (insn >> 25) & 0x1f;
291− if (reg >= 16) {
292− if (!access_ok(WINREG_ADDR(reg - 16), size))
293− return -EFAULT;
294− }
295− reg = (insn >> 14) & 0x1f;
296− if (reg >= 16) {
297− if (!access_ok(WINREG_ADDR(reg - 16), size))
298− return -EFAULT;
299− }
300− if (!(insn & 0x2000)) {
301− reg = (insn & 0x1f);
302− if (reg >= 16) {
303− if (!access_ok(WINREG_ADDR(reg - 16), size))
304− return -EFAULT;
305− }
306− }
307−#undef WINREG_ADDR
308− return 0;
309−}
310−
311−static void user_mna_trap_fault(struct pt_regs *regs, unsigned int insn)
277+asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn)
312278 {
313279 send_sig_fault(SIGBUS, BUS_ADRALN,
314280 (void __user *)safe_compute_effective_address(regs, insn),
315281 0, current);
316282 }
317−
318−asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn)
319−{
320− enum direction dir;
321−
322− if(!(current->thread.flags & SPARC_FLAG_UNALIGNED) ||
323− (((insn >> 30) & 3) != 3))
324− goto kill_user;
325− dir = decode_direction(insn);
326− if(!ok_for_user(regs, insn, dir)) {
327− goto kill_user;
328− } else {
329− int err, size = decode_access_size(insn);
330− unsigned long addr;
331−
332− if(floating_point_load_or_store_p(insn)) {
333− printk("User FPU load/store unaligned unsupported.\n");
334− goto kill_user;
335− }
336−
337− addr = compute_effective_address(regs, insn);
338− perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, regs, addr);
339− switch(dir) {
340− case load:
341− err = do_int_load(fetch_reg_addr(((insn>>25)&0x1f),
342− regs),
343− size, (unsigned long *) addr,
344− decode_signedness(insn));
345− break;
346−
347− case store:
348− err = do_int_store(((insn>>25)&0x1f), size,
349− (unsigned long *) addr, regs);
350− break;
351−
352− case both:
353− /*
354− * This was supported in 2.4. However, we question
355− * the value of SWAP instruction across word boundaries.
356− */
357− printk("Unaligned SWAP unsupported.\n");
358− err = -EFAULT;
359− break;
360−
361− default:
362− unaligned_panic("Impossible user unaligned trap.");
363− goto out;
364− }
365− if (err)
366− goto kill_user;
367− else
368− advance(regs);
369− goto out;
370− }
371−
372−kill_user:
373− user_mna_trap_fault(regs, insn);
374−out:
375− ;
376−}
arch/sparc/lib/checksum_32.S+27−37
@@ -155,13 +155,6 @@ cpout: retl ! get outta here · 154 unmodified lines
155155 .text; \
156156 .align 4
157157
158−#define EXT(start,end) \
159− .section __ex_table,ALLOC; \
160− .align 4; \
161− .word start, 0, end, cc_fault; \
162− .text; \
163− .align 4
164−
165158 /* This aligned version executes typically in 8.5 superscalar cycles, this
166159 * is the best I can do. I say 8.5 because the final add will pair with
167160 * the next ldd in the main unrolled loop. Thus the pipe is always full.
@@ -169,20 +162,20 @@ cpout: retl ! get outta here · 1 unmodified line
169162 * please check the fixup code below as well.
170163 */
171164 #define CSUMCOPY_BIGCHUNK_ALIGNED(src, dst, sum, off, t0, t1, t2, t3, t4, t5, t6, t7) \
172− ldd [src + off + 0x00], t0; \
173− ldd [src + off + 0x08], t2; \
165+ EX(ldd [src + off + 0x00], t0); \
166+ EX(ldd [src + off + 0x08], t2); \
174167 addxcc t0, sum, sum; \
175− ldd [src + off + 0x10], t4; \
168+ EX(ldd [src + off + 0x10], t4); \
176169 addxcc t1, sum, sum; \
177− ldd [src + off + 0x18], t6; \
170+ EX(ldd [src + off + 0x18], t6); \
178171 addxcc t2, sum, sum; \
179− std t0, [dst + off + 0x00]; \
172+ EX(std t0, [dst + off + 0x00]); \
180173 addxcc t3, sum, sum; \
181− std t2, [dst + off + 0x08]; \
174+ EX(std t2, [dst + off + 0x08]); \
182175 addxcc t4, sum, sum; \
183− std t4, [dst + off + 0x10]; \
176+ EX(std t4, [dst + off + 0x10]); \
184177 addxcc t5, sum, sum; \
185− std t6, [dst + off + 0x18]; \
178+ EX(std t6, [dst + off + 0x18]); \
186179 addxcc t6, sum, sum; \
187180 addxcc t7, sum, sum;
188181
@@ -191,39 +184,39 @@ cpout: retl ! get outta here · 2 unmodified lines
191184 * Viking MXCC into streaming mode. Ho hum...
192185 */
193186 #define CSUMCOPY_BIGCHUNK(src, dst, sum, off, t0, t1, t2, t3, t4, t5, t6, t7) \
194− ldd [src + off + 0x00], t0; \
195− ldd [src + off + 0x08], t2; \
196− ldd [src + off + 0x10], t4; \
197− ldd [src + off + 0x18], t6; \
198− st t0, [dst + off + 0x00]; \
187+ EX(ldd [src + off + 0x00], t0); \
188+ EX(ldd [src + off + 0x08], t2); \
189+ EX(ldd [src + off + 0x10], t4); \
190+ EX(ldd [src + off + 0x18], t6); \
191+ EX(st t0, [dst + off + 0x00]); \
199192 addxcc t0, sum, sum; \
200− st t1, [dst + off + 0x04]; \
193+ EX(st t1, [dst + off + 0x04]); \
201194 addxcc t1, sum, sum; \
202− st t2, [dst + off + 0x08]; \
195+ EX(st t2, [dst + off + 0x08]); \
203196 addxcc t2, sum, sum; \
204− st t3, [dst + off + 0x0c]; \
197+ EX(st t3, [dst + off + 0x0c]); \
205198 addxcc t3, sum, sum; \
206− st t4, [dst + off + 0x10]; \
199+ EX(st t4, [dst + off + 0x10]); \
207200 addxcc t4, sum, sum; \
208− st t5, [dst + off + 0x14]; \
201+ EX(st t5, [dst + off + 0x14]); \
209202 addxcc t5, sum, sum; \
210− st t6, [dst + off + 0x18]; \
203+ EX(st t6, [dst + off + 0x18]); \
211204 addxcc t6, sum, sum; \
212− st t7, [dst + off + 0x1c]; \
205+ EX(st t7, [dst + off + 0x1c]); \
213206 addxcc t7, sum, sum;
214207
215208 /* Yuck, 6 superscalar cycles... */
216209 #define CSUMCOPY_LASTCHUNK(src, dst, sum, off, t0, t1, t2, t3) \
217− ldd [src - off - 0x08], t0; \
218− ldd [src - off - 0x00], t2; \
210+ EX(ldd [src - off - 0x08], t0); \
211+ EX(ldd [src - off - 0x00], t2); \
219212 addxcc t0, sum, sum; \
220− st t0, [dst - off - 0x08]; \
213+ EX(st t0, [dst - off - 0x08]); \
221214 addxcc t1, sum, sum; \
222− st t1, [dst - off - 0x04]; \
215+ EX(st t1, [dst - off - 0x04]); \
223216 addxcc t2, sum, sum; \
224− st t2, [dst - off - 0x00]; \
217+ EX(st t2, [dst - off - 0x00]); \
225218 addxcc t3, sum, sum; \
226− st t3, [dst - off + 0x04];
219+ EX(st t3, [dst - off + 0x04]);
227220
228221 /* Handle the end cruft code out of band for better cache patterns. */
229222 cc_end_cruft:
@@ -331,7 +324,6 @@ __csum_partial_copy_sparc_generic: · 101 unmodified lines
331324 CSUMCOPY_BIGCHUNK(%o0,%o1,%g7,0x20,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o3)
332325 CSUMCOPY_BIGCHUNK(%o0,%o1,%g7,0x40,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o3)
333326 CSUMCOPY_BIGCHUNK(%o0,%o1,%g7,0x60,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o3)
334−10: EXT(5b, 10b) ! note for exception handling
335327 sub %g1, 128, %g1 ! detract from length
336328 addx %g0, %g7, %g7 ! add in last carry bit
337329 andcc %g1, 0xffffff80, %g0 ! more to csum?
@@ -356,8 +348,7 @@ cctbl: CSUMCOPY_LASTCHUNK(%o0,%o1,%g7,0x68,%g2,%g3,%g4,%g5) · 18 unmodified lines
356348 CSUMCOPY_LASTCHUNK(%o0,%o1,%g7,0x28,%g2,%g3,%g4,%g5)
357349 CSUMCOPY_LASTCHUNK(%o0,%o1,%g7,0x18,%g2,%g3,%g4,%g5)
358350 CSUMCOPY_LASTCHUNK(%o0,%o1,%g7,0x08,%g2,%g3,%g4,%g5)
359−12: EXT(cctbl, 12b) ! note for exception table handling
360− addx %g0, %g7, %g7
351+12: addx %g0, %g7, %g7
361352 andcc %o3, 0xf, %g0 ! check for low bits set
362353 ccte: bne cc_end_cruft ! something left, handle it out of band
363354 andcc %o3, 8, %g0 ! begin checks for that code
@@ -367,7 +358,6 @@ ccdbl: CSUMCOPY_BIGCHUNK_ALIGNED(%o0,%o1,%g7,0x00,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o · 3 unmodified lines
367358 CSUMCOPY_BIGCHUNK_ALIGNED(%o0,%o1,%g7,0x20,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o3)
368359 CSUMCOPY_BIGCHUNK_ALIGNED(%o0,%o1,%g7,0x40,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o3)
369360 CSUMCOPY_BIGCHUNK_ALIGNED(%o0,%o1,%g7,0x60,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o3)
370−11: EXT(ccdbl, 11b) ! note for exception table handling
371361 sub %g1, 128, %g1 ! detract from length
372362 addx %g0, %g7, %g7 ! add in last carry bit
373363 andcc %g1, 0xffffff80, %g0 ! more to csum?
arch/sparc/lib/copy_user.S+112−203
@@ -21,98 +21,134 @@ · 20 unmodified lines
2121 /* Work around cpp -rob */
2222 #define ALLOC #alloc
2323 #define EXECINSTR #execinstr
24+
25+#define EX_ENTRY(l1, l2) \
26+ .section __ex_table,ALLOC; \
27+ .align 4; \
28+ .word l1, l2; \
29+ .text;
30+
2431 #define EX(x,y,a,b) \
2532 98: x,y; \
2633 .section .fixup,ALLOC,EXECINSTR; \
2734 .align 4; \
28−99: ba fixupretl; \
29− a, b, %g3; \
30− .section __ex_table,ALLOC; \
31− .align 4; \
32− .word 98b, 99b; \
33− .text; \
34− .align 4
35+99: retl; \
36+ a, b, %o0; \
37+ EX_ENTRY(98b, 99b)
3538
3639 #define EX2(x,y,c,d,e,a,b) \
3740 98: x,y; \
3841 .section .fixup,ALLOC,EXECINSTR; \
3942 .align 4; \
4043 99: c, d, e; \
41− ba fixupretl; \
42− a, b, %g3; \
43− .section __ex_table,ALLOC; \
44− .align 4; \
45− .word 98b, 99b; \
46− .text; \
47− .align 4
44+ retl; \
45+ a, b, %o0; \
46+ EX_ENTRY(98b, 99b)
4847
4948 #define EXO2(x,y) \
5049 98: x, y; \
51− .section __ex_table,ALLOC; \
52− .align 4; \
53− .word 98b, 97f; \
54− .text; \
55− .align 4
50+ EX_ENTRY(98b, 97f)
5651
57−#define EXT(start,end,handler) \
58− .section __ex_table,ALLOC; \
59− .align 4; \
60− .word start, 0, end, handler; \
61− .text; \
62− .align 4
52+#define LD(insn, src, offset, reg, label) \
53+98: insn [%src + (offset)], %reg; \
54+ .section .fixup,ALLOC,EXECINSTR; \
55+99: ba label; \
56+ mov offset, %g5; \
57+ EX_ENTRY(98b, 99b)
6358
64−/* Please do not change following macros unless you change logic used
65− * in .fixup at the end of this file as well
66− */
59+#define ST(insn, dst, offset, reg, label) \
60+98: insn %reg, [%dst + (offset)]; \
61+ .section .fixup,ALLOC,EXECINSTR; \
62+99: ba label; \
63+ mov offset, %g5; \
64+ EX_ENTRY(98b, 99b)
6765
6866 /* Both these macros have to start with exactly the same insn */
67+/* left: g7 + (g1 % 128) - offset */
6968 #define MOVE_BIGCHUNK(src, dst, offset, t0, t1, t2, t3, t4, t5, t6, t7) \
70− ldd [%src + (offset) + 0x00], %t0; \
71− ldd [%src + (offset) + 0x08], %t2; \
72− ldd [%src + (offset) + 0x10], %t4; \
73− ldd [%src + (offset) + 0x18], %t6; \
74− st %t0, [%dst + (offset) + 0x00]; \
75− st %t1, [%dst + (offset) + 0x04]; \
76− st %t2, [%dst + (offset) + 0x08]; \
77− st %t3, [%dst + (offset) + 0x0c]; \
78− st %t4, [%dst + (offset) + 0x10]; \
79− st %t5, [%dst + (offset) + 0x14]; \
80− st %t6, [%dst + (offset) + 0x18]; \
81− st %t7, [%dst + (offset) + 0x1c];
82−
69+ LD(ldd, src, offset + 0x00, t0, bigchunk_fault) \
70+ LD(ldd, src, offset + 0x08, t2, bigchunk_fault) \
71+ LD(ldd, src, offset + 0x10, t4, bigchunk_fault) \
72+ LD(ldd, src, offset + 0x18, t6, bigchunk_fault) \
73+ ST(st, dst, offset + 0x00, t0, bigchunk_fault) \
74+ ST(st, dst, offset + 0x04, t1, bigchunk_fault) \
75+ ST(st, dst, offset + 0x08, t2, bigchunk_fault) \
76+ ST(st, dst, offset + 0x0c, t3, bigchunk_fault) \
77+ ST(st, dst, offset + 0x10, t4, bigchunk_fault) \
78+ ST(st, dst, offset + 0x14, t5, bigchunk_fault) \
79+ ST(st, dst, offset + 0x18, t6, bigchunk_fault) \
80+ ST(st, dst, offset + 0x1c, t7, bigchunk_fault)
81+
82+/* left: g7 + (g1 % 128) - offset */
8383 #define MOVE_BIGALIGNCHUNK(src, dst, offset, t0, t1, t2, t3, t4, t5, t6, t7) \
84− ldd [%src + (offset) + 0x00], %t0; \
85− ldd [%src + (offset) + 0x08], %t2; \
86− ldd [%src + (offset) + 0x10], %t4; \
87− ldd [%src + (offset) + 0x18], %t6; \
88− std %t0, [%dst + (offset) + 0x00]; \
89− std %t2, [%dst + (offset) + 0x08]; \
90− std %t4, [%dst + (offset) + 0x10]; \
91− std %t6, [%dst + (offset) + 0x18];
84+ LD(ldd, src, offset + 0x00, t0, bigchunk_fault) \
85+ LD(ldd, src, offset + 0x08, t2, bigchunk_fault) \
86+ LD(ldd, src, offset + 0x10, t4, bigchunk_fault) \
87+ LD(ldd, src, offset + 0x18, t6, bigchunk_fault) \
88+ ST(std, dst, offset + 0x00, t0, bigchunk_fault) \
89+ ST(std, dst, offset + 0x08, t2, bigchunk_fault) \
90+ ST(std, dst, offset + 0x10, t4, bigchunk_fault) \
91+ ST(std, dst, offset + 0x18, t6, bigchunk_fault)
9292
93+ .section .fixup,#alloc,#execinstr
94+bigchunk_fault:
95+ sub %g7, %g5, %o0
96+ and %g1, 127, %g1
97+ retl
98+ add %o0, %g1, %o0
99+
100+/* left: offset + 16 + (g1 % 16) */
93101 #define MOVE_LASTCHUNK(src, dst, offset, t0, t1, t2, t3) \
94− ldd [%src - (offset) - 0x10], %t0; \
95− ldd [%src - (offset) - 0x08], %t2; \
96− st %t0, [%dst - (offset) - 0x10]; \
97− st %t1, [%dst - (offset) - 0x0c]; \
98− st %t2, [%dst - (offset) - 0x08]; \
99− st %t3, [%dst - (offset) - 0x04];
102+ LD(ldd, src, -(offset + 0x10), t0, lastchunk_fault) \
103+ LD(ldd, src, -(offset + 0x08), t2, lastchunk_fault) \
104+ ST(st, dst, -(offset + 0x10), t0, lastchunk_fault) \
105+ ST(st, dst, -(offset + 0x0c), t1, lastchunk_fault) \
106+ ST(st, dst, -(offset + 0x08), t2, lastchunk_fault) \
107+ ST(st, dst, -(offset + 0x04), t3, lastchunk_fault)
100108
101−#define MOVE_HALFCHUNK(src, dst, offset, t0, t1, t2, t3) \
102− lduh [%src + (offset) + 0x00], %t0; \
103− lduh [%src + (offset) + 0x02], %t1; \
104− lduh [%src + (offset) + 0x04], %t2; \
105− lduh [%src + (offset) + 0x06], %t3; \
106− sth %t0, [%dst + (offset) + 0x00]; \
107− sth %t1, [%dst + (offset) + 0x02]; \
108− sth %t2, [%dst + (offset) + 0x04]; \
109− sth %t3, [%dst + (offset) + 0x06];
109+ .section .fixup,#alloc,#execinstr
110+lastchunk_fault:
111+ and %g1, 15, %g1
112+ retl
113+ sub %g1, %g5, %o0
110114
115+/* left: o3 + (o2 % 16) - offset */
116+#define MOVE_HALFCHUNK(src, dst, offset, t0, t1, t2, t3) \
117+ LD(lduh, src, offset + 0x00, t0, halfchunk_fault) \
118+ LD(lduh, src, offset + 0x02, t1, halfchunk_fault) \
119+ LD(lduh, src, offset + 0x04, t2, halfchunk_fault) \
120+ LD(lduh, src, offset + 0x06, t3, halfchunk_fault) \
121+ ST(sth, dst, offset + 0x00, t0, halfchunk_fault) \
122+ ST(sth, dst, offset + 0x02, t1, halfchunk_fault) \
123+ ST(sth, dst, offset + 0x04, t2, halfchunk_fault) \
124+ ST(sth, dst, offset + 0x06, t3, halfchunk_fault)
125+
126+/* left: o3 + (o2 % 16) + offset + 2 */
111127 #define MOVE_SHORTCHUNK(src, dst, offset, t0, t1) \
112− ldub [%src - (offset) - 0x02], %t0; \
113− ldub [%src - (offset) - 0x01], %t1; \
114− stb %t0, [%dst - (offset) - 0x02]; \
115− stb %t1, [%dst - (offset) - 0x01];
128+ LD(ldub, src, -(offset + 0x02), t0, halfchunk_fault) \
129+ LD(ldub, src, -(offset + 0x01), t1, halfchunk_fault) \
130+ ST(stb, dst, -(offset + 0x02), t0, halfchunk_fault) \
131+ ST(stb, dst, -(offset + 0x01), t1, halfchunk_fault)
132+
133+ .section .fixup,#alloc,#execinstr
134+halfchunk_fault:
135+ and %o2, 15, %o2
136+ sub %o3, %g5, %o3
137+ retl
138+ add %o2, %o3, %o0
139+
140+/* left: offset + 2 + (o2 % 2) */
141+#define MOVE_LAST_SHORTCHUNK(src, dst, offset, t0, t1) \
142+ LD(ldub, src, -(offset + 0x02), t0, last_shortchunk_fault) \
143+ LD(ldub, src, -(offset + 0x01), t1, last_shortchunk_fault) \
144+ ST(stb, dst, -(offset + 0x02), t0, last_shortchunk_fault) \
145+ ST(stb, dst, -(offset + 0x01), t1, last_shortchunk_fault)
146+
147+ .section .fixup,#alloc,#execinstr
148+last_shortchunk_fault:
149+ and %o2, 1, %o2
150+ retl
151+ sub %o2, %g5, %o0
116152
117153 .text
118154 .align 4
@@ -182,8 +218,6 @@ __copy_user: /* %o0=dst %o1=src %o2=len */ · 63 unmodified lines
182218 MOVE_BIGCHUNK(o1, o0, 0x20, o2, o3, o4, o5, g2, g3, g4, g5)
183219 MOVE_BIGCHUNK(o1, o0, 0x40, o2, o3, o4, o5, g2, g3, g4, g5)
184220 MOVE_BIGCHUNK(o1, o0, 0x60, o2, o3, o4, o5, g2, g3, g4, g5)
185−80:
186− EXT(5b, 80b, 50f)
187221 subcc %g7, 128, %g7
188222 add %o1, 128, %o1
189223 bne 5b
@@ -201,7 +235,6 @@ __copy_user: /* %o0=dst %o1=src %o2=len */ · 11 unmodified lines
201235 jmpl %o5 + %lo(copy_user_table_end), %g0
202236 add %o0, %g7, %o0
203237
204−copy_user_table:
205238 MOVE_LASTCHUNK(o1, o0, 0x60, g2, g3, g4, g5)
206239 MOVE_LASTCHUNK(o1, o0, 0x50, g2, g3, g4, g5)
207240 MOVE_LASTCHUNK(o1, o0, 0x40, g2, g3, g4, g5)
@@ -210,7 +243,6 @@ copy_user_table: · 2 unmodified lines
210243 MOVE_LASTCHUNK(o1, o0, 0x10, g2, g3, g4, g5)
211244 MOVE_LASTCHUNK(o1, o0, 0x00, g2, g3, g4, g5)
212245 copy_user_table_end:
213− EXT(copy_user_table, copy_user_table_end, 51f)
214246 be copy_user_last7
215247 andcc %g1, 4, %g0
216248
@@ -250,8 +282,6 @@ ldd_std: · 33 unmodified lines
250282 MOVE_BIGALIGNCHUNK(o1, o0, 0x20, o2, o3, o4, o5, g2, g3, g4, g5)
251283 MOVE_BIGALIGNCHUNK(o1, o0, 0x40, o2, o3, o4, o5, g2, g3, g4, g5)
252284 MOVE_BIGALIGNCHUNK(o1, o0, 0x60, o2, o3, o4, o5, g2, g3, g4, g5)
253−81:
254− EXT(ldd_std, 81b, 52f)
255285 subcc %g7, 128, %g7
256286 add %o1, 128, %o1
257287 bne ldd_std
@@ -290,8 +320,6 @@ cannot_optimize: · 32 unmodified lines
290320 10:
291321 MOVE_HALFCHUNK(o1, o0, 0x00, g2, g3, g4, g5)
292322 MOVE_HALFCHUNK(o1, o0, 0x08, g2, g3, g4, g5)
293−82:
294− EXT(10b, 82b, 53f)
295323 subcc %o3, 0x10, %o3
296324 add %o1, 0x10, %o1
297325 bne 10b
@@ -308,8 +336,6 @@ byte_chunk: · 10 unmodified lines
308336 MOVE_SHORTCHUNK(o1, o0, -0x0c, g2, g3)
309337 MOVE_SHORTCHUNK(o1, o0, -0x0e, g2, g3)
310338 MOVE_SHORTCHUNK(o1, o0, -0x10, g2, g3)
311−83:
312− EXT(byte_chunk, 83b, 54f)
313339 subcc %o3, 0x10, %o3
314340 add %o1, 0x10, %o1
315341 bne byte_chunk
@@ -325,16 +351,14 @@ short_end: · 9 unmodified lines
325351 add %o1, %o3, %o1
326352 jmpl %o5 + %lo(short_table_end), %g0
327353 andcc %o2, 1, %g0
328−84:
329− MOVE_SHORTCHUNK(o1, o0, 0x0c, g2, g3)
330− MOVE_SHORTCHUNK(o1, o0, 0x0a, g2, g3)
331− MOVE_SHORTCHUNK(o1, o0, 0x08, g2, g3)
332− MOVE_SHORTCHUNK(o1, o0, 0x06, g2, g3)
333− MOVE_SHORTCHUNK(o1, o0, 0x04, g2, g3)
334− MOVE_SHORTCHUNK(o1, o0, 0x02, g2, g3)
335− MOVE_SHORTCHUNK(o1, o0, 0x00, g2, g3)
354+ MOVE_LAST_SHORTCHUNK(o1, o0, 0x0c, g2, g3)
355+ MOVE_LAST_SHORTCHUNK(o1, o0, 0x0a, g2, g3)
356+ MOVE_LAST_SHORTCHUNK(o1, o0, 0x08, g2, g3)
357+ MOVE_LAST_SHORTCHUNK(o1, o0, 0x06, g2, g3)
358+ MOVE_LAST_SHORTCHUNK(o1, o0, 0x04, g2, g3)
359+ MOVE_LAST_SHORTCHUNK(o1, o0, 0x02, g2, g3)
360+ MOVE_LAST_SHORTCHUNK(o1, o0, 0x00, g2, g3)
336361 short_table_end:
337− EXT(84b, short_table_end, 55f)
338362 be 1f
339363 nop
340364 EX(ldub [%o1], %g2, add %g0, 1)
@@ -363,123 +387,8 @@ short_aligned_end: · 22 unmodified lines
363387 .section .fixup,#alloc,#execinstr
364388 .align 4
365389 97:
366− mov %o2, %g3
367−fixupretl:
368390 retl
369− mov %g3, %o0
370−
371−/* exception routine sets %g2 to (broken_insn - first_insn)>>2 */
372−50:
373−/* This magic counts how many bytes are left when crash in MOVE_BIGCHUNK
374− * happens. This is derived from the amount ldd reads, st stores, etc.
375− * x = g2 % 12;
376− * g3 = g1 + g7 - ((g2 / 12) * 32 + (x < 4) ? 0 : (x - 4) * 4);
377− * o0 += (g2 / 12) * 32;
378− */
379− cmp %g2, 12
380− add %o0, %g7, %o0
381− bcs 1f
382− cmp %g2, 24
383− bcs 2f
384− cmp %g2, 36
385− bcs 3f
386− nop
387− sub %g2, 12, %g2
388− sub %g7, 32, %g7
389−3: sub %g2, 12, %g2
390− sub %g7, 32, %g7
391−2: sub %g2, 12, %g2
392− sub %g7, 32, %g7
393−1: cmp %g2, 4
394− bcs,a 60f
395− clr %g2
396− sub %g2, 4, %g2
397− sll %g2, 2, %g2
398−60: and %g1, 0x7f, %g3
399− sub %o0, %g7, %o0
400− add %g3, %g7, %g3
401− ba fixupretl
402− sub %g3, %g2, %g3
403−51:
404−/* i = 41 - g2; j = i % 6;
405− * g3 = (g1 & 15) + (i / 6) * 16 + (j < 4) ? (j + 1) * 4 : 16;
406− * o0 -= (i / 6) * 16 + 16;
407− */
408− neg %g2
409− and %g1, 0xf, %g1
410− add %g2, 41, %g2
411− add %o0, %g1, %o0
412−1: cmp %g2, 6
413− bcs,a 2f
414− cmp %g2, 4
415− add %g1, 16, %g1
416− b 1b
417− sub %g2, 6, %g2
418−2: bcc,a 2f
419− mov 16, %g2
420− inc %g2
421− sll %g2, 2, %g2
422−2: add %g1, %g2, %g3
423− ba fixupretl
424− sub %o0, %g3, %o0
425−52:
426−/* g3 = g1 + g7 - (g2 / 8) * 32 + (g2 & 4) ? (g2 & 3) * 8 : 0;
427− o0 += (g2 / 8) * 32 */
428− andn %g2, 7, %g4
429− add %o0, %g7, %o0
430− andcc %g2, 4, %g0
431− and %g2, 3, %g2
432− sll %g4, 2, %g4
433− sll %g2, 3, %g2
434− bne 60b
435− sub %g7, %g4, %g7
436− ba 60b
437− clr %g2
438−53:
439−/* g3 = o3 + (o2 & 15) - (g2 & 8) - (g2 & 4) ? (g2 & 3) * 2 : 0;
440− o0 += (g2 & 8) */
441− and %g2, 3, %g4
442− andcc %g2, 4, %g0
443− and %g2, 8, %g2
444− sll %g4, 1, %g4
445− be 1f
446− add %o0, %g2, %o0
447− add %g2, %g4, %g2
448−1: and %o2, 0xf, %g3
449− add %g3, %o3, %g3
450− ba fixupretl
451− sub %g3, %g2, %g3
452−54:
453−/* g3 = o3 + (o2 & 15) - (g2 / 4) * 2 - (g2 & 2) ? (g2 & 1) : 0;
454− o0 += (g2 / 4) * 2 */
455− srl %g2, 2, %o4
456− and %g2, 1, %o5
457− srl %g2, 1, %g2
458− add %o4, %o4, %o4
459− and %o5, %g2, %o5
460− and %o2, 0xf, %o2
461− add %o0, %o4, %o0
462− sub %o3, %o5, %o3
463− sub %o2, %o4, %o2
464− ba fixupretl
465− add %o2, %o3, %g3
466−55:
467−/* i = 27 - g2;
468− g3 = (o2 & 1) + i / 4 * 2 + !(i & 3);
469− o0 -= i / 4 * 2 + 1 */
470− neg %g2
471− and %o2, 1, %o2
472− add %g2, 27, %g2
473− srl %g2, 2, %o5
474− andcc %g2, 3, %g0
475− mov 1, %g2
476− add %o5, %o5, %o5
477− be,a 1f
478− clr %g2
479−1: add %g2, %o5, %g3
480− sub %o0, %g3, %o0
481− ba fixupretl
482− add %g3, %o2, %g3
391+ mov %o2, %o0
483392
484393 .globl __copy_user_end
485394 __copy_user_end:
arch/sparc/lib/memset.S+33−54
@@ -19,7 +19,7 @@ · 18 unmodified lines
1919 98: x,y; \
2020 .section .fixup,ALLOC,EXECINSTR; \
2121 .align 4; \
22−99: ba 30f; \
22+99: retl; \
2323 a, b, %o0; \
2424 .section __ex_table,ALLOC; \
2525 .align 4; \
@@ -27,35 +27,44 @@ · 1 unmodified line
2727 .text; \
2828 .align 4
2929
30−#define EXT(start,end,handler) \
30+#define STORE(source, base, offset, n) \
31+98: std source, [base + offset + n]; \
32+ .section .fixup,ALLOC,EXECINSTR; \
33+ .align 4; \
34+99: ba 30f; \
35+ sub %o3, n - offset, %o3; \
3136 .section __ex_table,ALLOC; \
3237 .align 4; \
33− .word start, 0, end, handler; \
38+ .word 98b, 99b; \
3439 .text; \
35− .align 4
40+ .align 4;
41+
42+#define STORE_LAST(source, base, offset, n) \
43+ EX(std source, [base - offset - n], \
44+ add %o1, offset + n);
3645
3746 /* Please don't change these macros, unless you change the logic
3847 * in the .fixup section below as well.
3948 * Store 64 bytes at (BASE + OFFSET) using value SOURCE. */
40−#define ZERO_BIG_BLOCK(base, offset, source) \
41− std source, [base + offset + 0x00]; \
42− std source, [base + offset + 0x08]; \
43− std source, [base + offset + 0x10]; \
44− std source, [base + offset + 0x18]; \
45− std source, [base + offset + 0x20]; \
46− std source, [base + offset + 0x28]; \
47− std source, [base + offset + 0x30]; \
48− std source, [base + offset + 0x38];
49+#define ZERO_BIG_BLOCK(base, offset, source) \
50+ STORE(source, base, offset, 0x00); \
51+ STORE(source, base, offset, 0x08); \
52+ STORE(source, base, offset, 0x10); \
53+ STORE(source, base, offset, 0x18); \
54+ STORE(source, base, offset, 0x20); \
55+ STORE(source, base, offset, 0x28); \
56+ STORE(source, base, offset, 0x30); \
57+ STORE(source, base, offset, 0x38);
4958
5059 #define ZERO_LAST_BLOCKS(base, offset, source) \
51− std source, [base - offset - 0x38]; \
52− std source, [base - offset - 0x30]; \
53− std source, [base - offset - 0x28]; \
54− std source, [base - offset - 0x20]; \
55− std source, [base - offset - 0x18]; \
56− std source, [base - offset - 0x10]; \
57− std source, [base - offset - 0x08]; \
58− std source, [base - offset - 0x00];
60+ STORE_LAST(source, base, offset, 0x38); \
61+ STORE_LAST(source, base, offset, 0x30); \
62+ STORE_LAST(source, base, offset, 0x28); \
63+ STORE_LAST(source, base, offset, 0x20); \
64+ STORE_LAST(source, base, offset, 0x18); \
65+ STORE_LAST(source, base, offset, 0x10); \
66+ STORE_LAST(source, base, offset, 0x08); \
67+ STORE_LAST(source, base, offset, 0x00);
5968
6069 .text
6170 .align 4
@@ -68,8 +77,6 @@ __bzero_begin: · 6 unmodified lines
6877 .globl memset
6978 EXPORT_SYMBOL(__bzero)
7079 EXPORT_SYMBOL(memset)
71− .globl __memset_start, __memset_end
72−__memset_start:
7380 memset:
7481 mov %o0, %g1
7582 mov 1, %g4
@@ -122,8 +129,6 @@ __bzero: · 46 unmodified lines
122129 ZERO_BIG_BLOCK(%o0, 0x00, %g2)
123130 subcc %o3, 128, %o3
124131 ZERO_BIG_BLOCK(%o0, 0x40, %g2)
125−11:
126− EXT(10b, 11b, 20f)
127132 bne 10b
128133 add %o0, 128, %o0
129134
@@ -138,11 +143,9 @@ __bzero: · 8 unmodified lines
138143 jmp %o4
139144 add %o0, %o2, %o0
140145
141−12:
142146 ZERO_LAST_BLOCKS(%o0, 0x48, %g2)
143147 ZERO_LAST_BLOCKS(%o0, 0x08, %g2)
144148 13:
145− EXT(12b, 13b, 21f)
146149 be 8f
147150 andcc %o1, 4, %g0
148151
@@ -182,37 +185,13 @@ __bzero: · 33 unmodified lines
182185 5:
183186 retl
184187 clr %o0
185−__memset_end:
186188
187189 .section .fixup,#alloc,#execinstr
188190 .align 4
189−20:
190− cmp %g2, 8
191− bleu 1f
192− and %o1, 0x7f, %o1
193− sub %g2, 9, %g2
194− add %o3, 64, %o3
195−1:
196− sll %g2, 3, %g2
197− add %o3, %o1, %o0
198− b 30f
199− sub %o0, %g2, %o0
200−21:
201− mov 8, %o0
202− and %o1, 7, %o1
203− sub %o0, %g2, %o0
204− sll %o0, 3, %o0
205− b 30f
206− add %o0, %o1, %o0
207191 30:
208−/* %o4 is faulting address, %o5 is %pc where fault occurred */
209− save %sp, -104, %sp
210− mov %i5, %o0
211− mov %i7, %o1
212− call lookup_fault
213− mov %i4, %o2
214− ret
215− restore
192+ and %o1, 0x7f, %o1
193+ retl
194+ add %o3, %o1, %o0
216195
217196 .globl __bzero_end
218197 __bzero_end:
arch/sparc/mm/Makefile+1−1
@@ -8,7 +8,7 @@ ccflags-y := -Werror · 7 unmodified lines
88 obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o
99 obj-y += fault_$(BITS).o
1010 obj-y += init_$(BITS).o
11−obj-$(CONFIG_SPARC32) += extable.o srmmu.o iommu.o io-unit.o
11+obj-$(CONFIG_SPARC32) += srmmu.o iommu.o io-unit.o
1212 obj-$(CONFIG_SPARC32) += srmmu_access.o
1313 obj-$(CONFIG_SPARC32) += hypersparc.o viking.o tsunami.o swift.o
1414 obj-$(CONFIG_SPARC32) += leon_mm.o
arch/sparc/mm/extable.c+0−107
@@ -1,107 +0,0 @@
1−// SPDX-License-Identifier: GPL-2.0
2−/*
3− * linux/arch/sparc/mm/extable.c
4− */
5−
6−#include <linux/module.h>
7−#include <linux/extable.h>
8−#include <linux/uaccess.h>
9−
10−void sort_extable(struct exception_table_entry *start,
11− struct exception_table_entry *finish)
12−{
13−}
14−
15−/* Caller knows they are in a range if ret->fixup == 0 */
16−const struct exception_table_entry *
17−search_extable(const struct exception_table_entry *base,
18− const size_t num,
19− unsigned long value)
20−{
21− int i;
22−
23− /* Single insn entries are encoded as:
24− * word 1: insn address
25− * word 2: fixup code address
26− *
27− * Range entries are encoded as:
28− * word 1: first insn address
29− * word 2: 0
30− * word 3: last insn address + 4 bytes
31− * word 4: fixup code address
32− *
33− * Deleted entries are encoded as:
34− * word 1: unused
35− * word 2: -1
36− *
37− * See asm/uaccess.h for more details.
38− */
39−
40− /* 1. Try to find an exact match. */
41− for (i = 0; i < num; i++) {
42− if (base[i].fixup == 0) {
43− /* A range entry, skip both parts. */
44− i++;
45− continue;
46− }
47−
48− /* A deleted entry; see trim_init_extable */
49− if (base[i].fixup == -1)
50− continue;
51−
52− if (base[i].insn == value)
53− return &base[i];
54− }
55−
56− /* 2. Try to find a range match. */
57− for (i = 0; i < (num - 1); i++) {
58− if (base[i].fixup)
59− continue;
60−
61− if (base[i].insn <= value && base[i + 1].insn > value)
62− return &base[i];
63−
64− i++;
65− }
66−
67− return NULL;
68−}
69−
70−#ifdef CONFIG_MODULES
71−/* We could memmove them around; easier to mark the trimmed ones. */
72−void trim_init_extable(struct module *m)
73−{
74− unsigned int i;
75− bool range;
76−
77− for (i = 0; i < m->num_exentries; i += range ? 2 : 1) {
78− range = m->extable[i].fixup == 0;
79−
80− if (within_module_init(m->extable[i].insn, m)) {
81− m->extable[i].fixup = -1;
82− if (range)
83− m->extable[i+1].fixup = -1;
84− }
85− if (range)
86− i++;
87− }
88−}
89−#endif /* CONFIG_MODULES */
90−
91−/* Special extable search, which handles ranges. Returns fixup */
92−unsigned long search_extables_range(unsigned long addr, unsigned long *g2)
93−{
94− const struct exception_table_entry *entry;
95−
96− entry = search_exception_tables(addr);
97− if (!entry)
98− return 0;
99−
100− /* Inside range? Fix g2 and return correct fixup */
101− if (!entry->fixup) {
102− *g2 = (addr - entry->insn) / 4;
103− return (entry + 1)->fixup;
104− }
105−
106− return entry->fixup;
107−}
arch/sparc/mm/fault_32.c+10−70
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 #include <linux/interrupt.h>
2424 #include <linux/kdebug.h>
2525 #include <linux/uaccess.h>
26+#include <linux/extable.h>
2627
2728 #include <asm/page.h>
2829 #include <asm/openprom.h>
@@ -54,54 +55,6 @@ static void __noreturn unhandled_fault(unsigned long address, · 25 unmodified lines
5455 die_if_kernel("Oops", regs);
5556 }
5657
57−asmlinkage int lookup_fault(unsigned long pc, unsigned long ret_pc,
58− unsigned long address)
59−{
60− struct pt_regs regs;
61− unsigned long g2;
62− unsigned int insn;
63− int i;
64−
65− i = search_extables_range(ret_pc, &g2);
66− switch (i) {
67− case 3:
68− /* load & store will be handled by fixup */
69− return 3;
70−
71− case 1:
72− /* store will be handled by fixup, load will bump out */
73− /* for _to_ macros */
74− insn = *((unsigned int *) pc);
75− if ((insn >> 21) & 1)
76− return 1;
77− break;
78−
79− case 2:
80− /* load will be handled by fixup, store will bump out */
81− /* for _from_ macros */
82− insn = *((unsigned int *) pc);
83− if (!((insn >> 21) & 1) || ((insn>>19)&0x3f) == 15)
84− return 2;
85− break;
86−
87− default:
88− break;
89− }
90−
91− memset(&regs, 0, sizeof(regs));
92− regs.pc = pc;
93− regs.npc = pc + 4;
94− __asm__ __volatile__(
95− "rd %%psr, %0\n\t"
96− "nop\n\t"
97− "nop\n\t"
98− "nop\n" : "=r" (regs.psr));
99− unhandled_fault(address, current, &regs);
100−
101− /* Not reached */
102− return 0;
103−}
104−
10558 static inline void
10659 show_signal_msg(struct pt_regs *regs, int sig, int code,
10760 unsigned long address, struct task_struct *tsk)
@@ -162,8 +115,6 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write, · 54 unmodified lines
162115 struct vm_area_struct *vma;
163116 struct task_struct *tsk = current;
164117 struct mm_struct *mm = tsk->mm;
165− unsigned int fixup;
166− unsigned long g2;
167118 int from_user = !(regs->psr & PSR_PS);
168119 int code;
169120 vm_fault_t fault;
@@ -281,30 +232,19 @@ bad_area_nosemaphore: · 111 unmodified lines
281232
282233 /* Is this in ex_table? */
283234 no_context:
284− g2 = regs->u_regs[UREG_G2];
285235 if (!from_user) {
286− fixup = search_extables_range(regs->pc, &g2);
287− /* Values below 10 are reserved for other things */
288− if (fixup > 10) {
289− extern const unsigned int __memset_start[];
290− extern const unsigned int __memset_end[];
236+ const struct exception_table_entry *entry;
291237
238+ entry = search_exception_tables(regs->pc);
292239 #ifdef DEBUG_EXCEPTIONS
293− printk("Exception: PC<%08lx> faddr<%08lx>\n",
294− regs->pc, address);
295− printk("EX_TABLE: insn<%08lx> fixup<%08x> g2<%08lx>\n",
296− regs->pc, fixup, g2);
240+ printk("Exception: PC<%08lx> faddr<%08lx>\n",
241+ regs->pc, address);
242+ printk("EX_TABLE: insn<%08lx> fixup<%08x>\n",
243+ regs->pc, entry->fixup);
297244 #endif
298− if ((regs->pc >= (unsigned long)__memset_start &&
299− regs->pc < (unsigned long)__memset_end)) {
300− regs->u_regs[UREG_I4] = address;
301− regs->u_regs[UREG_I5] = regs->pc;
302− }
303− regs->u_regs[UREG_G2] = g2;
304− regs->pc = fixup;
305− regs->npc = regs->pc + 4;
306− return;
307− }
245+ regs->pc = entry->fixup;
246+ regs->npc = regs->pc + 4;
247+ return;
308248 }
309249
310250 unhandled_fault(address, tsk, regs);
arch/sparc/mm/mm_32.h+0−2
@@ -1,7 +1,5 @@
11 /* SPDX-License-Identifier: GPL-2.0 */
22 /* fault_32.c - visible as they are called from assembler */
3−asmlinkage int lookup_fault(unsigned long pc, unsigned long ret_pc,
4− unsigned long address);
53 asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
64 unsigned long address);
75
arch/x86/Makefile+1−1
@@ -27,7 +27,7 @@ endif · 26 unmodified lines
2727 REALMODE_CFLAGS := -m16 -g -Os -DDISABLE_BRANCH_PROFILING \
2828 -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
2929 -fno-strict-aliasing -fomit-frame-pointer -fno-pic \
30− -mno-mmx -mno-sse
30+ -mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)
3131
3232 REALMODE_CFLAGS += -ffreestanding
3333 REALMODE_CFLAGS += -fno-stack-protector
arch/x86/entry/common.c+2−1
@@ -128,7 +128,8 @@ static noinstr bool __do_fast_syscall_32(struct pt_regs *regs) · 127 unmodified lines
128128 regs->ax = -EFAULT;
129129
130130 instrumentation_end();
131− syscall_exit_to_user_mode(regs);
131+ local_irq_disable();
132+ irqentry_exit_to_user_mode(regs);
132133 return false;
133134 }
134135
arch/x86/entry/entry_64_compat.S+2−0
@@ -210,6 +210,8 @@ SYM_CODE_START(entry_SYSCALL_compat) · 209 unmodified lines
210210 /* Switch to the kernel stack */
211211 movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp
212212
213+SYM_INNER_LABEL(entry_SYSCALL_compat_safe_stack, SYM_L_GLOBAL)
214+
213215 /* Construct struct pt_regs on stack */
214216 pushq $__USER32_DS /* pt_regs->ss */
215217 pushq %r8 /* pt_regs->sp */
arch/x86/events/core.c+6−9
@@ -81,7 +81,11 @@ DEFINE_STATIC_CALL_NULL(x86_pmu_swap_task_ctx, *x86_pmu.swap_task_ctx); · 80 unmodified lines
8181 DEFINE_STATIC_CALL_NULL(x86_pmu_drain_pebs, *x86_pmu.drain_pebs);
8282 DEFINE_STATIC_CALL_NULL(x86_pmu_pebs_aliases, *x86_pmu.pebs_aliases);
8383
84−DEFINE_STATIC_CALL_NULL(x86_pmu_guest_get_msrs, *x86_pmu.guest_get_msrs);
84+/*
85+ * This one is magic, it will get called even when PMU init fails (because
86+ * there is no PMU), in which case it should simply return NULL.
87+ */
88+DEFINE_STATIC_CALL_RET0(x86_pmu_guest_get_msrs, *x86_pmu.guest_get_msrs);
8589
8690 u64 __read_mostly hw_cache_event_ids
8791 [PERF_COUNT_HW_CACHE_MAX]
@@ -1944,13 +1948,6 @@ static void _x86_pmu_read(struct perf_event *event) · 1856 unmodified lines
19441948 x86_perf_event_update(event);
19451949 }
19461950
1947−static inline struct perf_guest_switch_msr *
1948−perf_guest_get_msrs_nop(int *nr)
1949−{
1950− *nr = 0;
1951− return NULL;
1952−}
1953−
19541951 static int __init init_hw_perf_events(void)
19551952 {
19561953 struct x86_pmu_quirk *quirk;
@@ -2025,7 +2022,7 @@ static int __init init_hw_perf_events(void) · 68 unmodified lines
20252022 x86_pmu.read = _x86_pmu_read;
20262023
20272024 if (!x86_pmu.guest_get_msrs)
2028− x86_pmu.guest_get_msrs = perf_guest_get_msrs_nop;
2025+ x86_pmu.guest_get_msrs = (void *)&__static_call_return0;
20292026
20302027 x86_pmu_static_call_update();
20312028
arch/x86/events/intel/core.c+7−1
@@ -3659,11 +3659,16 @@ static int intel_pmu_hw_config(struct perf_event *event) · 3658 unmodified lines
36593659 return ret;
36603660
36613661 if (event->attr.precise_ip) {
3662+ if ((event->attr.config & INTEL_ARCH_EVENT_MASK) == INTEL_FIXED_VLBR_EVENT)
3663+ return -EINVAL;
3664+
36623665 if (!(event->attr.freq || (event->attr.wakeup_events && !event->attr.watermark))) {
36633666 event->hw.flags |= PERF_X86_EVENT_AUTO_RELOAD;
36643667 if (!(event->attr.sample_type &
3665− ~intel_pmu_large_pebs_flags(event)))
3668+ ~intel_pmu_large_pebs_flags(event))) {
36663669 event->hw.flags |= PERF_X86_EVENT_LARGE_PEBS;
3670+ event->attach_state |= PERF_ATTACH_SCHED_CB;
3671+ }
36673672 }
36683673 if (x86_pmu.pebs_aliases)
36693674 x86_pmu.pebs_aliases(event);
@@ -3676,6 +3681,7 @@ static int intel_pmu_hw_config(struct perf_event *event) · 6 unmodified lines
36763681 ret = intel_pmu_setup_lbr_filter(event);
36773682 if (ret)
36783683 return ret;
3684+ event->attach_state |= PERF_ATTACH_SCHED_CB;
36793685
36803686 /*
36813687 * BTS is set up earlier in this path, so don't account twice
arch/x86/events/intel/ds.c+1−1
@@ -2010,7 +2010,7 @@ static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs, struct perf_sample_d · 2009 unmodified lines
20102010 */
20112011 if (!pebs_status && cpuc->pebs_enabled &&
20122012 !(cpuc->pebs_enabled & (cpuc->pebs_enabled-1)))
2013− pebs_status = cpuc->pebs_enabled;
2013+ pebs_status = p->status = cpuc->pebs_enabled;
20142014
20152015 bit = find_first_bit((unsigned long *)&pebs_status,
20162016 x86_pmu.max_pebs_events);
arch/x86/include/asm/insn-eval.h+2−0
@@ -23,6 +23,8 @@ unsigned long insn_get_seg_base(struct pt_regs *regs, int seg_reg_idx); · 22 unmodified lines
2323 int insn_get_code_seg_params(struct pt_regs *regs);
2424 int insn_fetch_from_user(struct pt_regs *regs,
2525 unsigned char buf[MAX_INSN_SIZE]);
26+int insn_fetch_from_user_inatomic(struct pt_regs *regs,
27+ unsigned char buf[MAX_INSN_SIZE]);
2628 bool insn_decode(struct insn *insn, struct pt_regs *regs,
2729 unsigned char buf[MAX_INSN_SIZE], int buf_size);
2830
arch/x86/include/asm/kfence.h+6−1
@@ -56,8 +56,13 @@ static inline bool kfence_protect_page(unsigned long addr, bool protect) · 55 unmodified lines
5656 else
5757 set_pte(pte, __pte(pte_val(*pte) | _PAGE_PRESENT));
5858
59− /* Flush this CPU's TLB. */
59+ /*
60+ * Flush this CPU's TLB, assuming whoever did the allocation/free is
61+ * likely to continue running on this CPU.
62+ */
63+ preempt_disable();
6064 flush_tlb_one_kernel(addr);
65+ preempt_enable();
6166 return true;
6267 }
6368
arch/x86/include/asm/kvm_host.h+28−10
@@ -884,12 +884,29 @@ struct kvm_hv_syndbg { · 883 unmodified lines
884884 u64 options;
885885 };
886886
887+/* Current state of Hyper-V TSC page clocksource */
888+enum hv_tsc_page_status {
889+ /* TSC page was not set up or disabled */
890+ HV_TSC_PAGE_UNSET = 0,
891+ /* TSC page MSR was written by the guest, update pending */
892+ HV_TSC_PAGE_GUEST_CHANGED,
893+ /* TSC page MSR was written by KVM userspace, update pending */
894+ HV_TSC_PAGE_HOST_CHANGED,
895+ /* TSC page was properly set up and is currently active */
896+ HV_TSC_PAGE_SET,
897+ /* TSC page is currently being updated and therefore is inactive */
898+ HV_TSC_PAGE_UPDATING,
899+ /* TSC page was set up with an inaccessible GPA */
900+ HV_TSC_PAGE_BROKEN,
901+};
902+
887903 /* Hyper-V emulation context */
888904 struct kvm_hv {
889905 struct mutex hv_lock;
890906 u64 hv_guest_os_id;
891907 u64 hv_hypercall;
892908 u64 hv_tsc_page;
909+ enum hv_tsc_page_status hv_tsc_page_status;
893910
894911 /* Hyper-v based guest crash (NT kernel bugcheck) parameters */
895912 u64 hv_crash_param[HV_X64_MSR_CRASH_PARAMS];
@@ -931,6 +948,12 @@ enum kvm_irqchip_mode { · 35 unmodified lines
931948 KVM_IRQCHIP_SPLIT, /* created with KVM_CAP_SPLIT_IRQCHIP */
932949 };
933950
951+struct kvm_x86_msr_filter {
952+ u8 count;
953+ bool default_allow:1;
954+ struct msr_bitmap_range ranges[16];
955+};
956+
934957 #define APICV_INHIBIT_REASON_DISABLE 0
935958 #define APICV_INHIBIT_REASON_HYPERV 1
936959 #define APICV_INHIBIT_REASON_NESTED 2
@@ -963,7 +986,7 @@ struct kvm_arch { · 26 unmodified lines
963986 struct kvm_pit *vpit;
964987 atomic_t vapics_in_nmi_mode;
965988 struct mutex apic_map_lock;
966− struct kvm_apic_map *apic_map;
989+ struct kvm_apic_map __rcu *apic_map;
967990 atomic_t apic_map_dirty;
968991
969992 bool apic_access_page_done;
@@ -1025,18 +1048,13 @@ struct kvm_arch { · 55 unmodified lines
10251048 bool guest_can_read_msr_platform_info;
10261049 bool exception_payload_enabled;
10271050
1051+ bool bus_lock_detection_enabled;
1052+
10281053 /* Deflect RDMSR and WRMSR to user space when they trigger a #GP */
10291054 u32 user_space_msr_mask;
1055+ struct kvm_x86_msr_filter __rcu *msr_filter;
10301056
1031− struct {
1032− u8 count;
1033− bool default_allow:1;
1034− struct msr_bitmap_range ranges[16];
1035− } msr_filter;
1036−
1037− bool bus_lock_detection_enabled;
1038−
1039− struct kvm_pmu_event_filter *pmu_event_filter;
1057+ struct kvm_pmu_event_filter __rcu *pmu_event_filter;
10401058 struct task_struct *nx_lpage_recovery_thread;
10411059
10421060 #ifdef CONFIG_X86_64
arch/x86/include/asm/processor.h+0−9
@@ -551,15 +551,6 @@ static inline void arch_thread_struct_whitelist(unsigned long *offset, · 550 unmodified lines
551551 *size = fpu_kernel_xstate_size;
552552 }
553553
554−/*
555− * Thread-synchronous status.
556− *
557− * This is different from the flags in that nobody else
558− * ever touches our thread-synchronous status, so we don't
559− * have to worry about atomic accesses.
560− */
561−#define TS_COMPAT 0x0002 /* 32bit syscall active (64BIT)*/
562−
563554 static inline void
564555 native_load_sp0(unsigned long sp0)
565556 {
arch/x86/include/asm/proto.h+1−0
@@ -25,6 +25,7 @@ void __end_SYSENTER_singlestep_region(void); · 24 unmodified lines
2525 void entry_SYSENTER_compat(void);
2626 void __end_entry_SYSENTER_compat(void);
2727 void entry_SYSCALL_compat(void);
28+void entry_SYSCALL_compat_safe_stack(void);
2829 void entry_INT80_compat(void);
2930 #ifdef CONFIG_XEN_PV
3031 void xen_entry_INT80_compat(void);
arch/x86/include/asm/ptrace.h+15−0
@@ -94,6 +94,8 @@ struct pt_regs { · 93 unmodified lines
9494 #include <asm/paravirt_types.h>
9595 #endif
9696
97+#include <asm/proto.h>
98+
9799 struct cpuinfo_x86;
98100 struct task_struct;
99101
@@ -175,6 +177,19 @@ static inline bool any_64bit_mode(struct pt_regs *regs) · 75 unmodified lines
175177 #ifdef CONFIG_X86_64
176178 #define current_user_stack_pointer() current_pt_regs()->sp
177179 #define compat_user_stack_pointer() current_pt_regs()->sp
180+
181+static inline bool ip_within_syscall_gap(struct pt_regs *regs)
182+{
183+ bool ret = (regs->ip >= (unsigned long)entry_SYSCALL_64 &&
184+ regs->ip < (unsigned long)entry_SYSCALL_64_safe_stack);
185+
186+#ifdef CONFIG_IA32_EMULATION
187+ ret = ret || (regs->ip >= (unsigned long)entry_SYSCALL_compat &&
188+ regs->ip < (unsigned long)entry_SYSCALL_compat_safe_stack);
189+#endif
190+
191+ return ret;
192+}
178193 #endif
179194
180195 static inline unsigned long kernel_stack_pointer(struct pt_regs *regs)
arch/x86/include/asm/smap.h+4−6
@@ -58,9 +58,8 @@ static __always_inline unsigned long smap_save(void) · 57 unmodified lines
5858 unsigned long flags;
5959
6060 asm volatile ("# smap_save\n\t"
61− ALTERNATIVE("jmp 1f", "", X86_FEATURE_SMAP)
62− "pushf; pop %0; " __ASM_CLAC "\n\t"
63− "1:"
61+ ALTERNATIVE("", "pushf; pop %0; " __ASM_CLAC "\n\t",
62+ X86_FEATURE_SMAP)
6463 : "=rm" (flags) : : "memory", "cc");
6564
6665 return flags;
@@ -69,9 +68,8 @@ static __always_inline unsigned long smap_save(void) · 2 unmodified lines
6968 static __always_inline void smap_restore(unsigned long flags)
7069 {
7170 asm volatile ("# smap_restore\n\t"
72− ALTERNATIVE("jmp 1f", "", X86_FEATURE_SMAP)
73− "push %0; popf\n\t"
74− "1:"
71+ ALTERNATIVE("", "push %0; popf\n\t",
72+ X86_FEATURE_SMAP)
7573 : : "g" (flags) : "memory", "cc");
7674 }
7775
arch/x86/include/asm/smp.h+1−0
@@ -132,6 +132,7 @@ void native_play_dead(void); · 131 unmodified lines
132132 void play_dead_common(void);
133133 void wbinvd_on_cpu(int cpu);
134134 int wbinvd_on_all_cpus(void);
135+void cond_wakeup_cpu0(void);
135136
136137 void native_smp_send_reschedule(int cpu);
137138 void native_send_call_func_ipi(const struct cpumask *mask);
arch/x86/include/asm/thread_info.h+14−1
@@ -205,10 +205,23 @@ static inline int arch_within_stack_frames(const void * const stack, · 204 unmodified lines
205205
206206 #endif
207207
208+/*
209+ * Thread-synchronous status.
210+ *
211+ * This is different from the flags in that nobody else
212+ * ever touches our thread-synchronous status, so we don't
213+ * have to worry about atomic accesses.
214+ */
215+#define TS_COMPAT 0x0002 /* 32bit syscall active (64BIT)*/
216+
217+#ifndef __ASSEMBLY__
208218 #ifdef CONFIG_COMPAT
209219 #define TS_I386_REGS_POKED 0x0004 /* regs poked by 32-bit ptracer */
220+
221+#define arch_set_restart_data(restart) \
222+ do { restart->arch_data = current_thread_info()->status; } while (0)
223+
210224 #endif
211−#ifndef __ASSEMBLY__
212225
213226 #ifdef CONFIG_X86_32
214227 #define in_ia32_syscall() true
arch/x86/include/asm/xen/page.h+0−12
@@ -86,18 +86,6 @@ clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, · 85 unmodified lines
8686 }
8787 #endif
8888
89−/*
90− * The maximum amount of extra memory compared to the base size. The
91− * main scaling factor is the size of struct page. At extreme ratios
92− * of base:extra, all the base memory can be filled with page
93− * structures for the extra memory, leaving no space for anything
94− * else.
95− *
96− * 10x seems like a reasonable balance between scaling flexibility and
97− * leaving a practically usable system.
98− */
99−#define XEN_EXTRA_MEM_RATIO (10)
100−
10189 /*
10290 * Helper functions to write or read unsigned long values to/from
10391 * memory, when the access may fault.
arch/x86/kernel/acpi/boot.c+12−13
@@ -1554,10 +1554,18 @@ void __init acpi_boot_table_init(void) · 1553 unmodified lines
15541554 /*
15551555 * Initialize the ACPI boot-time table parser.
15561556 */
1557− if (acpi_table_init()) {
1557+ if (acpi_locate_initial_tables())
15581558 disable_acpi();
1559− return;
1560− }
1559+ else
1560+ acpi_reserve_initial_tables();
1561+}
1562+
1563+int __init early_acpi_boot_init(void)
1564+{
1565+ if (acpi_disabled)
1566+ return 1;
1567+
1568+ acpi_table_init_complete();
15611569
15621570 acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf);
15631571
@@ -1570,18 +1578,9 @@ void __init acpi_boot_table_init(void) · 6 unmodified lines
15701578 } else {
15711579 printk(KERN_WARNING PREFIX "Disabling ACPI support\n");
15721580 disable_acpi();
1573− return;
1581+ return 1;
15741582 }
15751583 }
1576−}
1577−
1578−int __init early_acpi_boot_init(void)
1579−{
1580− /*
1581− * If acpi_disabled, bail out
1582− */
1583− if (acpi_disabled)
1584− return 1;
15851584
15861585 /*
15871586 * Process the Multiple APIC Description Table (MADT), if present
arch/x86/kernel/acpi/wakeup_64.S+1−1
@@ -115,7 +115,7 @@ SYM_FUNC_START(do_suspend_lowlevel) · 114 unmodified lines
115115 movq pt_regs_r14(%rax), %r14
116116 movq pt_regs_r15(%rax), %r15
117117
118−#if defined(CONFIG_KASAN) && CONFIG_KASAN_STACK
118+#if defined(CONFIG_KASAN) && defined(CONFIG_KASAN_STACK)
119119 /*
120120 * The suspend path may have poisoned some areas deeper in the stack,
121121 * which we now need to unpoison.
arch/x86/kernel/apic/apic.c+5−0
@@ -2342,6 +2342,11 @@ static int cpuid_to_apicid[] = { · 2341 unmodified lines
23422342 [0 ... NR_CPUS - 1] = -1,
23432343 };
23442344
2345+bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
2346+{
2347+ return phys_id == cpuid_to_apicid[cpu];
2348+}
2349+
23452350 #ifdef CONFIG_SMP
23462351 /**
23472352 * apic_id_is_primary_thread - Check whether APIC ID belongs to a primary thread
arch/x86/kernel/apic/io_apic.c+10−0
@@ -1032,6 +1032,16 @@ static int mp_map_pin_to_irq(u32 gsi, int idx, int ioapic, int pin, · 1031 unmodified lines
10321032 if (idx >= 0 && test_bit(mp_irqs[idx].srcbus, mp_bus_not_pci)) {
10331033 irq = mp_irqs[idx].srcbusirq;
10341034 legacy = mp_is_legacy_irq(irq);
1035+ /*
1036+ * IRQ2 is unusable for historical reasons on systems which
1037+ * have a legacy PIC. See the comment vs. IRQ2 further down.
1038+ *
1039+ * If this gets removed at some point then the related code
1040+ * in lapic_assign_system_vectors() needs to be adjusted as
1041+ * well.
1042+ */
1043+ if (legacy && irq == PIC_CASCADE_IR)
1044+ return -EINVAL;
10351045 }
10361046
10371047 mutex_lock(&ioapic_mutex);
arch/x86/kernel/kprobes/ftrace.c+1−1
@@ -12,7 +12,7 @@ · 11 unmodified lines
1212
1313 #include "common.h"
1414
15−/* Ftrace callback handler for kprobes -- called under preepmt disabed */
15+/* Ftrace callback handler for kprobes -- called under preepmt disabled */
1616 void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
1717 struct ftrace_ops *ops, struct ftrace_regs *fregs)
1818 {
arch/x86/kernel/kvm.c+10−13
@@ -836,28 +836,25 @@ static void kvm_kick_cpu(int cpu) · 835 unmodified lines
836836
837837 static void kvm_wait(u8 *ptr, u8 val)
838838 {
839− unsigned long flags;
840−
841839 if (in_nmi())
842840 return;
843841
844− local_irq_save(flags);
845−
846− if (READ_ONCE(*ptr) != val)
847− goto out;
848−
849842 /*
850843 * halt until it's our turn and kicked. Note that we do safe halt
851844 * for irq enabled case to avoid hang when lock info is overwritten
852845 * in irq spinlock slowpath and no spurious interrupt occur to save us.
853846 */
854− if (arch_irqs_disabled_flags(flags))
855− halt();
856− else
857− safe_halt();
847+ if (irqs_disabled()) {
848+ if (READ_ONCE(*ptr) == val)
849+ halt();
850+ } else {
851+ local_irq_disable();
858852
859−out:
860− local_irq_restore(flags);
853+ if (READ_ONCE(*ptr) == val)
854+ safe_halt();
855+
856+ local_irq_enable();
857+ }
861858 }
862859
863860 #ifdef CONFIG_X86_32
arch/x86/kernel/kvmclock.c+9−10
@@ -268,21 +268,20 @@ static void __init kvmclock_init_mem(void) · 267 unmodified lines
268268
269269 static int __init kvm_setup_vsyscall_timeinfo(void)
270270 {
271−#ifdef CONFIG_X86_64
272− u8 flags;
271+ kvmclock_init_mem();
273272
274− if (!per_cpu(hv_clock_per_cpu, 0) || !kvmclock_vsyscall)
275− return 0;
273+#ifdef CONFIG_X86_64
274+ if (per_cpu(hv_clock_per_cpu, 0) && kvmclock_vsyscall) {
275+ u8 flags;
276276
277− flags = pvclock_read_flags(&hv_clock_boot[0].pvti);
278− if (!(flags & PVCLOCK_TSC_STABLE_BIT))
279− return 0;
277+ flags = pvclock_read_flags(&hv_clock_boot[0].pvti);
278+ if (!(flags & PVCLOCK_TSC_STABLE_BIT))
279+ return 0;
280280
281− kvm_clock.vdso_clock_mode = VDSO_CLOCKMODE_PVCLOCK;
281+ kvm_clock.vdso_clock_mode = VDSO_CLOCKMODE_PVCLOCK;
282+ }
282283 #endif
283284
284− kvmclock_init_mem();
285−
286285 return 0;
287286 }
288287 early_initcall(kvm_setup_vsyscall_timeinfo);
arch/x86/kernel/setup.c+2−5
@@ -1129,6 +1129,8 @@ void __init setup_arch(char **cmdline_p) · 1128 unmodified lines
11291129 reserve_initrd();
11301130
11311131 acpi_table_upgrade();
1132+ /* Look for ACPI tables and reserve memory occupied by them. */
1133+ acpi_boot_table_init();
11321134
11331135 vsmp_init();
11341136
@@ -1136,11 +1138,6 @@ void __init setup_arch(char **cmdline_p) · 1 unmodified line
11361138
11371139 early_platform_quirks();
11381140
1139− /*
1140− * Parse the ACPI tables for possible boot-time SMP configuration.
1141− */
1142− acpi_boot_table_init();
1143−
11441141 early_acpi_boot_init();
11451142
11461143 initmem_init();
arch/x86/kernel/sev-es.c+17−5
@@ -121,8 +121,18 @@ static void __init setup_vc_stacks(int cpu) · 120 unmodified lines
121121 cea_set_pte((void *)vaddr, pa, PAGE_KERNEL);
122122 }
123123
124−static __always_inline bool on_vc_stack(unsigned long sp)
124+static __always_inline bool on_vc_stack(struct pt_regs *regs)
125125 {
126+ unsigned long sp = regs->sp;
127+
128+ /* User-mode RSP is not trusted */
129+ if (user_mode(regs))
130+ return false;
131+
132+ /* SYSCALL gap still has user-mode RSP */
133+ if (ip_within_syscall_gap(regs))
134+ return false;
135+
126136 return ((sp >= __this_cpu_ist_bottom_va(VC)) && (sp < __this_cpu_ist_top_va(VC)));
127137 }
128138
@@ -144,7 +154,7 @@ void noinstr __sev_es_ist_enter(struct pt_regs *regs) · 15 unmodified lines
144154 old_ist = __this_cpu_read(cpu_tss_rw.x86_tss.ist[IST_INDEX_VC]);
145155
146156 /* Make room on the IST stack */
147− if (on_vc_stack(regs->sp))
157+ if (on_vc_stack(regs))
148158 new_ist = ALIGN_DOWN(regs->sp, 8) - sizeof(old_ist);
149159 else
150160 new_ist = old_ist - sizeof(old_ist);
@@ -248,7 +258,7 @@ static enum es_result vc_decode_insn(struct es_em_ctxt *ctxt) · 97 unmodified lines
248258 int res;
249259
250260 if (user_mode(ctxt->regs)) {
251− res = insn_fetch_from_user(ctxt->regs, buffer);
261+ res = insn_fetch_from_user_inatomic(ctxt->regs, buffer);
252262 if (!res) {
253263 ctxt->fi.vector = X86_TRAP_PF;
254264 ctxt->fi.error_code = X86_PF_INSTR | X86_PF_USER;
@@ -1248,13 +1258,12 @@ static __always_inline bool on_vc_fallback_stack(struct pt_regs *regs) · 993 unmodified lines
12481258 DEFINE_IDTENTRY_VC_SAFE_STACK(exc_vmm_communication)
12491259 {
12501260 struct sev_es_runtime_data *data = this_cpu_read(runtime_data);
1261+ irqentry_state_t irq_state;
12511262 struct ghcb_state state;
12521263 struct es_em_ctxt ctxt;
12531264 enum es_result result;
12541265 struct ghcb *ghcb;
12551266
1256− lockdep_assert_irqs_disabled();
1257−
12581267 /*
12591268 * Handle #DB before calling into !noinstr code to avoid recursive #DB.
12601269 */
@@ -1263,6 +1272,8 @@ DEFINE_IDTENTRY_VC_SAFE_STACK(exc_vmm_communication) · 2 unmodified lines
12631272 return;
12641273 }
12651274
1275+ irq_state = irqentry_nmi_enter(regs);
1276+ lockdep_assert_irqs_disabled();
12661277 instrumentation_begin();
12671278
12681279 /*
@@ -1325,6 +1336,7 @@ DEFINE_IDTENTRY_VC_SAFE_STACK(exc_vmm_communication) · 56 unmodified lines
13251336
13261337 out:
13271338 instrumentation_end();
1339+ irqentry_nmi_exit(regs, irq_state);
13281340
13291341 return;
13301342
arch/x86/kernel/signal.c+1−23
@@ -766,30 +766,8 @@ handle_signal(struct ksignal *ksig, struct pt_regs *regs) · 765 unmodified lines
766766
767767 static inline unsigned long get_nr_restart_syscall(const struct pt_regs *regs)
768768 {
769− /*
770− * This function is fundamentally broken as currently
771− * implemented.
772− *
773− * The idea is that we want to trigger a call to the
774− * restart_block() syscall and that we want in_ia32_syscall(),
775− * in_x32_syscall(), etc. to match whatever they were in the
776− * syscall being restarted. We assume that the syscall
777− * instruction at (regs->ip - 2) matches whatever syscall
778− * instruction we used to enter in the first place.
779− *
780− * The problem is that we can get here when ptrace pokes
781− * syscall-like values into regs even if we're not in a syscall
782− * at all.
783− *
784− * For now, we maintain historical behavior and guess based on
785− * stored state. We could do better by saving the actual
786− * syscall arch in restart_block or (with caveats on x32) by
787− * checking if regs->ip points to 'int $0x80'. The current
788− * behavior is incorrect if a tracer has a different bitness
789− * than the tracee.
790− */
791769 #ifdef CONFIG_IA32_EMULATION
792− if (current_thread_info()->status & (TS_COMPAT|TS_I386_REGS_POKED))
770+ if (current->restart_block.arch_data & TS_COMPAT)
793771 return __NR_ia32_restart_syscall;
794772 #endif
795773 #ifdef CONFIG_X86_X32_ABI
arch/x86/kernel/smpboot.c+12−14
@@ -1659,13 +1659,17 @@ void play_dead_common(void) · 1658 unmodified lines
16591659 local_irq_disable();
16601660 }
16611661
1662−static bool wakeup_cpu0(void)
1662+/**
1663+ * cond_wakeup_cpu0 - Wake up CPU0 if needed.
1664+ *
1665+ * If NMI wants to wake up CPU0, start CPU0.
1666+ */
1667+void cond_wakeup_cpu0(void)
16631668 {
16641669 if (smp_processor_id() == 0 && enable_start_cpu0)
1665− return true;
1666−
1667− return false;
1670+ start_cpu0();
16681671 }
1672+EXPORT_SYMBOL_GPL(cond_wakeup_cpu0);
16691673
16701674 /*
16711675 * We need to flush the caches before going to sleep, lest we have
@@ -1734,11 +1738,8 @@ static inline void mwait_play_dead(void) · 62 unmodified lines
17341738 __monitor(mwait_ptr, 0, 0);
17351739 mb();
17361740 __mwait(eax, 0);
1737− /*
1738− * If NMI wants to wake up CPU0, start CPU0.
1739− */
1740− if (wakeup_cpu0())
1741− start_cpu0();
1741+
1742+ cond_wakeup_cpu0();
17421743 }
17431744 }
17441745
@@ -1749,11 +1750,8 @@ void hlt_play_dead(void) · 4 unmodified lines
17491750
17501751 while (1) {
17511752 native_halt();
1752− /*
1753− * If NMI wants to wake up CPU0, start CPU0.
1754− */
1755− if (wakeup_cpu0())
1756− start_cpu0();
1753+
1754+ cond_wakeup_cpu0();
17571755 }
17581756 }
17591757
arch/x86/kernel/traps.c+3−4
@@ -556,7 +556,7 @@ DEFINE_IDTENTRY_ERRORCODE(exc_general_protection) · 555 unmodified lines
556556 tsk->thread.trap_nr = X86_TRAP_GP;
557557
558558 if (fixup_vdso_exception(regs, X86_TRAP_GP, error_code, 0))
559− return;
559+ goto exit;
560560
561561 show_signal(tsk, SIGSEGV, "", desc, regs, error_code);
562562 force_sig(SIGSEGV);
@@ -694,8 +694,7 @@ asmlinkage __visible noinstr struct pt_regs *vc_switch_off_ist(struct pt_regs *r · 131 unmodified lines
694694 * In the SYSCALL entry path the RSP value comes from user-space - don't
695695 * trust it and switch to the current kernel stack
696696 */
697− if (regs->ip >= (unsigned long)entry_SYSCALL_64 &&
698− regs->ip < (unsigned long)entry_SYSCALL_64_safe_stack) {
697+ if (ip_within_syscall_gap(regs)) {
699698 sp = this_cpu_read(cpu_current_top_of_stack);
700699 goto sync;
701700 }
@@ -1058,7 +1057,7 @@ static void math_error(struct pt_regs *regs, int trapnr) · 356 unmodified lines
10581057 goto exit;
10591058
10601059 if (fixup_vdso_exception(regs, trapnr, 0, 0))
1061− return;
1060+ goto exit;
10621061
10631062 force_sig_fault(SIGFPE, si_code,
10641063 (void __user *)uprobe_get_trap_addr(regs));
arch/x86/kernel/unwind_orc.c+7−7
@@ -13,7 +13,7 @@ · 12 unmodified lines
1313
1414 #define orc_warn_current(args...) \
1515 ({ \
16− if (state->task == current) \
16+ if (state->task == current && !state->error) \
1717 orc_warn(args); \
1818 })
1919
@@ -367,8 +367,8 @@ static bool deref_stack_regs(struct unwind_state *state, unsigned long addr, · 347 unmodified lines
367367 if (!stack_access_ok(state, addr, sizeof(struct pt_regs)))
368368 return false;
369369
370− *ip = regs->ip;
371− *sp = regs->sp;
370+ *ip = READ_ONCE_NOCHECK(regs->ip);
371+ *sp = READ_ONCE_NOCHECK(regs->sp);
372372 return true;
373373 }
374374
@@ -380,8 +380,8 @@ static bool deref_stack_iret_regs(struct unwind_state *state, unsigned long addr · 5 unmodified lines
380380 if (!stack_access_ok(state, addr, IRET_FRAME_SIZE))
381381 return false;
382382
383− *ip = regs->ip;
384− *sp = regs->sp;
383+ *ip = READ_ONCE_NOCHECK(regs->ip);
384+ *sp = READ_ONCE_NOCHECK(regs->sp);
385385 return true;
386386 }
387387
@@ -402,12 +402,12 @@ static bool get_reg(struct unwind_state *state, unsigned int reg_off, · 14 unmodified lines
402402 return false;
403403
404404 if (state->full_regs) {
405− *val = ((unsigned long *)state->regs)[reg];
405+ *val = READ_ONCE_NOCHECK(((unsigned long *)state->regs)[reg]);
406406 return true;
407407 }
408408
409409 if (state->prev_regs) {
410− *val = ((unsigned long *)state->prev_regs)[reg];
410+ *val = READ_ONCE_NOCHECK(((unsigned long *)state->prev_regs)[reg]);
411411 return true;
412412 }
413413
arch/x86/kvm/Makefile+1−1
@@ -1,6 +1,6 @@
11 # SPDX-License-Identifier: GPL-2.0
22
3−ccflags-y += -Iarch/x86/kvm
3+ccflags-y += -I $(srctree)/arch/x86/kvm
44 ccflags-$(CONFIG_KVM_WERROR) += -Werror
55
66 ifeq ($(CONFIG_FRAME_POINTER),y)
arch/x86/kvm/hyperv.c+81−10
@@ -520,10 +520,10 @@ static u64 get_time_ref_counter(struct kvm *kvm) · 519 unmodified lines
520520 u64 tsc;
521521
522522 /*
523− * The guest has not set up the TSC page or the clock isn't
524− * stable, fall back to get_kvmclock_ns.
523+ * Fall back to get_kvmclock_ns() when TSC page hasn't been set up,
524+ * is broken, disabled or being updated.
525525 */
526− if (!hv->tsc_ref.tsc_sequence)
526+ if (hv->hv_tsc_page_status != HV_TSC_PAGE_SET)
527527 return div_u64(get_kvmclock_ns(kvm), 100);
528528
529529 vcpu = kvm_get_vcpu(kvm, 0);
@@ -1077,6 +1077,21 @@ static bool compute_tsc_page_parameters(struct pvclock_vcpu_time_info *hv_clock, · 547 unmodified lines
10771077 return true;
10781078 }
10791079
1080+/*
1081+ * Don't touch TSC page values if the guest has opted for TSC emulation after
1082+ * migration. KVM doesn't fully support reenlightenment notifications and TSC
1083+ * access emulation and Hyper-V is known to expect the values in TSC page to
1084+ * stay constant before TSC access emulation is disabled from guest side
1085+ * (HV_X64_MSR_TSC_EMULATION_STATUS). KVM userspace is expected to preserve TSC
1086+ * frequency and guest visible TSC value across migration (and prevent it when
1087+ * TSC scaling is unsupported).
1088+ */
1089+static inline bool tsc_page_update_unsafe(struct kvm_hv *hv)
1090+{
1091+ return (hv->hv_tsc_page_status != HV_TSC_PAGE_GUEST_CHANGED) &&
1092+ hv->hv_tsc_emulation_control;
1093+}
1094+
10801095 void kvm_hv_setup_tsc_page(struct kvm *kvm,
10811096 struct pvclock_vcpu_time_info *hv_clock)
10821097 {
@@ -1087,7 +1102,8 @@ void kvm_hv_setup_tsc_page(struct kvm *kvm, · 4 unmodified lines
10871102 BUILD_BUG_ON(sizeof(tsc_seq) != sizeof(hv->tsc_ref.tsc_sequence));
10881103 BUILD_BUG_ON(offsetof(struct ms_hyperv_tsc_page, tsc_sequence) != 0);
10891104
1090− if (!(hv->hv_tsc_page & HV_X64_MSR_TSC_REFERENCE_ENABLE))
1105+ if (hv->hv_tsc_page_status == HV_TSC_PAGE_BROKEN ||
1106+ hv->hv_tsc_page_status == HV_TSC_PAGE_UNSET)
10911107 return;
10921108
10931109 mutex_lock(&hv->hv_lock);
@@ -1101,7 +1117,15 @@ void kvm_hv_setup_tsc_page(struct kvm *kvm, · 7 unmodified lines
11011117 */
11021118 if (unlikely(kvm_read_guest(kvm, gfn_to_gpa(gfn),
11031119 &tsc_seq, sizeof(tsc_seq))))
1120+ goto out_err;
1121+
1122+ if (tsc_seq && tsc_page_update_unsafe(hv)) {
1123+ if (kvm_read_guest(kvm, gfn_to_gpa(gfn), &hv->tsc_ref, sizeof(hv->tsc_ref)))
1124+ goto out_err;
1125+
1126+ hv->hv_tsc_page_status = HV_TSC_PAGE_SET;
11041127 goto out_unlock;
1128+ }
11051129
11061130 /*
11071131 * While we're computing and writing the parameters, force the
@@ -1110,15 +1134,15 @@ void kvm_hv_setup_tsc_page(struct kvm *kvm, · 2 unmodified lines
11101134 hv->tsc_ref.tsc_sequence = 0;
11111135 if (kvm_write_guest(kvm, gfn_to_gpa(gfn),
11121136 &hv->tsc_ref, sizeof(hv->tsc_ref.tsc_sequence)))
1113− goto out_unlock;
1137+ goto out_err;
11141138
11151139 if (!compute_tsc_page_parameters(hv_clock, &hv->tsc_ref))
1116− goto out_unlock;
1140+ goto out_err;
11171141
11181142 /* Ensure sequence is zero before writing the rest of the struct. */
11191143 smp_wmb();
11201144 if (kvm_write_guest(kvm, gfn_to_gpa(gfn), &hv->tsc_ref, sizeof(hv->tsc_ref)))
1121− goto out_unlock;
1145+ goto out_err;
11221146
11231147 /*
11241148 * Now switch to the TSC page mechanism by writing the sequence.
@@ -1131,8 +1155,45 @@ void kvm_hv_setup_tsc_page(struct kvm *kvm, · 6 unmodified lines
11311155 smp_wmb();
11321156
11331157 hv->tsc_ref.tsc_sequence = tsc_seq;
1134− kvm_write_guest(kvm, gfn_to_gpa(gfn),
1135− &hv->tsc_ref, sizeof(hv->tsc_ref.tsc_sequence));
1158+ if (kvm_write_guest(kvm, gfn_to_gpa(gfn),
1159+ &hv->tsc_ref, sizeof(hv->tsc_ref.tsc_sequence)))
1160+ goto out_err;
1161+
1162+ hv->hv_tsc_page_status = HV_TSC_PAGE_SET;
1163+ goto out_unlock;
1164+
1165+out_err:
1166+ hv->hv_tsc_page_status = HV_TSC_PAGE_BROKEN;
1167+out_unlock:
1168+ mutex_unlock(&hv->hv_lock);
1169+}
1170+
1171+void kvm_hv_invalidate_tsc_page(struct kvm *kvm)
1172+{
1173+ struct kvm_hv *hv = to_kvm_hv(kvm);
1174+ u64 gfn;
1175+
1176+ if (hv->hv_tsc_page_status == HV_TSC_PAGE_BROKEN ||
1177+ hv->hv_tsc_page_status == HV_TSC_PAGE_UNSET ||
1178+ tsc_page_update_unsafe(hv))
1179+ return;
1180+
1181+ mutex_lock(&hv->hv_lock);
1182+
1183+ if (!(hv->hv_tsc_page & HV_X64_MSR_TSC_REFERENCE_ENABLE))
1184+ goto out_unlock;
1185+
1186+ /* Preserve HV_TSC_PAGE_GUEST_CHANGED/HV_TSC_PAGE_HOST_CHANGED states */
1187+ if (hv->hv_tsc_page_status == HV_TSC_PAGE_SET)
1188+ hv->hv_tsc_page_status = HV_TSC_PAGE_UPDATING;
1189+
1190+ gfn = hv->hv_tsc_page >> HV_X64_MSR_TSC_REFERENCE_ADDRESS_SHIFT;
1191+
1192+ hv->tsc_ref.tsc_sequence = 0;
1193+ if (kvm_write_guest(kvm, gfn_to_gpa(gfn),
1194+ &hv->tsc_ref, sizeof(hv->tsc_ref.tsc_sequence)))
1195+ hv->hv_tsc_page_status = HV_TSC_PAGE_BROKEN;
1196+
11361197 out_unlock:
11371198 mutex_unlock(&hv->hv_lock);
11381199 }
@@ -1193,8 +1254,15 @@ static int kvm_hv_set_msr_pw(struct kvm_vcpu *vcpu, u32 msr, u64 data, · 54 unmodified lines
11931254 }
11941255 case HV_X64_MSR_REFERENCE_TSC:
11951256 hv->hv_tsc_page = data;
1196− if (hv->hv_tsc_page & HV_X64_MSR_TSC_REFERENCE_ENABLE)
1257+ if (hv->hv_tsc_page & HV_X64_MSR_TSC_REFERENCE_ENABLE) {
1258+ if (!host)
1259+ hv->hv_tsc_page_status = HV_TSC_PAGE_GUEST_CHANGED;
1260+ else
1261+ hv->hv_tsc_page_status = HV_TSC_PAGE_HOST_CHANGED;
11971262 kvm_make_request(KVM_REQ_MASTERCLOCK_UPDATE, vcpu);
1263+ } else {
1264+ hv->hv_tsc_page_status = HV_TSC_PAGE_UNSET;
1265+ }
11981266 break;
11991267 case HV_X64_MSR_CRASH_P0 ... HV_X64_MSR_CRASH_P4:
12001268 return kvm_hv_msr_set_crash_data(kvm,
@@ -1229,6 +1297,9 @@ static int kvm_hv_set_msr_pw(struct kvm_vcpu *vcpu, u32 msr, u64 data, · 28 unmodified lines
12291297 hv->hv_tsc_emulation_control = data;
12301298 break;
12311299 case HV_X64_MSR_TSC_EMULATION_STATUS:
1300+ if (data && !host)
1301+ return 1;
1302+
12321303 hv->hv_tsc_emulation_status = data;
12331304 break;
12341305 case HV_X64_MSR_TIME_REF_COUNT:
arch/x86/kvm/hyperv.h+1−0
@@ -133,6 +133,7 @@ void kvm_hv_process_stimers(struct kvm_vcpu *vcpu); · 132 unmodified lines
133133
134134 void kvm_hv_setup_tsc_page(struct kvm *kvm,
135135 struct pvclock_vcpu_time_info *hv_clock);
136+void kvm_hv_invalidate_tsc_page(struct kvm *kvm);
136137
137138 void kvm_hv_init_vm(struct kvm *kvm);
138139 void kvm_hv_destroy_vm(struct kvm *kvm);
arch/x86/kvm/lapic.c+11−1
@@ -1642,7 +1642,16 @@ static void apic_timer_expired(struct kvm_lapic *apic, bool from_timer_fn) · 1641 unmodified lines
16421642 }
16431643
16441644 if (kvm_use_posted_timer_interrupt(apic->vcpu)) {
1645− kvm_wait_lapic_expire(vcpu);
1645+ /*
1646+ * Ensure the guest's timer has truly expired before posting an
1647+ * interrupt. Open code the relevant checks to avoid querying
1648+ * lapic_timer_int_injected(), which will be false since the
1649+ * interrupt isn't yet injected. Waiting until after injecting
1650+ * is not an option since that won't help a posted interrupt.
1651+ */
1652+ if (vcpu->arch.apic->lapic_timer.expired_tscdeadline &&
1653+ vcpu->arch.apic->lapic_timer.timer_advance_ns)
1654+ __kvm_wait_lapic_expire(vcpu);
16461655 kvm_apic_inject_pending_timer_irqs(apic);
16471656 return;
16481657 }
@@ -2595,6 +2604,7 @@ int kvm_apic_set_state(struct kvm_vcpu *vcpu, struct kvm_lapic_state *s) · 946 unmodified lines
25952604
25962605 apic_update_ppr(apic);
25972606 hrtimer_cancel(&apic->lapic_timer.timer);
2607+ apic->lapic_timer.expired_tscdeadline = 0;
25982608 apic_update_lvtt(apic);
25992609 apic_manage_nmi_watchdog(apic, kvm_lapic_get_reg(apic, APIC_LVT0));
26002610 update_divide_count(apic);
arch/x86/kvm/mmu/mmu.c+5−4
@@ -5884,6 +5884,7 @@ static void kvm_recover_nx_lpages(struct kvm *kvm) · 5883 unmodified lines
58845884 struct kvm_mmu_page *sp;
58855885 unsigned int ratio;
58865886 LIST_HEAD(invalid_list);
5887+ bool flush = false;
58875888 ulong to_zap;
58885889
58895890 rcu_idx = srcu_read_lock(&kvm->srcu);
@@ -5905,19 +5906,19 @@ static void kvm_recover_nx_lpages(struct kvm *kvm) · 15 unmodified lines
59055906 lpage_disallowed_link);
59065907 WARN_ON_ONCE(!sp->lpage_disallowed);
59075908 if (is_tdp_mmu_page(sp)) {
5908− kvm_tdp_mmu_zap_gfn_range(kvm, sp->gfn,
5909− sp->gfn + KVM_PAGES_PER_HPAGE(sp->role.level));
5909+ flush |= kvm_tdp_mmu_zap_sp(kvm, sp);
59105910 } else {
59115911 kvm_mmu_prepare_zap_page(kvm, sp, &invalid_list);
59125912 WARN_ON_ONCE(sp->lpage_disallowed);
59135913 }
59145914
59155915 if (need_resched() || rwlock_needbreak(&kvm->mmu_lock)) {
5916− kvm_mmu_commit_zap_page(kvm, &invalid_list);
5916+ kvm_mmu_remote_flush_or_zap(kvm, &invalid_list, flush);
59175917 cond_resched_rwlock_write(&kvm->mmu_lock);
5918+ flush = false;
59185919 }
59195920 }
5920− kvm_mmu_commit_zap_page(kvm, &invalid_list);
5921+ kvm_mmu_remote_flush_or_zap(kvm, &invalid_list, flush);
59215922
59225923 write_unlock(&kvm->mmu_lock);
59235924 srcu_read_unlock(&kvm->srcu, rcu_idx);
arch/x86/kvm/mmu/mmu_internal.h+5−0
@@ -78,6 +78,11 @@ static inline struct kvm_mmu_page *sptep_to_sp(u64 *sptep) · 77 unmodified lines
7878 return to_shadow_page(__pa(sptep));
7979 }
8080
81+static inline int kvm_mmu_page_as_id(struct kvm_mmu_page *sp)
82+{
83+ return sp->role.smm ? 1 : 0;
84+}
85+
8186 static inline bool kvm_vcpu_ad_need_write_protect(struct kvm_vcpu *vcpu)
8287 {
8388 /*
arch/x86/kvm/mmu/tdp_iter.c+18−12
@@ -20,6 +20,21 @@ static gfn_t round_gfn_for_level(gfn_t gfn, int level) · 19 unmodified lines
2020 return gfn & -KVM_PAGES_PER_HPAGE(level);
2121 }
2222
23+/*
24+ * Return the TDP iterator to the root PT and allow it to continue its
25+ * traversal over the paging structure from there.
26+ */
27+void tdp_iter_restart(struct tdp_iter *iter)
28+{
29+ iter->yielded_gfn = iter->next_last_level_gfn;
30+ iter->level = iter->root_level;
31+
32+ iter->gfn = round_gfn_for_level(iter->next_last_level_gfn, iter->level);
33+ tdp_iter_refresh_sptep(iter);
34+
35+ iter->valid = true;
36+}
37+
2338 /*
2439 * Sets a TDP iterator to walk a pre-order traversal of the paging structure
2540 * rooted at root_pt, starting with the walk to translate next_last_level_gfn.
@@ -31,16 +46,12 @@ void tdp_iter_start(struct tdp_iter *iter, u64 *root_pt, int root_level, · 5 unmodified lines
3146 WARN_ON(root_level > PT64_ROOT_MAX_LEVEL);
3247
3348 iter->next_last_level_gfn = next_last_level_gfn;
34− iter->yielded_gfn = iter->next_last_level_gfn;
3549 iter->root_level = root_level;
3650 iter->min_level = min_level;
37− iter->level = root_level;
38− iter->pt_path[iter->level - 1] = (tdp_ptep_t)root_pt;
39−
40− iter->gfn = round_gfn_for_level(iter->next_last_level_gfn, iter->level);
41− tdp_iter_refresh_sptep(iter);
51+ iter->pt_path[iter->root_level - 1] = (tdp_ptep_t)root_pt;
52+ iter->as_id = kvm_mmu_page_as_id(sptep_to_sp(root_pt));
4253
43− iter->valid = true;
54+ tdp_iter_restart(iter);
4455 }
4556
4657 /*
@@ -159,8 +170,3 @@ void tdp_iter_next(struct tdp_iter *iter) · 112 unmodified lines
159170 iter->valid = false;
160171 }
161172
162−tdp_ptep_t tdp_iter_root_pt(struct tdp_iter *iter)
163−{
164− return iter->pt_path[iter->root_level - 1];
165−}
166−
arch/x86/kvm/mmu/tdp_iter.h+3−1
@@ -36,6 +36,8 @@ struct tdp_iter { · 35 unmodified lines
3636 int min_level;
3737 /* The iterator's current level within the paging structure */
3838 int level;
39+ /* The address space ID, i.e. SMM vs. regular. */
40+ int as_id;
3941 /* A snapshot of the value at sptep */
4042 u64 old_spte;
4143 /*
@@ -62,6 +64,6 @@ tdp_ptep_t spte_to_child_pt(u64 pte, int level); · 20 unmodified lines
6264 void tdp_iter_start(struct tdp_iter *iter, u64 *root_pt, int root_level,
6365 int min_level, gfn_t next_last_level_gfn);
6466 void tdp_iter_next(struct tdp_iter *iter);
65−tdp_ptep_t tdp_iter_root_pt(struct tdp_iter *iter);
67+void tdp_iter_restart(struct tdp_iter *iter);
6668
6769 #endif /* __KVM_X86_MMU_TDP_ITER_H */
arch/x86/kvm/mmu/tdp_mmu.c+40−37
@@ -86,7 +86,7 @@ static inline struct kvm_mmu_page *tdp_mmu_next_root(struct kvm *kvm, · 85 unmodified lines
8686 list_for_each_entry(_root, &_kvm->arch.tdp_mmu_roots, link)
8787
8888 static bool zap_gfn_range(struct kvm *kvm, struct kvm_mmu_page *root,
89− gfn_t start, gfn_t end, bool can_yield);
89+ gfn_t start, gfn_t end, bool can_yield, bool flush);
9090
9191 void kvm_tdp_mmu_free_root(struct kvm *kvm, struct kvm_mmu_page *root)
9292 {
@@ -99,7 +99,7 @@ void kvm_tdp_mmu_free_root(struct kvm *kvm, struct kvm_mmu_page *root) · 6 unmodified lines
9999
100100 list_del(&root->link);
101101
102− zap_gfn_range(kvm, root, 0, max_gfn, false);
102+ zap_gfn_range(kvm, root, 0, max_gfn, false, false);
103103
104104 free_page((unsigned long)root->spt);
105105 kmem_cache_free(mmu_page_header_cache, root);
@@ -203,11 +203,6 @@ static void handle_changed_spte(struct kvm *kvm, int as_id, gfn_t gfn, · 97 unmodified lines
203203 u64 old_spte, u64 new_spte, int level,
204204 bool shared);
205205
206−static int kvm_mmu_page_as_id(struct kvm_mmu_page *sp)
207−{
208− return sp->role.smm ? 1 : 0;
209−}
210−
211206 static void handle_changed_spte_acc_track(u64 old_spte, u64 new_spte, int level)
212207 {
213208 bool pfn_changed = spte_to_pfn(old_spte) != spte_to_pfn(new_spte);
@@ -301,11 +296,16 @@ static void tdp_mmu_unlink_page(struct kvm *kvm, struct kvm_mmu_page *sp, · 87 unmodified lines
301296 *
302297 * Given a page table that has been removed from the TDP paging structure,
303298 * iterates through the page table to clear SPTEs and free child page tables.
299+ *
300+ * Note that pt is passed in as a tdp_ptep_t, but it does not need RCU
301+ * protection. Since this thread removed it from the paging structure,
302+ * this thread will be responsible for ensuring the page is freed. Hence the
303+ * early rcu_dereferences in the function.
304304 */
305−static void handle_removed_tdp_mmu_page(struct kvm *kvm, u64 *pt,
305+static void handle_removed_tdp_mmu_page(struct kvm *kvm, tdp_ptep_t pt,
306306 bool shared)
307307 {
308− struct kvm_mmu_page *sp = sptep_to_sp(pt);
308+ struct kvm_mmu_page *sp = sptep_to_sp(rcu_dereference(pt));
309309 int level = sp->role.level;
310310 gfn_t base_gfn = sp->gfn;
311311 u64 old_child_spte;
@@ -318,7 +318,7 @@ static void handle_removed_tdp_mmu_page(struct kvm *kvm, u64 *pt, · 6 unmodified lines
318318 tdp_mmu_unlink_page(kvm, sp, shared);
319319
320320 for (i = 0; i < PT64_ENT_PER_PAGE; i++) {
321− sptep = pt + i;
321+ sptep = rcu_dereference(pt) + i;
322322 gfn = base_gfn + (i * KVM_PAGES_PER_HPAGE(level - 1));
323323
324324 if (shared) {
@@ -337,7 +337,18 @@ static void handle_removed_tdp_mmu_page(struct kvm *kvm, u64 *pt, · 12 unmodified lines
337337 cpu_relax();
338338 }
339339 } else {
340+ /*
341+ * If the SPTE is not MMU-present, there is no backing
342+ * page associated with the SPTE and so no side effects
343+ * that need to be recorded, and exclusive ownership of
344+ * mmu_lock ensures the SPTE can't be made present.
345+ * Note, zapping MMIO SPTEs is also unnecessary as they
346+ * are guarded by the memslots generation, not by being
347+ * unreachable.
348+ */
340349 old_child_spte = READ_ONCE(*sptep);
350+ if (!is_shadow_present_pte(old_child_spte))
351+ continue;
341352
342353 /*
343354 * Marking the SPTE as a removed SPTE is not
@@ -481,10 +492,6 @@ static inline bool tdp_mmu_set_spte_atomic(struct kvm *kvm, · 137 unmodified lines
481492 struct tdp_iter *iter,
482493 u64 new_spte)
483494 {
484− u64 *root_pt = tdp_iter_root_pt(iter);
485− struct kvm_mmu_page *root = sptep_to_sp(root_pt);
486− int as_id = kvm_mmu_page_as_id(root);
487−
488495 lockdep_assert_held_read(&kvm->mmu_lock);
489496
490497 /*
@@ -498,8 +505,8 @@ static inline bool tdp_mmu_set_spte_atomic(struct kvm *kvm, · 7 unmodified lines
498505 new_spte) != iter->old_spte)
499506 return false;
500507
501− handle_changed_spte(kvm, as_id, iter->gfn, iter->old_spte, new_spte,
502− iter->level, true);
508+ handle_changed_spte(kvm, iter->as_id, iter->gfn, iter->old_spte,
509+ new_spte, iter->level, true);
503510
504511 return true;
505512 }
@@ -527,7 +534,7 @@ static inline bool tdp_mmu_zap_spte_atomic(struct kvm *kvm, · 21 unmodified lines
527534 * here since the SPTE is going from non-present
528535 * to non-present.
529536 */
530− WRITE_ONCE(*iter->sptep, 0);
537+ WRITE_ONCE(*rcu_dereference(iter->sptep), 0);
531538
532539 return true;
533540 }
@@ -553,10 +560,6 @@ static inline void __tdp_mmu_set_spte(struct kvm *kvm, struct tdp_iter *iter, · 19 unmodified lines
553560 u64 new_spte, bool record_acc_track,
554561 bool record_dirty_log)
555562 {
556− tdp_ptep_t root_pt = tdp_iter_root_pt(iter);
557− struct kvm_mmu_page *root = sptep_to_sp(root_pt);
558− int as_id = kvm_mmu_page_as_id(root);
559−
560563 lockdep_assert_held_write(&kvm->mmu_lock);
561564
562565 /*
@@ -570,13 +573,13 @@ static inline void __tdp_mmu_set_spte(struct kvm *kvm, struct tdp_iter *iter, · 7 unmodified lines
570573
571574 WRITE_ONCE(*rcu_dereference(iter->sptep), new_spte);
572575
573− __handle_changed_spte(kvm, as_id, iter->gfn, iter->old_spte, new_spte,
574− iter->level, false);
576+ __handle_changed_spte(kvm, iter->as_id, iter->gfn, iter->old_spte,
577+ new_spte, iter->level, false);
575578 if (record_acc_track)
576579 handle_changed_spte_acc_track(iter->old_spte, new_spte,
577580 iter->level);
578581 if (record_dirty_log)
579− handle_changed_spte_dirty_log(kvm, as_id, iter->gfn,
582+ handle_changed_spte_dirty_log(kvm, iter->as_id, iter->gfn,
580583 iter->old_spte, new_spte,
581584 iter->level);
582585 }
@@ -648,9 +651,7 @@ static inline bool tdp_mmu_iter_cond_resched(struct kvm *kvm, · 65 unmodified lines
648651
649652 WARN_ON(iter->gfn > iter->next_last_level_gfn);
650653
651− tdp_iter_start(iter, iter->pt_path[iter->root_level - 1],
652− iter->root_level, iter->min_level,
653− iter->next_last_level_gfn);
654+ tdp_iter_restart(iter);
654655
655656 return true;
656657 }
@@ -667,20 +668,21 @@ static inline bool tdp_mmu_iter_cond_resched(struct kvm *kvm, · 10 unmodified lines
667668 * scheduler needs the CPU or there is contention on the MMU lock. If this
668669 * function cannot yield, it will not release the MMU lock or reschedule and
669670 * the caller must ensure it does not supply too large a GFN range, or the
670− * operation can cause a soft lockup.
671+ * operation can cause a soft lockup. Note, in some use cases a flush may be
672+ * required by prior actions. Ensure the pending flush is performed prior to
673+ * yielding.
671674 */
672675 static bool zap_gfn_range(struct kvm *kvm, struct kvm_mmu_page *root,
673− gfn_t start, gfn_t end, bool can_yield)
676+ gfn_t start, gfn_t end, bool can_yield, bool flush)
674677 {
675678 struct tdp_iter iter;
676− bool flush_needed = false;
677679
678680 rcu_read_lock();
679681
680682 tdp_root_for_each_pte(iter, root, start, end) {
681683 if (can_yield &&
682− tdp_mmu_iter_cond_resched(kvm, &iter, flush_needed)) {
683− flush_needed = false;
684+ tdp_mmu_iter_cond_resched(kvm, &iter, flush)) {
685+ flush = false;
684686 continue;
685687 }
686688
@@ -698,11 +700,11 @@ static bool zap_gfn_range(struct kvm *kvm, struct kvm_mmu_page *root, · 11 unmodified lines
698700 continue;
699701
700702 tdp_mmu_set_spte(kvm, &iter, 0);
701− flush_needed = true;
703+ flush = true;
702704 }
703705
704706 rcu_read_unlock();
705− return flush_needed;
707+ return flush;
706708 }
707709
708710 /*
@@ -711,13 +713,14 @@ static bool zap_gfn_range(struct kvm *kvm, struct kvm_mmu_page *root, · 2 unmodified lines
711713 * SPTEs have been cleared and a TLB flush is needed before releasing the
712714 * MMU lock.
713715 */
714−bool kvm_tdp_mmu_zap_gfn_range(struct kvm *kvm, gfn_t start, gfn_t end)
716+bool __kvm_tdp_mmu_zap_gfn_range(struct kvm *kvm, gfn_t start, gfn_t end,
717+ bool can_yield)
715718 {
716719 struct kvm_mmu_page *root;
717720 bool flush = false;
718721
719722 for_each_tdp_mmu_root_yield_safe(kvm, root)
720− flush |= zap_gfn_range(kvm, root, start, end, true);
723+ flush = zap_gfn_range(kvm, root, start, end, can_yield, flush);
721724
722725 return flush;
723726 }
@@ -929,7 +932,7 @@ static int zap_gfn_range_hva_wrapper(struct kvm *kvm, · 205 unmodified lines
929932 struct kvm_mmu_page *root, gfn_t start,
930933 gfn_t end, unsigned long unused)
931934 {
932− return zap_gfn_range(kvm, root, start, end, false);
935+ return zap_gfn_range(kvm, root, start, end, false, false);
933936 }
934937
935938 int kvm_tdp_mmu_zap_hva_range(struct kvm *kvm, unsigned long start,
arch/x86/kvm/mmu/tdp_mmu.h+23−1
@@ -8,7 +8,29 @@ · 7 unmodified lines
88 hpa_t kvm_tdp_mmu_get_vcpu_root_hpa(struct kvm_vcpu *vcpu);
99 void kvm_tdp_mmu_free_root(struct kvm *kvm, struct kvm_mmu_page *root);
1010
11−bool kvm_tdp_mmu_zap_gfn_range(struct kvm *kvm, gfn_t start, gfn_t end);
11+bool __kvm_tdp_mmu_zap_gfn_range(struct kvm *kvm, gfn_t start, gfn_t end,
12+ bool can_yield);
13+static inline bool kvm_tdp_mmu_zap_gfn_range(struct kvm *kvm, gfn_t start,
14+ gfn_t end)
15+{
16+ return __kvm_tdp_mmu_zap_gfn_range(kvm, start, end, true);
17+}
18+static inline bool kvm_tdp_mmu_zap_sp(struct kvm *kvm, struct kvm_mmu_page *sp)
19+{
20+ gfn_t end = sp->gfn + KVM_PAGES_PER_HPAGE(sp->role.level);
21+
22+ /*
23+ * Don't allow yielding, as the caller may have a flush pending. Note,
24+ * if mmu_lock is held for write, zapping will never yield in this case,
25+ * but explicitly disallow it for safety. The TDP MMU does not yield
26+ * until it has made forward progress (steps sideways), and when zapping
27+ * a single shadow page that it's guaranteed to see (thus the mmu_lock
28+ * requirement), its "step sideways" will always step beyond the bounds
29+ * of the shadow page's gfn range and stop iterating before yielding.
30+ */
31+ lockdep_assert_held_write(&kvm->mmu_lock);
32+ return __kvm_tdp_mmu_zap_gfn_range(kvm, sp->gfn, end, false);
33+}
1234 void kvm_tdp_mmu_zap_all(struct kvm *kvm);
1335
1436 int kvm_tdp_mmu_map(struct kvm_vcpu *vcpu, gpa_t gpa, u32 error_code,
arch/x86/kvm/svm/nested.c+23−5
@@ -246,11 +246,18 @@ static bool nested_vmcb_check_controls(struct vmcb_control_area *control) · 245 unmodified lines
246246 return true;
247247 }
248248
249−static bool nested_vmcb_checks(struct vcpu_svm *svm, struct vmcb *vmcb12)
249+static bool nested_vmcb_check_save(struct vcpu_svm *svm, struct vmcb *vmcb12)
250250 {
251251 struct kvm_vcpu *vcpu = &svm->vcpu;
252252 bool vmcb12_lma;
253253
254+ /*
255+ * FIXME: these should be done after copying the fields,
256+ * to avoid TOC/TOU races. For these save area checks
257+ * the possible damage is limited since kvm_set_cr0 and
258+ * kvm_set_cr4 handle failure; EFER_SVME is an exception
259+ * so it is force-set later in nested_prepare_vmcb_save.
260+ */
254261 if ((vmcb12->save.efer & EFER_SVME) == 0)
255262 return false;
256263
@@ -271,7 +278,7 @@ static bool nested_vmcb_checks(struct vcpu_svm *svm, struct vmcb *vmcb12) · 14 unmodified lines
271278 if (!kvm_is_valid_cr4(&svm->vcpu, vmcb12->save.cr4))
272279 return false;
273280
274− return nested_vmcb_check_controls(&vmcb12->control);
281+ return true;
275282 }
276283
277284 static void load_nested_vmcb_control(struct vcpu_svm *svm,
@@ -396,7 +403,14 @@ static void nested_prepare_vmcb_save(struct vcpu_svm *svm, struct vmcb *vmcb12) · 118 unmodified lines
396403 svm->vmcb->save.gdtr = vmcb12->save.gdtr;
397404 svm->vmcb->save.idtr = vmcb12->save.idtr;
398405 kvm_set_rflags(&svm->vcpu, vmcb12->save.rflags | X86_EFLAGS_FIXED);
399− svm_set_efer(&svm->vcpu, vmcb12->save.efer);
406+
407+ /*
408+ * Force-set EFER_SVME even though it is checked earlier on the
409+ * VMCB12, because the guest can flip the bit between the check
410+ * and now. Clearing EFER_SVME would call svm_free_nested.
411+ */
412+ svm_set_efer(&svm->vcpu, vmcb12->save.efer | EFER_SVME);
413+
400414 svm_set_cr0(&svm->vcpu, vmcb12->save.cr0);
401415 svm_set_cr4(&svm->vcpu, vmcb12->save.cr4);
402416 svm->vmcb->save.cr2 = svm->vcpu.arch.cr2 = vmcb12->save.cr2;
@@ -468,7 +482,6 @@ int enter_svm_guest_mode(struct vcpu_svm *svm, u64 vmcb12_gpa, · 65 unmodified lines
468482
469483
470484 svm->nested.vmcb12_gpa = vmcb12_gpa;
471− load_nested_vmcb_control(svm, &vmcb12->control);
472485 nested_prepare_vmcb_control(svm);
473486 nested_prepare_vmcb_save(svm, vmcb12);
474487
@@ -515,7 +528,10 @@ int nested_svm_vmrun(struct vcpu_svm *svm) · 40 unmodified lines
515528 if (WARN_ON_ONCE(!svm->nested.initialized))
516529 return -EINVAL;
517530
518− if (!nested_vmcb_checks(svm, vmcb12)) {
531+ load_nested_vmcb_control(svm, &vmcb12->control);
532+
533+ if (!nested_vmcb_check_save(svm, vmcb12) ||
534+ !nested_vmcb_check_controls(&svm->nested.ctl)) {
519535 vmcb12->control.exit_code = SVM_EXIT_ERR;
520536 vmcb12->control.exit_code_hi = 0;
521537 vmcb12->control.exit_info_1 = 0;
@@ -1209,6 +1225,8 @@ static int svm_set_nested_state(struct kvm_vcpu *vcpu, · 687 unmodified lines
12091225 */
12101226 if (!(save->cr0 & X86_CR0_PG))
12111227 goto out_free;
1228+ if (!(save->efer & EFER_SVME))
1229+ goto out_free;
12121230
12131231 /*
12141232 * All checks done, we can enter guest mode. L1 control fields
arch/x86/kvm/svm/pmu.c+8−0
@@ -98,6 +98,8 @@ static enum index msr_to_index(u32 msr) · 97 unmodified lines
9898 static inline struct kvm_pmc *get_gp_pmc_amd(struct kvm_pmu *pmu, u32 msr,
9999 enum pmu_type type)
100100 {
101+ struct kvm_vcpu *vcpu = pmu_to_vcpu(pmu);
102+
101103 switch (msr) {
102104 case MSR_F15H_PERF_CTL0:
103105 case MSR_F15H_PERF_CTL1:
@@ -105,6 +107,9 @@ static inline struct kvm_pmc *get_gp_pmc_amd(struct kvm_pmu *pmu, u32 msr, · 1 unmodified line
105107 case MSR_F15H_PERF_CTL3:
106108 case MSR_F15H_PERF_CTL4:
107109 case MSR_F15H_PERF_CTL5:
110+ if (!guest_cpuid_has(vcpu, X86_FEATURE_PERFCTR_CORE))
111+ return NULL;
112+ fallthrough;
108113 case MSR_K7_EVNTSEL0 ... MSR_K7_EVNTSEL3:
109114 if (type != PMU_TYPE_EVNTSEL)
110115 return NULL;
@@ -115,6 +120,9 @@ static inline struct kvm_pmc *get_gp_pmc_amd(struct kvm_pmu *pmu, u32 msr, · 4 unmodified lines
115120 case MSR_F15H_PERF_CTR3:
116121 case MSR_F15H_PERF_CTR4:
117122 case MSR_F15H_PERF_CTR5:
123+ if (!guest_cpuid_has(vcpu, X86_FEATURE_PERFCTR_CORE))
124+ return NULL;
125+ fallthrough;
118126 case MSR_K7_PERFCTR0 ... MSR_K7_PERFCTR3:
119127 if (type != PMU_TYPE_COUNTER)
120128 return NULL;
arch/x86/kvm/svm/svm.c+13−12
@@ -115,13 +115,6 @@ static const struct svm_direct_access_msrs { · 114 unmodified lines
115115 { .index = MSR_INVALID, .always = false },
116116 };
117117
118−/* enable NPT for AMD64 and X86 with PAE */
119−#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
120−bool npt_enabled = true;
121−#else
122−bool npt_enabled;
123−#endif
124−
125118 /*
126119 * These 2 parameters are used to config the controls for Pause-Loop Exiting:
127120 * pause_filter_count: On processors that support Pause filtering(indicated
@@ -170,9 +163,12 @@ module_param(pause_filter_count_shrink, ushort, 0444); · 42 unmodified lines
170163 static unsigned short pause_filter_count_max = KVM_SVM_DEFAULT_PLE_WINDOW_MAX;
171164 module_param(pause_filter_count_max, ushort, 0444);
172165
173−/* allow nested paging (virtualized MMU) for all guests */
174−static int npt = true;
175−module_param(npt, int, S_IRUGO);
166+/*
167+ * Use nested page tables by default. Note, NPT may get forced off by
168+ * svm_hardware_setup() if it's unsupported by hardware or the host kernel.
169+ */
170+bool npt_enabled = true;
171+module_param_named(npt, npt_enabled, bool, 0444);
176172
177173 /* allow nested virtualization in KVM/SVM */
178174 static int nested = true;
@@ -988,10 +984,15 @@ static __init int svm_hardware_setup(void) · 809 unmodified lines
988984 goto err;
989985 }
990986
991− if (!boot_cpu_has(X86_FEATURE_NPT))
987+ /*
988+ * KVM's MMU doesn't support using 2-level paging for itself, and thus
989+ * NPT isn't supported if the host is using 2-level paging since host
990+ * CR4 is unchanged on VMRUN.
991+ */
992+ if (!IS_ENABLED(CONFIG_X86_64) && !IS_ENABLED(CONFIG_X86_PAE))
992993 npt_enabled = false;
993994
994− if (npt_enabled && !npt)
995+ if (!boot_cpu_has(X86_FEATURE_NPT))
995996 npt_enabled = false;
996997
997998 kvm_configure_mmu(npt_enabled, get_max_npt_level(), PG_LEVEL_1G);
arch/x86/kvm/vmx/vmx.c+6−6
@@ -6027,19 +6027,19 @@ static int __vmx_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath) · 6026 unmodified lines
60276027 exit_reason.basic != EXIT_REASON_PML_FULL &&
60286028 exit_reason.basic != EXIT_REASON_APIC_ACCESS &&
60296029 exit_reason.basic != EXIT_REASON_TASK_SWITCH)) {
6030+ int ndata = 3;
6031+
60306032 vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
60316033 vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_DELIVERY_EV;
6032− vcpu->run->internal.ndata = 3;
60336034 vcpu->run->internal.data[0] = vectoring_info;
60346035 vcpu->run->internal.data[1] = exit_reason.full;
60356036 vcpu->run->internal.data[2] = vcpu->arch.exit_qualification;
60366037 if (exit_reason.basic == EXIT_REASON_EPT_MISCONFIG) {
6037− vcpu->run->internal.ndata++;
6038− vcpu->run->internal.data[3] =
6038+ vcpu->run->internal.data[ndata++] =
60396039 vmcs_read64(GUEST_PHYSICAL_ADDRESS);
60406040 }
6041− vcpu->run->internal.data[vcpu->run->internal.ndata++] =
6042− vcpu->arch.last_vmentry_cpu;
6041+ vcpu->run->internal.data[ndata++] = vcpu->arch.last_vmentry_cpu;
6042+ vcpu->run->internal.ndata = ndata;
60436043 return 0;
60446044 }
60456045
@@ -6580,8 +6580,8 @@ static void atomic_switch_perf_msrs(struct vcpu_vmx *vmx) · 534 unmodified lines
65806580 int i, nr_msrs;
65816581 struct perf_guest_switch_msr *msrs;
65826582
6583+ /* Note, nr_msrs may be garbage if perf_guest_get_msrs() returns NULL. */
65836584 msrs = perf_guest_get_msrs(&nr_msrs);
6584−
65856585 if (!msrs)
65866586 return;
65876587
arch/x86/kvm/x86.c+105−67
@@ -271,8 +271,7 @@ static struct kmem_cache *x86_emulator_cache; · 270 unmodified lines
271271 * When called, it means the previous get/set msr reached an invalid msr.
272272 * Return true if we want to ignore/silent this failed msr access.
273273 */
274−static bool kvm_msr_ignored_check(struct kvm_vcpu *vcpu, u32 msr,
275− u64 data, bool write)
274+static bool kvm_msr_ignored_check(u32 msr, u64 data, bool write)
276275 {
277276 const char *op = write ? "wrmsr" : "rdmsr";
278277
@@ -1445,7 +1444,7 @@ static int do_get_msr_feature(struct kvm_vcpu *vcpu, unsigned index, u64 *data) · 1166 unmodified lines
14451444 if (r == KVM_MSR_RET_INVALID) {
14461445 /* Unconditionally clear the output for simplicity */
14471446 *data = 0;
1448− if (kvm_msr_ignored_check(vcpu, index, 0, false))
1447+ if (kvm_msr_ignored_check(index, 0, false))
14491448 r = 0;
14501449 }
14511450
@@ -1526,35 +1525,44 @@ EXPORT_SYMBOL_GPL(kvm_enable_efer_bits); · 74 unmodified lines
15261525
15271526 bool kvm_msr_allowed(struct kvm_vcpu *vcpu, u32 index, u32 type)
15281527 {
1528+ struct kvm_x86_msr_filter *msr_filter;
1529+ struct msr_bitmap_range *ranges;
15291530 struct kvm *kvm = vcpu->kvm;
1530− struct msr_bitmap_range *ranges = kvm->arch.msr_filter.ranges;
1531− u32 count = kvm->arch.msr_filter.count;
1532− u32 i;
1533− bool r = kvm->arch.msr_filter.default_allow;
1531+ bool allowed;
15341532 int idx;
1533+ u32 i;
15351534
1536− /* MSR filtering not set up or x2APIC enabled, allow everything */
1537− if (!count || (index >= 0x800 && index <= 0x8ff))
1535+ /* x2APIC MSRs do not support filtering. */
1536+ if (index >= 0x800 && index <= 0x8ff)
15381537 return true;
15391538
1540− /* Prevent collision with set_msr_filter */
15411539 idx = srcu_read_lock(&kvm->srcu);
15421540
1543− for (i = 0; i < count; i++) {
1541+ msr_filter = srcu_dereference(kvm->arch.msr_filter, &kvm->srcu);
1542+ if (!msr_filter) {
1543+ allowed = true;
1544+ goto out;
1545+ }
1546+
1547+ allowed = msr_filter->default_allow;
1548+ ranges = msr_filter->ranges;
1549+
1550+ for (i = 0; i < msr_filter->count; i++) {
15441551 u32 start = ranges[i].base;
15451552 u32 end = start + ranges[i].nmsrs;
15461553 u32 flags = ranges[i].flags;
15471554 unsigned long *bitmap = ranges[i].bitmap;
15481555
15491556 if ((index >= start) && (index < end) && (flags & type)) {
1550− r = !!test_bit(index - start, bitmap);
1557+ allowed = !!test_bit(index - start, bitmap);
15511558 break;
15521559 }
15531560 }
15541561
1562+out:
15551563 srcu_read_unlock(&kvm->srcu, idx);
15561564
1557− return r;
1565+ return allowed;
15581566 }
15591567 EXPORT_SYMBOL_GPL(kvm_msr_allowed);
15601568
@@ -1611,7 +1619,7 @@ static int kvm_set_msr_ignored_check(struct kvm_vcpu *vcpu, · 50 unmodified lines
16111619 int ret = __kvm_set_msr(vcpu, index, data, host_initiated);
16121620
16131621 if (ret == KVM_MSR_RET_INVALID)
1614− if (kvm_msr_ignored_check(vcpu, index, data, true))
1622+ if (kvm_msr_ignored_check(index, data, true))
16151623 ret = 0;
16161624
16171625 return ret;
@@ -1649,7 +1657,7 @@ static int kvm_get_msr_ignored_check(struct kvm_vcpu *vcpu, · 31 unmodified lines
16491657 if (ret == KVM_MSR_RET_INVALID) {
16501658 /* Unconditionally clear *data for simplicity */
16511659 *data = 0;
1652− if (kvm_msr_ignored_check(vcpu, index, 0, false))
1660+ if (kvm_msr_ignored_check(index, 0, false))
16531661 ret = 0;
16541662 }
16551663
@@ -2320,7 +2328,7 @@ static void kvm_synchronize_tsc(struct kvm_vcpu *vcpu, u64 data) · 664 unmodified lines
23202328 kvm_vcpu_write_tsc_offset(vcpu, offset);
23212329 raw_spin_unlock_irqrestore(&kvm->arch.tsc_write_lock, flags);
23222330
2323− spin_lock(&kvm->arch.pvclock_gtod_sync_lock);
2331+ spin_lock_irqsave(&kvm->arch.pvclock_gtod_sync_lock, flags);
23242332 if (!matched) {
23252333 kvm->arch.nr_vcpus_matched_tsc = 0;
23262334 } else if (!already_matched) {
@@ -2328,7 +2336,7 @@ static void kvm_synchronize_tsc(struct kvm_vcpu *vcpu, u64 data) · 1 unmodified line
23282336 }
23292337
23302338 kvm_track_tsc_matching(vcpu);
2331− spin_unlock(&kvm->arch.pvclock_gtod_sync_lock);
2339+ spin_unlock_irqrestore(&kvm->arch.pvclock_gtod_sync_lock, flags);
23322340 }
23332341
23342342 static inline void adjust_tsc_offset_guest(struct kvm_vcpu *vcpu,
@@ -2550,11 +2558,16 @@ static void kvm_gen_update_masterclock(struct kvm *kvm) · 215 unmodified lines
25502558 int i;
25512559 struct kvm_vcpu *vcpu;
25522560 struct kvm_arch *ka = &kvm->arch;
2561+ unsigned long flags;
2562+
2563+ kvm_hv_invalidate_tsc_page(kvm);
25532564
2554− spin_lock(&ka->pvclock_gtod_sync_lock);
25552565 kvm_make_mclock_inprogress_request(kvm);
2566+
25562567 /* no guest entries from this point */
2568+ spin_lock_irqsave(&ka->pvclock_gtod_sync_lock, flags);
25572569 pvclock_update_vm_gtod_copy(kvm);
2570+ spin_unlock_irqrestore(&ka->pvclock_gtod_sync_lock, flags);
25582571
25592572 kvm_for_each_vcpu(i, vcpu, kvm)
25602573 kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);
@@ -2562,8 +2575,6 @@ static void kvm_gen_update_masterclock(struct kvm *kvm) · 1 unmodified line
25622575 /* guest entries allowed */
25632576 kvm_for_each_vcpu(i, vcpu, kvm)
25642577 kvm_clear_request(KVM_REQ_MCLOCK_INPROGRESS, vcpu);
2565−
2566− spin_unlock(&ka->pvclock_gtod_sync_lock);
25672578 #endif
25682579 }
25692580
@@ -2571,17 +2582,18 @@ u64 get_kvmclock_ns(struct kvm *kvm) · 1 unmodified line
25712582 {
25722583 struct kvm_arch *ka = &kvm->arch;
25732584 struct pvclock_vcpu_time_info hv_clock;
2585+ unsigned long flags;
25742586 u64 ret;
25752587
2576− spin_lock(&ka->pvclock_gtod_sync_lock);
2588+ spin_lock_irqsave(&ka->pvclock_gtod_sync_lock, flags);
25772589 if (!ka->use_master_clock) {
2578− spin_unlock(&ka->pvclock_gtod_sync_lock);
2590+ spin_unlock_irqrestore(&ka->pvclock_gtod_sync_lock, flags);
25792591 return get_kvmclock_base_ns() + ka->kvmclock_offset;
25802592 }
25812593
25822594 hv_clock.tsc_timestamp = ka->master_cycle_now;
25832595 hv_clock.system_time = ka->master_kernel_ns + ka->kvmclock_offset;
2584− spin_unlock(&ka->pvclock_gtod_sync_lock);
2596+ spin_unlock_irqrestore(&ka->pvclock_gtod_sync_lock, flags);
25852597
25862598 /* both __this_cpu_read() and rdtsc() should be on the same cpu */
25872599 get_cpu();
@@ -2675,13 +2687,13 @@ static int kvm_guest_time_update(struct kvm_vcpu *v) · 87 unmodified lines
26752687 * If the host uses TSC clock, then passthrough TSC as stable
26762688 * to the guest.
26772689 */
2678− spin_lock(&ka->pvclock_gtod_sync_lock);
2690+ spin_lock_irqsave(&ka->pvclock_gtod_sync_lock, flags);
26792691 use_master_clock = ka->use_master_clock;
26802692 if (use_master_clock) {
26812693 host_tsc = ka->master_cycle_now;
26822694 kernel_ns = ka->master_kernel_ns;
26832695 }
2684− spin_unlock(&ka->pvclock_gtod_sync_lock);
2696+ spin_unlock_irqrestore(&ka->pvclock_gtod_sync_lock, flags);
26852697
26862698 /* Keep irq disabled to prevent changes to the clock */
26872699 local_irq_save(flags);
@@ -5352,25 +5364,34 @@ split_irqchip_unlock: · 2664 unmodified lines
53525364 return r;
53535365 }
53545366
5355−static void kvm_clear_msr_filter(struct kvm *kvm)
5367+static struct kvm_x86_msr_filter *kvm_alloc_msr_filter(bool default_allow)
5368+{
5369+ struct kvm_x86_msr_filter *msr_filter;
5370+
5371+ msr_filter = kzalloc(sizeof(*msr_filter), GFP_KERNEL_ACCOUNT);
5372+ if (!msr_filter)
5373+ return NULL;
5374+
5375+ msr_filter->default_allow = default_allow;
5376+ return msr_filter;
5377+}
5378+
5379+static void kvm_free_msr_filter(struct kvm_x86_msr_filter *msr_filter)
53565380 {
53575381 u32 i;
5358− u32 count = kvm->arch.msr_filter.count;
5359− struct msr_bitmap_range ranges[16];
53605382
5361− mutex_lock(&kvm->lock);
5362− kvm->arch.msr_filter.count = 0;
5363− memcpy(ranges, kvm->arch.msr_filter.ranges, count * sizeof(ranges[0]));
5364− mutex_unlock(&kvm->lock);
5365− synchronize_srcu(&kvm->srcu);
5383+ if (!msr_filter)
5384+ return;
5385+
5386+ for (i = 0; i < msr_filter->count; i++)
5387+ kfree(msr_filter->ranges[i].bitmap);
53665388
5367− for (i = 0; i < count; i++)
5368− kfree(ranges[i].bitmap);
5389+ kfree(msr_filter);
53695390 }
53705391
5371−static int kvm_add_msr_filter(struct kvm *kvm, struct kvm_msr_filter_range *user_range)
5392+static int kvm_add_msr_filter(struct kvm_x86_msr_filter *msr_filter,
5393+ struct kvm_msr_filter_range *user_range)
53725394 {
5373− struct msr_bitmap_range *ranges = kvm->arch.msr_filter.ranges;
53745395 struct msr_bitmap_range range;
53755396 unsigned long *bitmap = NULL;
53765397 size_t bitmap_size;
@@ -5404,11 +5425,9 @@ static int kvm_add_msr_filter(struct kvm *kvm, struct kvm_msr_filter_range *user · 27 unmodified lines
54045425 goto err;
54055426 }
54065427
5407− /* Everything ok, add this range identifier to our global pool */
5408− ranges[kvm->arch.msr_filter.count] = range;
5409− /* Make sure we filled the array before we tell anyone to walk it */
5410− smp_wmb();
5411− kvm->arch.msr_filter.count++;
5428+ /* Everything ok, add this range identifier. */
5429+ msr_filter->ranges[msr_filter->count] = range;
5430+ msr_filter->count++;
54125431
54135432 return 0;
54145433 err:
@@ -5419,10 +5438,11 @@ err: · 4 unmodified lines
54195438 static int kvm_vm_ioctl_set_msr_filter(struct kvm *kvm, void __user *argp)
54205439 {
54215440 struct kvm_msr_filter __user *user_msr_filter = argp;
5441+ struct kvm_x86_msr_filter *new_filter, *old_filter;
54225442 struct kvm_msr_filter filter;
54235443 bool default_allow;
5424− int r = 0;
54255444 bool empty = true;
5445+ int r = 0;
54265446 u32 i;
54275447
54285448 if (copy_from_user(&filter, user_msr_filter, sizeof(filter)))
@@ -5435,25 +5455,32 @@ static int kvm_vm_ioctl_set_msr_filter(struct kvm *kvm, void __user *argp) · 6 unmodified lines
54355455 if (empty && !default_allow)
54365456 return -EINVAL;
54375457
5438− kvm_clear_msr_filter(kvm);
5439−
5440− kvm->arch.msr_filter.default_allow = default_allow;
5458+ new_filter = kvm_alloc_msr_filter(default_allow);
5459+ if (!new_filter)
5460+ return -ENOMEM;
54415461
5442− /*
5443− * Protect from concurrent calls to this function that could trigger
5444− * a TOCTOU violation on kvm->arch.msr_filter.count.
5445− */
5446− mutex_lock(&kvm->lock);
54475462 for (i = 0; i < ARRAY_SIZE(filter.ranges); i++) {
5448− r = kvm_add_msr_filter(kvm, &filter.ranges[i]);
5449− if (r)
5450− break;
5463+ r = kvm_add_msr_filter(new_filter, &filter.ranges[i]);
5464+ if (r) {
5465+ kvm_free_msr_filter(new_filter);
5466+ return r;
5467+ }
54515468 }
54525469
5470+ mutex_lock(&kvm->lock);
5471+
5472+ /* The per-VM filter is protected by kvm->lock... */
5473+ old_filter = srcu_dereference_check(kvm->arch.msr_filter, &kvm->srcu, 1);
5474+
5475+ rcu_assign_pointer(kvm->arch.msr_filter, new_filter);
5476+ synchronize_srcu(&kvm->srcu);
5477+
5478+ kvm_free_msr_filter(old_filter);
5479+
54535480 kvm_make_all_cpus_request(kvm, KVM_REQ_MSR_FILTER_CHANGED);
54545481 mutex_unlock(&kvm->lock);
54555482
5456− return r;
5483+ return 0;
54575484 }
54585485
54595486 long kvm_arch_vm_ioctl(struct file *filp,
@@ -5700,6 +5727,7 @@ set_pit2_out: · 240 unmodified lines
57005727 }
57015728 #endif
57025729 case KVM_SET_CLOCK: {
5730+ struct kvm_arch *ka = &kvm->arch;
57035731 struct kvm_clock_data user_ns;
57045732 u64 now_ns;
57055733
@@ -5718,8 +5746,22 @@ set_pit2_out: · 12 unmodified lines
57185746 * pvclock_update_vm_gtod_copy().
57195747 */
57205748 kvm_gen_update_masterclock(kvm);
5721− now_ns = get_kvmclock_ns(kvm);
5722− kvm->arch.kvmclock_offset += user_ns.clock - now_ns;
5749+
5750+ /*
5751+ * This pairs with kvm_guest_time_update(): when masterclock is
5752+ * in use, we use master_kernel_ns + kvmclock_offset to set
5753+ * unsigned 'system_time' so if we use get_kvmclock_ns() (which
5754+ * is slightly ahead) here we risk going negative on unsigned
5755+ * 'system_time' when 'user_ns.clock' is very small.
5756+ */
5757+ spin_lock_irq(&ka->pvclock_gtod_sync_lock);
5758+ if (kvm->arch.use_master_clock)
5759+ now_ns = ka->master_kernel_ns;
5760+ else
5761+ now_ns = get_kvmclock_base_ns();
5762+ ka->kvmclock_offset = user_ns.clock - now_ns;
5763+ spin_unlock_irq(&ka->pvclock_gtod_sync_lock);
5764+
57235765 kvm_make_all_cpus_request(kvm, KVM_REQ_CLOCK_UPDATE);
57245766 break;
57255767 }
@@ -6603,7 +6645,7 @@ static int kvm_emulate_wbinvd_noskip(struct kvm_vcpu *vcpu) · 877 unmodified lines
66036645 int cpu = get_cpu();
66046646
66056647 cpumask_set_cpu(cpu, vcpu->arch.wbinvd_dirty_mask);
6606− smp_call_function_many(vcpu->arch.wbinvd_dirty_mask,
6648+ on_each_cpu_mask(vcpu->arch.wbinvd_dirty_mask,
66076649 wbinvd_ipi, NULL, 1);
66086650 put_cpu();
66096651 cpumask_clear(vcpu->arch.wbinvd_dirty_mask);
@@ -7698,6 +7740,7 @@ static void kvm_hyperv_tsc_notifier(void) · 1088 unmodified lines
76987740 struct kvm *kvm;
76997741 struct kvm_vcpu *vcpu;
77007742 int cpu;
7743+ unsigned long flags;
77017744
77027745 mutex_lock(&kvm_lock);
77037746 list_for_each_entry(kvm, &vm_list, vm_list)
@@ -7713,17 +7756,15 @@ static void kvm_hyperv_tsc_notifier(void) · 9 unmodified lines
77137756 list_for_each_entry(kvm, &vm_list, vm_list) {
77147757 struct kvm_arch *ka = &kvm->arch;
77157758
7716− spin_lock(&ka->pvclock_gtod_sync_lock);
7717−
7759+ spin_lock_irqsave(&ka->pvclock_gtod_sync_lock, flags);
77187760 pvclock_update_vm_gtod_copy(kvm);
7761+ spin_unlock_irqrestore(&ka->pvclock_gtod_sync_lock, flags);
77197762
77207763 kvm_for_each_vcpu(cpu, vcpu, kvm)
77217764 kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);
77227765
77237766 kvm_for_each_vcpu(cpu, vcpu, kvm)
77247767 kvm_clear_request(KVM_REQ_MCLOCK_INPROGRESS, vcpu);
7725−
7726− spin_unlock(&ka->pvclock_gtod_sync_lock);
77277768 }
77287769 mutex_unlock(&kvm_lock);
77297770 }
@@ -10601,7 +10642,7 @@ void __user * __x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa, · 2871 unmodified lines
1060110642 return (void __user *)hva;
1060210643 } else {
1060310644 if (!slot || !slot->npages)
10604− return 0;
10645+ return NULL;
1060510646
1060610647 old_npages = slot->npages;
1060710648 hva = slot->userspace_addr;
@@ -10634,8 +10675,6 @@ void kvm_arch_pre_destroy_vm(struct kvm *kvm) · 26 unmodified lines
1063410675
1063510676 void kvm_arch_destroy_vm(struct kvm *kvm)
1063610677 {
10637− u32 i;
10638−
1063910678 if (current->mm == kvm->mm) {
1064010679 /*
1064110680 * Free memory regions allocated on behalf of userspace,
@@ -10651,8 +10690,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm) · 9 unmodified lines
1065110690 mutex_unlock(&kvm->slots_lock);
1065210691 }
1065310692 static_call_cond(kvm_x86_vm_destroy)(kvm);
10654− for (i = 0; i < kvm->arch.msr_filter.count; i++)
10655− kfree(kvm->arch.msr_filter.ranges[i].bitmap);
10693+ kvm_free_msr_filter(srcu_dereference_check(kvm->arch.msr_filter, &kvm->srcu, 1));
1065610694 kvm_pic_destroy(kvm);
1065710695 kvm_ioapic_destroy(kvm);
1065810696 kvm_free_vcpus(kvm);
arch/x86/kvm/x86.h+0−1
@@ -250,7 +250,6 @@ static inline bool kvm_vcpu_latch_init(struct kvm_vcpu *vcpu) · 249 unmodified lines
250250 void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock, int sec_hi_ofs);
251251 void kvm_inject_realmode_interrupt(struct kvm_vcpu *vcpu, int irq, int inc_eip);
252252
253−void kvm_write_tsc(struct kvm_vcpu *vcpu, struct msr_data *msr);
254253 u64 get_kvmclock_ns(struct kvm *kvm);
255254
256255 int kvm_read_guest_virt(struct kvm_vcpu *vcpu,
arch/x86/lib/insn-eval.c+52−14
@@ -1415,6 +1415,25 @@ void __user *insn_get_addr_ref(struct insn *insn, struct pt_regs *regs) · 1414 unmodified lines
14151415 }
14161416 }
14171417
1418+static unsigned long insn_get_effective_ip(struct pt_regs *regs)
1419+{
1420+ unsigned long seg_base = 0;
1421+
1422+ /*
1423+ * If not in user-space long mode, a custom code segment could be in
1424+ * use. This is true in protected mode (if the process defined a local
1425+ * descriptor table), or virtual-8086 mode. In most of the cases
1426+ * seg_base will be zero as in USER_CS.
1427+ */
1428+ if (!user_64bit_mode(regs)) {
1429+ seg_base = insn_get_seg_base(regs, INAT_SEG_REG_CS);
1430+ if (seg_base == -1L)
1431+ return 0;
1432+ }
1433+
1434+ return seg_base + regs->ip;
1435+}
1436+
14181437 /**
14191438 * insn_fetch_from_user() - Copy instruction bytes from user-space memory
14201439 * @regs: Structure with register values as seen when entering kernel mode
@@ -1431,24 +1450,43 @@ void __user *insn_get_addr_ref(struct insn *insn, struct pt_regs *regs) · 10 unmodified lines
14311450 */
14321451 int insn_fetch_from_user(struct pt_regs *regs, unsigned char buf[MAX_INSN_SIZE])
14331452 {
1434− unsigned long seg_base = 0;
1453+ unsigned long ip;
14351454 int not_copied;
14361455
1437− /*
1438− * If not in user-space long mode, a custom code segment could be in
1439− * use. This is true in protected mode (if the process defined a local
1440− * descriptor table), or virtual-8086 mode. In most of the cases
1441− * seg_base will be zero as in USER_CS.
1442− */
1443− if (!user_64bit_mode(regs)) {
1444− seg_base = insn_get_seg_base(regs, INAT_SEG_REG_CS);
1445− if (seg_base == -1L)
1446− return 0;
1447− }
1456+ ip = insn_get_effective_ip(regs);
1457+ if (!ip)
1458+ return 0;
1459+
1460+ not_copied = copy_from_user(buf, (void __user *)ip, MAX_INSN_SIZE);
14481461
1462+ return MAX_INSN_SIZE - not_copied;
1463+}
1464+
1465+/**
1466+ * insn_fetch_from_user_inatomic() - Copy instruction bytes from user-space memory
1467+ * while in atomic code
1468+ * @regs: Structure with register values as seen when entering kernel mode
1469+ * @buf: Array to store the fetched instruction
1470+ *
1471+ * Gets the linear address of the instruction and copies the instruction bytes
1472+ * to the buf. This function must be used in atomic context.
1473+ *
1474+ * Returns:
1475+ *
1476+ * Number of instruction bytes copied.
1477+ *
1478+ * 0 if nothing was copied.
1479+ */
1480+int insn_fetch_from_user_inatomic(struct pt_regs *regs, unsigned char buf[MAX_INSN_SIZE])
1481+{
1482+ unsigned long ip;
1483+ int not_copied;
1484+
1485+ ip = insn_get_effective_ip(regs);
1486+ if (!ip)
1487+ return 0;
14491488
1450− not_copied = copy_from_user(buf, (void __user *)(seg_base + regs->ip),
1451− MAX_INSN_SIZE);
1489+ not_copied = __copy_from_user_inatomic(buf, (void __user *)ip, MAX_INSN_SIZE);
14521490
14531491 return MAX_INSN_SIZE - not_copied;
14541492 }
arch/x86/mm/mem_encrypt.c+1−1
@@ -262,7 +262,7 @@ static void __init __set_clr_pte_enc(pte_t *kpte, int level, bool enc) · 261 unmodified lines
262262 if (pgprot_val(old_prot) == pgprot_val(new_prot))
263263 return;
264264
265− pa = pfn << page_level_shift(level);
265+ pa = pfn << PAGE_SHIFT;
266266 size = page_level_size(level);
267267
268268 /*
arch/x86/net/bpf_jit_comp.c+42−10
@@ -1349,6 +1349,7 @@ st: if (is_imm8(insn->off)) · 1348 unmodified lines
13491349 insn->imm == (BPF_XOR | BPF_FETCH)) {
13501350 u8 *branch_target;
13511351 bool is64 = BPF_SIZE(insn->code) == BPF_DW;
1352+ u32 real_src_reg = src_reg;
13521353
13531354 /*
13541355 * Can't be implemented with a single x86 insn.
@@ -1357,6 +1358,9 @@ st: if (is_imm8(insn->off)) · 2 unmodified lines
13571358
13581359 /* Will need RAX as a CMPXCHG operand so save R0 */
13591360 emit_mov_reg(&prog, true, BPF_REG_AX, BPF_REG_0);
1361+ if (src_reg == BPF_REG_0)
1362+ real_src_reg = BPF_REG_AX;
1363+
13601364 branch_target = prog;
13611365 /* Load old value */
13621366 emit_ldx(&prog, BPF_SIZE(insn->code),
@@ -1366,9 +1370,9 @@ st: if (is_imm8(insn->off)) · 3 unmodified lines
13661370 * put the result in the AUX_REG.
13671371 */
13681372 emit_mov_reg(&prog, is64, AUX_REG, BPF_REG_0);
1369− maybe_emit_mod(&prog, AUX_REG, src_reg, is64);
1373+ maybe_emit_mod(&prog, AUX_REG, real_src_reg, is64);
13701374 EMIT2(simple_alu_opcodes[BPF_OP(insn->imm)],
1371− add_2reg(0xC0, AUX_REG, src_reg));
1375+ add_2reg(0xC0, AUX_REG, real_src_reg));
13721376 /* Attempt to swap in new value */
13731377 err = emit_atomic(&prog, BPF_CMPXCHG,
13741378 dst_reg, AUX_REG, insn->off,
@@ -1381,7 +1385,7 @@ st: if (is_imm8(insn->off)) · 6 unmodified lines
13811385 */
13821386 EMIT2(X86_JNE, -(prog - branch_target) - 2);
13831387 /* Return the pre-modification value */
1384− emit_mov_reg(&prog, is64, src_reg, BPF_REG_0);
1388+ emit_mov_reg(&prog, is64, real_src_reg, BPF_REG_0);
13851389 /* Restore R0 after clobbering RAX */
13861390 emit_mov_reg(&prog, true, BPF_REG_0, BPF_REG_AX);
13871391 break;
@@ -1685,7 +1689,16 @@ emit_jmp: · 297 unmodified lines
16851689 }
16861690
16871691 if (image) {
1688− if (unlikely(proglen + ilen > oldproglen)) {
1692+ /*
1693+ * When populating the image, assert that:
1694+ *
1695+ * i) We do not write beyond the allocated space, and
1696+ * ii) addrs[i] did not change from the prior run, in order
1697+ * to validate assumptions made for computing branch
1698+ * displacements.
1699+ */
1700+ if (unlikely(proglen + ilen > oldproglen ||
1701+ proglen + ilen != addrs[i])) {
16891702 pr_err("bpf_jit: fatal error\n");
16901703 return -EFAULT;
16911704 }
@@ -1932,7 +1945,7 @@ static int invoke_bpf_mod_ret(const struct btf_func_model *m, u8 **pprog, · 240 unmodified lines
19321945 * add rsp, 8 // skip eth_type_trans's frame
19331946 * ret // return to its caller
19341947 */
1935−int arch_prepare_bpf_trampoline(void *image, void *image_end,
1948+int arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *image, void *image_end,
19361949 const struct btf_func_model *m, u32 flags,
19371950 struct bpf_tramp_progs *tprogs,
19381951 void *orig_call)
@@ -1971,6 +1984,15 @@ int arch_prepare_bpf_trampoline(void *image, void *image_end, · 32 unmodified lines
19711984
19721985 save_regs(m, &prog, nr_args, stack_size);
19731986
1987+ if (flags & BPF_TRAMP_F_CALL_ORIG) {
1988+ /* arg1: mov rdi, im */
1989+ emit_mov_imm64(&prog, BPF_REG_1, (long) im >> 32, (u32) (long) im);
1990+ if (emit_call(&prog, __bpf_tramp_enter, prog)) {
1991+ ret = -EINVAL;
1992+ goto cleanup;
1993+ }
1994+ }
1995+
19741996 if (fentry->nr_progs)
19751997 if (invoke_bpf(m, &prog, fentry, stack_size))
19761998 return -EINVAL;
@@ -1989,8 +2011,7 @@ int arch_prepare_bpf_trampoline(void *image, void *image_end, · 12 unmodified lines
19892011 }
19902012
19912013 if (flags & BPF_TRAMP_F_CALL_ORIG) {
1992− if (fentry->nr_progs || fmod_ret->nr_progs)
1993− restore_regs(m, &prog, nr_args, stack_size);
2014+ restore_regs(m, &prog, nr_args, stack_size);
19942015
19952016 /* call original function */
19962017 if (emit_call(&prog, orig_call, prog)) {
@@ -1999,6 +2020,9 @@ int arch_prepare_bpf_trampoline(void *image, void *image_end, · 2 unmodified lines
19992020 }
20002021 /* remember return value in a stack for bpf prog to access */
20012022 emit_stx(&prog, BPF_DW, BPF_REG_FP, BPF_REG_0, -8);
2023+ im->ip_after_call = prog;
2024+ memcpy(prog, ideal_nops[NOP_ATOMIC5], X86_PATCH_SIZE);
2025+ prog += X86_PATCH_SIZE;
20022026 }
20032027
20042028 if (fmod_ret->nr_progs) {
@@ -2029,9 +2053,17 @@ int arch_prepare_bpf_trampoline(void *image, void *image_end, · 24 unmodified lines
20292053 * the return value is only updated on the stack and still needs to be
20302054 * restored to R0.
20312055 */
2032− if (flags & BPF_TRAMP_F_CALL_ORIG)
2056+ if (flags & BPF_TRAMP_F_CALL_ORIG) {
2057+ im->ip_epilogue = prog;
2058+ /* arg1: mov rdi, im */
2059+ emit_mov_imm64(&prog, BPF_REG_1, (long) im >> 32, (u32) (long) im);
2060+ if (emit_call(&prog, __bpf_tramp_exit, prog)) {
2061+ ret = -EINVAL;
2062+ goto cleanup;
2063+ }
20332064 /* restore original return value back into RAX */
20342065 emit_ldx(&prog, BPF_DW, BPF_REG_0, BPF_REG_FP, -8);
2066+ }
20352067
20362068 EMIT1(0x5B); /* pop rbx */
20372069 EMIT1(0xC9); /* leave */
@@ -2221,7 +2253,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) · 183 unmodified lines
22212253 padding = true;
22222254 goto skip_init_addrs;
22232255 }
2224− addrs = kmalloc_array(prog->len + 1, sizeof(*addrs), GFP_KERNEL);
2256+ addrs = kvmalloc_array(prog->len + 1, sizeof(*addrs), GFP_KERNEL);
22252257 if (!addrs) {
22262258 prog = orig_prog;
22272259 goto out_addrs;
@@ -2313,7 +2345,7 @@ out_image: · 85 unmodified lines
23132345 if (image)
23142346 bpf_prog_fill_jited_linfo(prog, addrs + 1);
23152347 out_addrs:
2316− kfree(addrs);
2348+ kvfree(addrs);
23172349 kfree(jit_data);
23182350 prog->aux->jit_data = NULL;
23192351 }
arch/x86/net/bpf_jit_comp32.c+10−1
@@ -2276,7 +2276,16 @@ notyet: · 2275 unmodified lines
22762276 }
22772277
22782278 if (image) {
2279− if (unlikely(proglen + ilen > oldproglen)) {
2279+ /*
2280+ * When populating the image, assert that:
2281+ *
2282+ * i) We do not write beyond the allocated space, and
2283+ * ii) addrs[i] did not change from the prior run, in order
2284+ * to validate assumptions made for computing branch
2285+ * displacements.
2286+ */
2287+ if (unlikely(proglen + ilen > oldproglen ||
2288+ proglen + ilen != addrs[i])) {
22802289 pr_err("bpf_jit: fatal error\n");
22812290 return -EFAULT;
22822291 }
arch/x86/platform/iris/iris.c+0−1
@@ -27,7 +27,6 @@ · 26 unmodified lines
2727 MODULE_LICENSE("GPL");
2828 MODULE_AUTHOR("Sébastien Hinderer <Sebastien.Hinderer@ens-lyon.org>");
2929 MODULE_DESCRIPTION("A power_off handler for Iris devices from EuroBraille");
30−MODULE_SUPPORTED_DEVICE("Eurobraille/Iris");
3130
3231 static bool force;
3332
arch/x86/xen/p2m.c+4−9
@@ -98,8 +98,8 @@ EXPORT_SYMBOL_GPL(xen_p2m_size); · 97 unmodified lines
9898 unsigned long xen_max_p2m_pfn __read_mostly;
9999 EXPORT_SYMBOL_GPL(xen_max_p2m_pfn);
100100
101−#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG_LIMIT
102−#define P2M_LIMIT CONFIG_XEN_BALLOON_MEMORY_HOTPLUG_LIMIT
101+#ifdef CONFIG_XEN_MEMORY_HOTPLUG_LIMIT
102+#define P2M_LIMIT CONFIG_XEN_MEMORY_HOTPLUG_LIMIT
103103 #else
104104 #define P2M_LIMIT 0
105105 #endif
@@ -416,9 +416,6 @@ void __init xen_vmalloc_p2m_tree(void) · 310 unmodified lines
416416 xen_p2m_last_pfn = xen_max_p2m_pfn;
417417
418418 p2m_limit = (phys_addr_t)P2M_LIMIT * 1024 * 1024 * 1024 / PAGE_SIZE;
419− if (!p2m_limit && IS_ENABLED(CONFIG_XEN_UNPOPULATED_ALLOC))
420− p2m_limit = xen_start_info->nr_pages * XEN_EXTRA_MEM_RATIO;
421−
422419 vm.flags = VM_ALLOC;
423420 vm.size = ALIGN(sizeof(unsigned long) * max(xen_max_p2m_pfn, p2m_limit),
424421 PMD_SIZE * PMDS_PER_MID_PAGE);
@@ -741,7 +738,7 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops, · 316 unmodified lines
741738 map_ops[i].status = GNTST_general_error;
742739 unmap[0].host_addr = map_ops[i].host_addr,
743740 unmap[0].handle = map_ops[i].handle;
744− map_ops[i].handle = ~0;
741+ map_ops[i].handle = INVALID_GRANT_HANDLE;
745742 if (map_ops[i].flags & GNTMAP_device_map)
746743 unmap[0].dev_bus_addr = map_ops[i].dev_bus_addr;
747744 else
@@ -751,7 +748,7 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops, · 3 unmodified lines
751748 kmap_ops[i].status = GNTST_general_error;
752749 unmap[1].host_addr = kmap_ops[i].host_addr,
753750 unmap[1].handle = kmap_ops[i].handle;
754− kmap_ops[i].handle = ~0;
751+ kmap_ops[i].handle = INVALID_GRANT_HANDLE;
755752 if (kmap_ops[i].flags & GNTMAP_device_map)
756753 unmap[1].dev_bus_addr = kmap_ops[i].dev_bus_addr;
757754 else
@@ -776,7 +773,6 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops, · 18 unmodified lines
776773 out:
777774 return ret;
778775 }
779−EXPORT_SYMBOL_GPL(set_foreign_p2m_mapping);
780776
781777 int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops,
782778 struct gnttab_unmap_grant_ref *kunmap_ops,
@@ -802,7 +798,6 @@ int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, · 19 unmodified lines
802798
803799 return ret;
804800 }
805−EXPORT_SYMBOL_GPL(clear_foreign_p2m_mapping);
806801
807802 #ifdef CONFIG_XEN_DEBUG_FS
808803 #include <linux/debugfs.h>
arch/x86/xen/setup.c+14−2
@@ -59,6 +59,18 @@ static struct { · 58 unmodified lines
5959 } xen_remap_buf __initdata __aligned(PAGE_SIZE);
6060 static unsigned long xen_remap_mfn __initdata = INVALID_P2M_ENTRY;
6161
62+/*
63+ * The maximum amount of extra memory compared to the base size. The
64+ * main scaling factor is the size of struct page. At extreme ratios
65+ * of base:extra, all the base memory can be filled with page
66+ * structures for the extra memory, leaving no space for anything
67+ * else.
68+ *
69+ * 10x seems like a reasonable balance between scaling flexibility and
70+ * leaving a practically usable system.
71+ */
72+#define EXTRA_MEM_RATIO (10)
73+
6274 static bool xen_512gb_limit __initdata = IS_ENABLED(CONFIG_XEN_512GB);
6375
6476 static void __init xen_parse_512gb(void)
@@ -778,13 +790,13 @@ char * __init xen_memory_setup(void) · 713 unmodified lines
778790 extra_pages += max_pages - max_pfn;
779791
780792 /*
781− * Clamp the amount of extra memory to a XEN_EXTRA_MEM_RATIO
793+ * Clamp the amount of extra memory to a EXTRA_MEM_RATIO
782794 * factor the base size.
783795 *
784796 * Make sure we have no memory above max_pages, as this area
785797 * isn't handled by the p2m management.
786798 */
787− extra_pages = min3(XEN_EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM)),
799+ extra_pages = min3(EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM)),
788800 extra_pages, max_pages - max_pfn);
789801 i = 0;
790802 addr = xen_e820_table.entries[0].addr;
arch/xtensa/kernel/coprocessor.S+33−31
@@ -99,37 +99,6 @@ · 98 unmodified lines
9999 LOAD_CP_REGS_TAB(6)
100100 LOAD_CP_REGS_TAB(7)
101101
102−/*
103− * coprocessor_flush(struct thread_info*, index)
104− * a2 a3
105− *
106− * Save coprocessor registers for coprocessor 'index'.
107− * The register values are saved to or loaded from the coprocessor area
108− * inside the task_info structure.
109− *
110− * Note that this function doesn't update the coprocessor_owner information!
111− *
112− */
113−
114−ENTRY(coprocessor_flush)
115−
116− /* reserve 4 bytes on stack to save a0 */
117− abi_entry(4)
118−
119− s32i a0, a1, 0
120− movi a0, .Lsave_cp_regs_jump_table
121− addx8 a3, a3, a0
122− l32i a4, a3, 4
123− l32i a3, a3, 0
124− add a2, a2, a4
125− beqz a3, 1f
126− callx0 a3
127−1: l32i a0, a1, 0
128−
129− abi_ret(4)
130−
131−ENDPROC(coprocessor_flush)
132−
133102 /*
134103 * Entry condition:
135104 *
@@ -245,6 +214,39 @@ ENTRY(fast_coprocessor) · 109 unmodified lines
245214
246215 ENDPROC(fast_coprocessor)
247216
217+ .text
218+
219+/*
220+ * coprocessor_flush(struct thread_info*, index)
221+ * a2 a3
222+ *
223+ * Save coprocessor registers for coprocessor 'index'.
224+ * The register values are saved to or loaded from the coprocessor area
225+ * inside the task_info structure.
226+ *
227+ * Note that this function doesn't update the coprocessor_owner information!
228+ *
229+ */
230+
231+ENTRY(coprocessor_flush)
232+
233+ /* reserve 4 bytes on stack to save a0 */
234+ abi_entry(4)
235+
236+ s32i a0, a1, 0
237+ movi a0, .Lsave_cp_regs_jump_table
238+ addx8 a3, a3, a0
239+ l32i a4, a3, 4
240+ l32i a3, a3, 0
241+ add a2, a2, a4
242+ beqz a3, 1f
243+ callx0 a3
244+1: l32i a0, a1, 0
245+
246+ abi_ret(4)
247+
248+ENDPROC(coprocessor_flush)
249+
248250 .data
249251
250252 ENTRY(coprocessor_owner)
arch/xtensa/mm/fault.c+4−1
@@ -112,8 +112,11 @@ good_area: · 111 unmodified lines
112112 */
113113 fault = handle_mm_fault(vma, address, flags, regs);
114114
115− if (fault_signal_pending(fault, regs))
115+ if (fault_signal_pending(fault, regs)) {
116+ if (!user_mode(regs))
117+ goto bad_page_fault;
116118 return;
119+ }
117120
118121 if (unlikely(fault & VM_FAULT_ERROR)) {
119122 if (fault & VM_FAULT_OOM)
block/bio.c+26−11
@@ -33,7 +33,7 @@ static struct biovec_slab { · 32 unmodified lines
3333 { .nr_vecs = 16, .name = "biovec-16" },
3434 { .nr_vecs = 64, .name = "biovec-64" },
3535 { .nr_vecs = 128, .name = "biovec-128" },
36− { .nr_vecs = BIO_MAX_PAGES, .name = "biovec-max" },
36+ { .nr_vecs = BIO_MAX_VECS, .name = "biovec-max" },
3737 };
3838
3939 static struct biovec_slab *biovec_slab(unsigned short nr_vecs)
@@ -46,7 +46,7 @@ static struct biovec_slab *biovec_slab(unsigned short nr_vecs) · 6 unmodified lines
4646 return &bvec_slabs[1];
4747 case 65 ... 128:
4848 return &bvec_slabs[2];
49− case 129 ... BIO_MAX_PAGES:
49+ case 129 ... BIO_MAX_VECS:
5050 return &bvec_slabs[3];
5151 default:
5252 BUG();
@@ -151,9 +151,9 @@ out: · 98 unmodified lines
151151
152152 void bvec_free(mempool_t *pool, struct bio_vec *bv, unsigned short nr_vecs)
153153 {
154− BIO_BUG_ON(nr_vecs > BIO_MAX_PAGES);
154+ BIO_BUG_ON(nr_vecs > BIO_MAX_VECS);
155155
156− if (nr_vecs == BIO_MAX_PAGES)
156+ if (nr_vecs == BIO_MAX_VECS)
157157 mempool_free(bv, pool);
158158 else if (nr_vecs > BIO_INLINE_VECS)
159159 kmem_cache_free(biovec_slab(nr_vecs)->slab, bv);
@@ -186,15 +186,15 @@ struct bio_vec *bvec_alloc(mempool_t *pool, unsigned short *nr_vecs, · 26 unmodified lines
186186 /*
187187 * Try a slab allocation first for all smaller allocations. If that
188188 * fails and __GFP_DIRECT_RECLAIM is set retry with the mempool.
189− * The mempool is sized to handle up to BIO_MAX_PAGES entries.
189+ * The mempool is sized to handle up to BIO_MAX_VECS entries.
190190 */
191− if (*nr_vecs < BIO_MAX_PAGES) {
191+ if (*nr_vecs < BIO_MAX_VECS) {
192192 struct bio_vec *bvl;
193193
194194 bvl = kmem_cache_alloc(bvs->slab, bvec_alloc_gfp(gfp_mask));
195195 if (likely(bvl) || !(gfp_mask & __GFP_DIRECT_RECLAIM))
196196 return bvl;
197− *nr_vecs = BIO_MAX_PAGES;
197+ *nr_vecs = BIO_MAX_VECS;
198198 }
199199
200200 return mempool_alloc(pool, gfp_mask);
@@ -277,7 +277,7 @@ static struct bio *__bio_chain_endio(struct bio *bio) · 76 unmodified lines
277277 {
278278 struct bio *parent = bio->bi_private;
279279
280− if (!parent->bi_status)
280+ if (bio->bi_status && !parent->bi_status)
281281 parent->bi_status = bio->bi_status;
282282 bio_put(bio);
283283 return parent;
@@ -949,7 +949,7 @@ void bio_release_pages(struct bio *bio, bool mark_dirty) · 665 unmodified lines
949949 }
950950 EXPORT_SYMBOL_GPL(bio_release_pages);
951951
952−static int bio_iov_bvec_set(struct bio *bio, struct iov_iter *iter)
952+static void __bio_iov_bvec_set(struct bio *bio, struct iov_iter *iter)
953953 {
954954 WARN_ON_ONCE(bio->bi_max_vecs);
955955
@@ -959,11 +959,26 @@ static int bio_iov_bvec_set(struct bio *bio, struct iov_iter *iter) · 3 unmodified lines
959959 bio->bi_iter.bi_size = iter->count;
960960 bio_set_flag(bio, BIO_NO_PAGE_REF);
961961 bio_set_flag(bio, BIO_CLONED);
962+}
962963
964+static int bio_iov_bvec_set(struct bio *bio, struct iov_iter *iter)
965+{
966+ __bio_iov_bvec_set(bio, iter);
963967 iov_iter_advance(iter, iter->count);
964968 return 0;
965969 }
966970
971+static int bio_iov_bvec_set_append(struct bio *bio, struct iov_iter *iter)
972+{
973+ struct request_queue *q = bio->bi_bdev->bd_disk->queue;
974+ struct iov_iter i = *iter;
975+
976+ iov_iter_truncate(&i, queue_max_zone_append_sectors(q) << 9);
977+ __bio_iov_bvec_set(bio, &i);
978+ iov_iter_advance(iter, i.count);
979+ return 0;
980+}
981+
967982 #define PAGE_PTRS_PER_BVEC (sizeof(struct bio_vec) / sizeof(struct page *))
968983
969984 /**
@@ -1094,8 +1109,8 @@ int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter) · 124 unmodified lines
10941109 int ret = 0;
10951110
10961111 if (iov_iter_is_bvec(iter)) {
1097− if (WARN_ON_ONCE(bio_op(bio) == REQ_OP_ZONE_APPEND))
1098− return -EINVAL;
1112+ if (bio_op(bio) == REQ_OP_ZONE_APPEND)
1113+ return bio_iov_bvec_set_append(bio, iter);
10991114 return bio_iov_bvec_set(bio, iter);
11001115 }
11011116
block/blk-cgroup-rwstat.c+2−1
@@ -109,6 +109,7 @@ void blkg_rwstat_recursive_sum(struct blkcg_gq *blkg, struct blkcg_policy *pol, · 108 unmodified lines
109109
110110 lockdep_assert_held(&blkg->q->queue_lock);
111111
112+ memset(sum, 0, sizeof(*sum));
112113 rcu_read_lock();
113114 blkg_for_each_descendant_pre(pos_blkg, pos_css, blkg) {
114115 struct blkg_rwstat *rwstat;
@@ -122,7 +123,7 @@ void blkg_rwstat_recursive_sum(struct blkcg_gq *blkg, struct blkcg_policy *pol, · 7 unmodified lines
122123 rwstat = (void *)pos_blkg + off;
123124
124125 for (i = 0; i < BLKG_RWSTAT_NR; i++)
125− sum->cnt[i] = blkg_rwstat_read_counter(rwstat, i);
126+ sum->cnt[i] += blkg_rwstat_read_counter(rwstat, i);
126127 }
127128 rcu_read_unlock();
128129 }
block/blk-crypto-fallback.c+1−1
@@ -219,7 +219,7 @@ static bool blk_crypto_split_bio_if_needed(struct bio **bio_ptr) · 218 unmodified lines
219219
220220 bio_for_each_segment(bv, bio, iter) {
221221 num_sectors += bv.bv_len >> SECTOR_SHIFT;
222− if (++i == BIO_MAX_PAGES)
222+ if (++i == BIO_MAX_VECS)
223223 break;
224224 }
225225 if (num_sectors < bio_sectors(bio)) {
block/blk-lib.c+1−1
@@ -296,7 +296,7 @@ static unsigned int __blkdev_sectors_to_bio_pages(sector_t nr_sects) · 295 unmodified lines
296296 {
297297 sector_t pages = DIV_ROUND_UP_SECTOR_T(nr_sects, PAGE_SIZE / 512);
298298
299− return min(pages, (sector_t)BIO_MAX_PAGES);
299+ return min(pages, (sector_t)BIO_MAX_VECS);
300300 }
301301
302302 static int __blkdev_issue_zero_pages(struct block_device *bdev,
block/blk-map.c+1−1
@@ -249,7 +249,7 @@ static int bio_map_user_iov(struct request *rq, struct iov_iter *iter, · 248 unmodified lines
249249 if (!iov_iter_count(iter))
250250 return -EINVAL;
251251
252− bio = bio_kmalloc(gfp_mask, iov_iter_npages(iter, BIO_MAX_PAGES));
252+ bio = bio_kmalloc(gfp_mask, iov_iter_npages(iter, BIO_MAX_VECS));
253253 if (!bio)
254254 return -ENOMEM;
255255 bio->bi_opf |= req_op(rq);
block/blk-merge.c+8−0
@@ -382,6 +382,14 @@ unsigned int blk_recalc_rq_segments(struct request *rq) · 381 unmodified lines
382382 switch (bio_op(rq->bio)) {
383383 case REQ_OP_DISCARD:
384384 case REQ_OP_SECURE_ERASE:
385+ if (queue_max_discard_segments(rq->q) > 1) {
386+ struct bio *bio = rq->bio;
387+
388+ for_each_bio(bio)
389+ nr_phys_segs++;
390+ return nr_phys_segs;
391+ }
392+ return 1;
385393 case REQ_OP_WRITE_ZEROES:
386394 return 0;
387395 case REQ_OP_WRITE_SAME:
block/blk-mq-debugfs.c+0−1
@@ -302,7 +302,6 @@ static const char *const rqf_name[] = { · 301 unmodified lines
302302 RQF_NAME(QUIET),
303303 RQF_NAME(ELVPRIV),
304304 RQF_NAME(IO_STAT),
305− RQF_NAME(ALLOCED),
306305 RQF_NAME(PM),
307306 RQF_NAME(HASHED),
308307 RQF_NAME(STATS),
block/blk-zoned.c+37−3
@@ -240,7 +240,7 @@ int blkdev_zone_mgmt(struct block_device *bdev, enum req_opf op, · 239 unmodified lines
240240 */
241241 if (op == REQ_OP_ZONE_RESET &&
242242 blkdev_allow_reset_all_zones(bdev, sector, nr_sectors)) {
243− bio->bi_opf = REQ_OP_ZONE_RESET_ALL;
243+ bio->bi_opf = REQ_OP_ZONE_RESET_ALL | REQ_SYNC;
244244 break;
245245 }
246246
@@ -318,6 +318,22 @@ int blkdev_report_zones_ioctl(struct block_device *bdev, fmode_t mode, · 71 unmodified lines
318318 return 0;
319319 }
320320
321+static int blkdev_truncate_zone_range(struct block_device *bdev, fmode_t mode,
322+ const struct blk_zone_range *zrange)
323+{
324+ loff_t start, end;
325+
326+ if (zrange->sector + zrange->nr_sectors <= zrange->sector ||
327+ zrange->sector + zrange->nr_sectors > get_capacity(bdev->bd_disk))
328+ /* Out of range */
329+ return -EINVAL;
330+
331+ start = zrange->sector << SECTOR_SHIFT;
332+ end = ((zrange->sector + zrange->nr_sectors) << SECTOR_SHIFT) - 1;
333+
334+ return truncate_bdev_range(bdev, mode, start, end);
335+}
336+
321337 /*
322338 * BLKRESETZONE, BLKOPENZONE, BLKCLOSEZONE and BLKFINISHZONE ioctl processing.
323339 * Called from blkdev_ioctl.
@@ -329,6 +345,7 @@ int blkdev_zone_mgmt_ioctl(struct block_device *bdev, fmode_t mode, · 5 unmodified lines
329345 struct request_queue *q;
330346 struct blk_zone_range zrange;
331347 enum req_opf op;
348+ int ret;
332349
333350 if (!argp)
334351 return -EINVAL;
@@ -352,6 +369,11 @@ int blkdev_zone_mgmt_ioctl(struct block_device *bdev, fmode_t mode, · 17 unmodified lines
352369 switch (cmd) {
353370 case BLKRESETZONE:
354371 op = REQ_OP_ZONE_RESET;
372+
373+ /* Invalidate the page cache, including dirty pages. */
374+ ret = blkdev_truncate_zone_range(bdev, mode, &zrange);
375+ if (ret)
376+ return ret;
355377 break;
356378 case BLKOPENZONE:
357379 op = REQ_OP_ZONE_OPEN;
@@ -366,8 +388,20 @@ int blkdev_zone_mgmt_ioctl(struct block_device *bdev, fmode_t mode, · 8 unmodified lines
366388 return -ENOTTY;
367389 }
368390
369− return blkdev_zone_mgmt(bdev, op, zrange.sector, zrange.nr_sectors,
370− GFP_KERNEL);
391+ ret = blkdev_zone_mgmt(bdev, op, zrange.sector, zrange.nr_sectors,
392+ GFP_KERNEL);
393+
394+ /*
395+ * Invalidate the page cache again for zone reset: writes can only be
396+ * direct for zoned devices so concurrent writes would not add any page
397+ * to the page cache after/during reset. The page cache may be filled
398+ * again due to concurrent reads though and dropping the pages for
399+ * these is fine.
400+ */
401+ if (!ret && cmd == BLKRESETZONE)
402+ ret = blkdev_truncate_zone_range(bdev, mode, &zrange);
403+
404+ return ret;
371405 }
372406
373407 static inline unsigned long *blk_alloc_zone_bitmap(int node,
block/bounce.c+3−3
@@ -229,10 +229,10 @@ static struct bio *bounce_clone_bio(struct bio *bio_src) · 228 unmodified lines
229229 * - The point of cloning the biovec is to produce a bio with a biovec
230230 * the caller can modify: bi_idx and bi_bvec_done should be 0.
231231 *
232− * - The original bio could've had more than BIO_MAX_PAGES biovecs; if
232+ * - The original bio could've had more than BIO_MAX_VECS biovecs; if
233233 * we tried to clone the whole thing bio_alloc_bioset() would fail.
234234 * But the clone should succeed as long as the number of biovecs we
235− * actually need to allocate is fewer than BIO_MAX_PAGES.
235+ * actually need to allocate is fewer than BIO_MAX_VECS.
236236 *
237237 * - Lastly, bi_vcnt should not be looked at or relied upon by code
238238 * that does not own the bio - reason being drivers don't use it for
@@ -299,7 +299,7 @@ static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig, · 60 unmodified lines
299299 int sectors = 0;
300300
301301 bio_for_each_segment(from, *bio_orig, iter) {
302− if (i++ < BIO_MAX_PAGES)
302+ if (i++ < BIO_MAX_VECS)
303303 sectors += from.bv_len >> 9;
304304 if (page_to_pfn(from.bv_page) > q->limits.bounce_pfn)
305305 bounce = true;
block/genhd.c+1−3
@@ -534,10 +534,8 @@ static void register_disk(struct device *parent, struct gendisk *disk, · 533 unmodified lines
534534 kobject_create_and_add("holders", &ddev->kobj);
535535 disk->slave_dir = kobject_create_and_add("slaves", &ddev->kobj);
536536
537− if (disk->flags & GENHD_FL_HIDDEN) {
538− dev_set_uevent_suppress(ddev, 0);
537+ if (disk->flags & GENHD_FL_HIDDEN)
539538 return;
540− }
541539
542540 disk_scan_partitions(disk);
543541
block/partitions/core.c+7−0
@@ -322,6 +322,13 @@ static struct block_device *add_partition(struct gendisk *disk, int partno, · 321 unmodified lines
322322 const char *dname;
323323 int err;
324324
325+ /*
326+ * disk_max_parts() won't be zero, either GENHD_FL_EXT_DEVT is set
327+ * or 'minors' is passed to alloc_disk().
328+ */
329+ if (partno >= disk_max_parts(disk))
330+ return ERR_PTR(-EINVAL);
331+
325332 /*
326333 * Partitions are not supported on zoned block devices that are used as
327334 * such.
crypto/Kconfig+1−1
@@ -767,7 +767,7 @@ config CRYPTO_POLY1305_X86_64 · 766 unmodified lines
767767
768768 config CRYPTO_POLY1305_MIPS
769769 tristate "Poly1305 authenticator algorithm (MIPS optimized)"
770− depends on CPU_MIPS32 || (CPU_MIPS64 && 64BIT)
770+ depends on MIPS
771771 select CRYPTO_ARCH_HAVE_LIB_POLY1305
772772
773773 config CRYPTO_MD4
drivers/acpi/acpica/nsaccess.c+1−2
@@ -99,13 +99,12 @@ acpi_status acpi_ns_root_initialize(void) · 98 unmodified lines
9999 * just create and link the new node(s) here.
100100 */
101101 new_node =
102− ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_namespace_node));
102+ acpi_ns_create_node(*ACPI_CAST_PTR(u32, init_val->name));
103103 if (!new_node) {
104104 status = AE_NO_MEMORY;
105105 goto unlock_and_exit;
106106 }
107107
108− ACPI_COPY_NAMESEG(new_node->name.ascii, init_val->name);
109108 new_node->descriptor_type = ACPI_DESC_TYPE_NAMED;
110109 new_node->type = init_val->type;
111110
drivers/acpi/internal.h+5−1
@@ -9,6 +9,8 @@ · 8 unmodified lines
99 #ifndef _ACPI_INTERNAL_H_
1010 #define _ACPI_INTERNAL_H_
1111
12+#include <linux/idr.h>
13+
1214 #define PREFIX "ACPI: "
1315
1416 int early_acpi_osi_init(void);
@@ -96,9 +98,11 @@ void acpi_scan_table_handler(u32 event, void *table, void *context); · 81 unmodified lines
9698
9799 extern struct list_head acpi_bus_id_list;
98100
101+#define ACPI_MAX_DEVICE_INSTANCES 4096
102+
99103 struct acpi_device_bus_id {
100104 const char *bus_id;
101− unsigned int instance_no;
105+ struct ida instance_ida;
102106 struct list_head node;
103107 };
104108
drivers/acpi/processor_idle.c+5−0
@@ -29,6 +29,7 @@ · 28 unmodified lines
2929 */
3030 #ifdef CONFIG_X86
3131 #include <asm/apic.h>
32+#include <asm/cpu.h>
3233 #endif
3334
3435 #define _COMPONENT ACPI_PROCESSOR_COMPONENT
@@ -541,6 +542,10 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index) · 506 unmodified lines
541542 wait_for_freeze();
542543 } else
543544 return -ENODEV;
545+
546+#if defined(CONFIG_X86) && defined(CONFIG_HOTPLUG_CPU)
547+ cond_wakeup_cpu0();
548+#endif
544549 }
545550
546551 /* Never reached */
drivers/acpi/scan.c+39−6
@@ -479,9 +479,8 @@ static void acpi_device_del(struct acpi_device *device) · 478 unmodified lines
479479 list_for_each_entry(acpi_device_bus_id, &acpi_bus_id_list, node)
480480 if (!strcmp(acpi_device_bus_id->bus_id,
481481 acpi_device_hid(device))) {
482− if (acpi_device_bus_id->instance_no > 0)
483− acpi_device_bus_id->instance_no--;
484− else {
482+ ida_simple_remove(&acpi_device_bus_id->instance_ida, device->pnp.instance_no);
483+ if (ida_is_empty(&acpi_device_bus_id->instance_ida)) {
485484 list_del(&acpi_device_bus_id->node);
486485 kfree_const(acpi_device_bus_id->bus_id);
487486 kfree(acpi_device_bus_id);
@@ -631,6 +630,21 @@ static struct acpi_device_bus_id *acpi_device_bus_id_match(const char *dev_id) · 143 unmodified lines
631630 return NULL;
632631 }
633632
633+static int acpi_device_set_name(struct acpi_device *device,
634+ struct acpi_device_bus_id *acpi_device_bus_id)
635+{
636+ struct ida *instance_ida = &acpi_device_bus_id->instance_ida;
637+ int result;
638+
639+ result = ida_simple_get(instance_ida, 0, ACPI_MAX_DEVICE_INSTANCES, GFP_KERNEL);
640+ if (result < 0)
641+ return result;
642+
643+ device->pnp.instance_no = result;
644+ dev_set_name(&device->dev, "%s:%02x", acpi_device_bus_id->bus_id, result);
645+ return 0;
646+}
647+
634648 int acpi_device_add(struct acpi_device *device,
635649 void (*release)(struct device *))
636650 {
@@ -665,7 +679,9 @@ int acpi_device_add(struct acpi_device *device, · 28 unmodified lines
665679
666680 acpi_device_bus_id = acpi_device_bus_id_match(acpi_device_hid(device));
667681 if (acpi_device_bus_id) {
668− acpi_device_bus_id->instance_no++;
682+ result = acpi_device_set_name(device, acpi_device_bus_id);
683+ if (result)
684+ goto err_unlock;
669685 } else {
670686 acpi_device_bus_id = kzalloc(sizeof(*acpi_device_bus_id),
671687 GFP_KERNEL);
@@ -681,9 +697,16 @@ int acpi_device_add(struct acpi_device *device, · 9 unmodified lines
681697 goto err_unlock;
682698 }
683699
700+ ida_init(&acpi_device_bus_id->instance_ida);
701+
702+ result = acpi_device_set_name(device, acpi_device_bus_id);
703+ if (result) {
704+ kfree(acpi_device_bus_id);
705+ goto err_unlock;
706+ }
707+
684708 list_add_tail(&acpi_device_bus_id->node, &acpi_bus_id_list);
685709 }
686− dev_set_name(&device->dev, "%s:%02x", acpi_device_bus_id->bus_id, acpi_device_bus_id->instance_no);
687710
688711 if (device->parent)
689712 list_add_tail(&device->node, &device->parent->children);
@@ -1647,6 +1670,8 @@ void acpi_init_device_object(struct acpi_device *device, acpi_handle handle, · 957 unmodified lines
16471670 device_initialize(&device->dev);
16481671 dev_set_uevent_suppress(&device->dev, true);
16491672 acpi_init_coherency(device);
1673+ /* Assume there are unmet deps to start with. */
1674+ device->dep_unmet = 1;
16501675 }
16511676
16521677 void acpi_device_add_finalize(struct acpi_device *device)
@@ -1910,6 +1935,8 @@ static void acpi_scan_dep_init(struct acpi_device *adev) · 257 unmodified lines
19101935 {
19111936 struct acpi_dep_data *dep;
19121937
1938+ adev->dep_unmet = 0;
1939+
19131940 mutex_lock(&acpi_dep_list_lock);
19141941
19151942 list_for_each_entry(dep, &acpi_dep_list, node) {
@@ -1957,7 +1984,13 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, bool check_dep, · 41 unmodified lines
19571984 return AE_CTRL_DEPTH;
19581985
19591986 acpi_scan_init_hotplug(device);
1960− if (!check_dep)
1987+ /*
1988+ * If check_dep is true at this point, the device has no dependencies,
1989+ * or the creation of the device object would have been postponed above.
1990+ */
1991+ if (check_dep)
1992+ device->dep_unmet = 0;
1993+ else
19611994 acpi_scan_dep_init(device);
19621995
19631996 out:
drivers/acpi/tables.c+39−3
@@ -780,7 +780,7 @@ acpi_status acpi_os_table_override(struct acpi_table_header *existing_table, · 779 unmodified lines
780780 }
781781
782782 /*
783− * acpi_table_init()
783+ * acpi_locate_initial_tables()
784784 *
785785 * find RSDP, find and checksum SDT/XSDT.
786786 * checksum all tables, print SDT/XSDT
@@ -788,7 +788,7 @@ acpi_status acpi_os_table_override(struct acpi_table_header *existing_table, · 1 unmodified line
788788 * result: sdt_entry[] is initialized
789789 */
790790
791−int __init acpi_table_init(void)
791+int __init acpi_locate_initial_tables(void)
792792 {
793793 acpi_status status;
794794
@@ -803,9 +803,45 @@ int __init acpi_table_init(void) · 8 unmodified lines
803803 status = acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0);
804804 if (ACPI_FAILURE(status))
805805 return -EINVAL;
806− acpi_table_initrd_scan();
807806
807+ return 0;
808+}
809+
810+void __init acpi_reserve_initial_tables(void)
811+{
812+ int i;
813+
814+ for (i = 0; i < ACPI_MAX_TABLES; i++) {
815+ struct acpi_table_desc *table_desc = &initial_tables[i];
816+ u64 start = table_desc->address;
817+ u64 size = table_desc->length;
818+
819+ if (!start || !size)
820+ break;
821+
822+ pr_info("Reserving %4s table memory at [mem 0x%llx-0x%llx]\n",
823+ table_desc->signature.ascii, start, start + size - 1);
824+
825+ memblock_reserve(start, size);
826+ }
827+}
828+
829+void __init acpi_table_init_complete(void)
830+{
831+ acpi_table_initrd_scan();
808832 check_multiple_madt();
833+}
834+
835+int __init acpi_table_init(void)
836+{
837+ int ret;
838+
839+ ret = acpi_locate_initial_tables();
840+ if (ret)
841+ return ret;
842+
843+ acpi_table_init_complete();
844+
809845 return 0;
810846 }
811847
drivers/acpi/video_detect.c+1−0
@@ -147,6 +147,7 @@ static const struct dmi_system_id video_detect_dmi_table[] = { · 146 unmodified lines
147147 },
148148 },
149149 {
150+ .callback = video_detect_force_vendor,
150151 .ident = "Sony VPCEH3U1E",
151152 .matches = {
152153 DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
drivers/atm/eni.c+2−1
@@ -2260,7 +2260,8 @@ out: · 2259 unmodified lines
22602260 return rc;
22612261
22622262 err_eni_release:
2263− eni_do_release(dev);
2263+ dev->phy = NULL;
2264+ iounmap(ENI_DEV(dev)->ioaddr);
22642265 err_unregister:
22652266 atm_dev_deregister(dev);
22662267 err_free_consistent:
drivers/atm/fore200e.c+0−2
@@ -100,8 +100,6 @@ static LIST_HEAD(fore200e_boards); · 99 unmodified lines
100100
101101 MODULE_AUTHOR("Christophe Lizzi - credits to Uwe Dannowski and Heikki Vatiainen");
102102 MODULE_DESCRIPTION("FORE Systems 200E-series ATM driver - version " FORE200E_VERSION);
103−MODULE_SUPPORTED_DEVICE("PCA-200E, SBA-200E");
104−
105103
106104 static const int fore200e_rx_buf_nbr[ BUFFER_SCHEME_NBR ][ BUFFER_MAGN_NBR ] = {
107105 { BUFFER_S1_NBR, BUFFER_L1_NBR },
drivers/atm/idt77105.c+2−2
@@ -262,7 +262,7 @@ static int idt77105_start(struct atm_dev *dev) · 261 unmodified lines
262262 {
263263 unsigned long flags;
264264
265− if (!(dev->dev_data = kmalloc(sizeof(struct idt77105_priv),GFP_KERNEL)))
265+ if (!(dev->phy_data = kmalloc(sizeof(struct idt77105_priv),GFP_KERNEL)))
266266 return -ENOMEM;
267267 PRIV(dev)->dev = dev;
268268 spin_lock_irqsave(&idt77105_priv_lock, flags);
@@ -337,7 +337,7 @@ static int idt77105_stop(struct atm_dev *dev) · 68 unmodified lines
337337 else
338338 idt77105_all = walk->next;
339339 dev->phy = NULL;
340− dev->dev_data = NULL;
340+ dev->phy_data = NULL;
341341 kfree(walk);
342342 break;
343343 }
drivers/atm/lanai.c+4−1
@@ -2233,6 +2233,7 @@ static int lanai_dev_open(struct atm_dev *atmdev) · 2232 unmodified lines
22332233 conf1_write(lanai);
22342234 #endif
22352235 iounmap(lanai->base);
2236+ lanai->base = NULL;
22362237 error_pci:
22372238 pci_disable_device(lanai->pci);
22382239 error:
@@ -2245,6 +2246,8 @@ static int lanai_dev_open(struct atm_dev *atmdev) · 6 unmodified lines
22452246 static void lanai_dev_close(struct atm_dev *atmdev)
22462247 {
22472248 struct lanai_dev *lanai = (struct lanai_dev *) atmdev->dev_data;
2249+ if (lanai->base==NULL)
2250+ return;
22482251 printk(KERN_INFO DEV_LABEL "(itf %d): shutting down interface\n",
22492252 lanai->number);
22502253 lanai_timed_poll_stop(lanai);
@@ -2552,7 +2555,7 @@ static int lanai_init_one(struct pci_dev *pci, · 301 unmodified lines
25522555 struct atm_dev *atmdev;
25532556 int result;
25542557
2555− lanai = kmalloc(sizeof(*lanai), GFP_KERNEL);
2558+ lanai = kzalloc(sizeof(*lanai), GFP_KERNEL);
25562559 if (lanai == NULL) {
25572560 printk(KERN_ERR DEV_LABEL
25582561 ": couldn't allocate dev_data structure!\n");
drivers/atm/uPD98402.c+1−1
@@ -211,7 +211,7 @@ static void uPD98402_int(struct atm_dev *dev) · 210 unmodified lines
211211 static int uPD98402_start(struct atm_dev *dev)
212212 {
213213 DPRINTK("phy_start\n");
214− if (!(dev->dev_data = kmalloc(sizeof(struct uPD98402_priv),GFP_KERNEL)))
214+ if (!(dev->phy_data = kmalloc(sizeof(struct uPD98402_priv),GFP_KERNEL)))
215215 return -ENOMEM;
216216 spin_lock_init(&PRIV(dev)->lock);
217217 memset(&PRIV(dev)->sonet_stats,0,sizeof(struct k_sonet_stats));
drivers/auxdisplay/charlcd.c+8−10
@@ -470,12 +470,14 @@ static ssize_t charlcd_write(struct file *file, const char __user *buf, · 469 unmodified lines
470470 char c;
471471
472472 for (; count-- > 0; (*ppos)++, tmp++) {
473− if (!in_interrupt() && (((count + 1) & 0x1f) == 0))
473+ if (((count + 1) & 0x1f) == 0) {
474474 /*
475− * let's be a little nice with other processes
476− * that need some CPU
475+ * charlcd_write() is invoked as a VFS->write() callback
476+ * and as such it is always invoked from preemptible
477+ * context and may sleep.
477478 */
478− schedule();
479+ cond_resched();
480+ }
479481
480482 if (get_user(c, tmp))
481483 return -EFAULT;
@@ -537,12 +539,8 @@ static void charlcd_puts(struct charlcd *lcd, const char *s) · 55 unmodified lines
537539 int count = strlen(s);
538540
539541 for (; count-- > 0; tmp++) {
540− if (!in_interrupt() && (((count + 1) & 0x1f) == 0))
541− /*
542− * let's be a little nice with other processes
543− * that need some CPU
544− */
545− schedule();
542+ if (((count + 1) & 0x1f) == 0)
543+ cond_resched();
546544
547545 charlcd_write_char(lcd, *tmp);
548546 }
drivers/base/dd.c+8−3
@@ -97,6 +97,9 @@ static void deferred_probe_work_func(struct work_struct *work) · 96 unmodified lines
9797
9898 get_device(dev);
9999
100+ kfree(dev->p->deferred_probe_reason);
101+ dev->p->deferred_probe_reason = NULL;
102+
100103 /*
101104 * Drop the mutex while probing each device; the probe path may
102105 * manipulate the deferred list
@@ -289,14 +292,16 @@ int driver_deferred_probe_check_state(struct device *dev) · 186 unmodified lines
289292
290293 static void deferred_probe_timeout_work_func(struct work_struct *work)
291294 {
292− struct device_private *private, *p;
295+ struct device_private *p;
293296
294297 driver_deferred_probe_timeout = 0;
295298 driver_deferred_probe_trigger();
296299 flush_work(&deferred_probe_work);
297300
298− list_for_each_entry_safe(private, p, &deferred_probe_pending_list, deferred_probe)
299− dev_info(private->device, "deferred probe pending\n");
301+ mutex_lock(&deferred_probe_mutex);
302+ list_for_each_entry(p, &deferred_probe_pending_list, deferred_probe)
303+ dev_info(p->device, "deferred probe pending\n");
304+ mutex_unlock(&deferred_probe_mutex);
300305 wake_up_all(&probe_timeout_waitqueue);
301306 }
302307 static DECLARE_DELAYED_WORK(deferred_probe_timeout_work, deferred_probe_timeout_work_func);
drivers/base/power/runtime.c+69−42
@@ -305,7 +305,7 @@ static int rpm_get_suppliers(struct device *dev) · 304 unmodified lines
305305 return 0;
306306 }
307307
308−static void rpm_put_suppliers(struct device *dev)
308+static void __rpm_put_suppliers(struct device *dev, bool try_to_suspend)
309309 {
310310 struct device_link *link;
311311
@@ -313,10 +313,30 @@ static void rpm_put_suppliers(struct device *dev) · 1 unmodified line
313313 device_links_read_lock_held()) {
314314
315315 while (refcount_dec_not_one(&link->rpm_active))
316− pm_runtime_put(link->supplier);
316+ pm_runtime_put_noidle(link->supplier);
317+
318+ if (try_to_suspend)
319+ pm_request_idle(link->supplier);
317320 }
318321 }
319322
323+static void rpm_put_suppliers(struct device *dev)
324+{
325+ __rpm_put_suppliers(dev, true);
326+}
327+
328+static void rpm_suspend_suppliers(struct device *dev)
329+{
330+ struct device_link *link;
331+ int idx = device_links_read_lock();
332+
333+ list_for_each_entry_rcu(link, &dev->links.suppliers, c_node,
334+ device_links_read_lock_held())
335+ pm_request_idle(link->supplier);
336+
337+ device_links_read_unlock(idx);
338+}
339+
320340 /**
321341 * __rpm_callback - Run a given runtime PM callback for a given device.
322342 * @cb: Runtime PM callback to run.
@@ -325,27 +345,29 @@ static void rpm_put_suppliers(struct device *dev) · 2 unmodified lines
325345 static int __rpm_callback(int (*cb)(struct device *), struct device *dev)
326346 __releases(&dev->power.lock) __acquires(&dev->power.lock)
327347 {
328− bool use_links = dev->power.links_count > 0;
329− bool get = false;
330348 int retval, idx;
331− bool put;
349+ bool use_links = dev->power.links_count > 0;
332350
333351 if (dev->power.irq_safe) {
334352 spin_unlock(&dev->power.lock);
335− } else if (!use_links) {
336− spin_unlock_irq(&dev->power.lock);
337353 } else {
338− get = dev->power.runtime_status == RPM_RESUMING;
339−
340354 spin_unlock_irq(&dev->power.lock);
341355
342− /* Resume suppliers if necessary. */
343− if (get) {
356+ /*
357+ * Resume suppliers if necessary.
358+ *
359+ * The device's runtime PM status cannot change until this
360+ * routine returns, so it is safe to read the status outside of
361+ * the lock.
362+ */
363+ if (use_links && dev->power.runtime_status == RPM_RESUMING) {
344364 idx = device_links_read_lock();
345365
346366 retval = rpm_get_suppliers(dev);
347− if (retval)
367+ if (retval) {
368+ rpm_put_suppliers(dev);
348369 goto fail;
370+ }
349371
350372 device_links_read_unlock(idx);
351373 }
@@ -355,36 +377,24 @@ static int __rpm_callback(int (*cb)(struct device *), struct device *dev) · 3 unmodified lines
355377
356378 if (dev->power.irq_safe) {
357379 spin_lock(&dev->power.lock);
358− return retval;
359− }
360−
361− spin_lock_irq(&dev->power.lock);
362−
363− if (!use_links)
364− return retval;
365−
366− /*
367− * If the device is suspending and the callback has returned success,
368− * drop the usage counters of the suppliers that have been reference
369− * counted on its resume.
370− *
371− * Do that if the resume fails too.
372− */
373− put = dev->power.runtime_status == RPM_SUSPENDING && !retval;
374− if (put)
375− __update_runtime_status(dev, RPM_SUSPENDED);
376− else
377− put = get && retval;
378−
379− if (put) {
380− spin_unlock_irq(&dev->power.lock);
380+ } else {
381+ /*
382+ * If the device is suspending and the callback has returned
383+ * success, drop the usage counters of the suppliers that have
384+ * been reference counted on its resume.
385+ *
386+ * Do that if resume fails too.
387+ */
388+ if (use_links
389+ && ((dev->power.runtime_status == RPM_SUSPENDING && !retval)
390+ || (dev->power.runtime_status == RPM_RESUMING && retval))) {
391+ idx = device_links_read_lock();
381392
382− idx = device_links_read_lock();
393+ __rpm_put_suppliers(dev, false);
383394
384395 fail:
385− rpm_put_suppliers(dev);
386−
387− device_links_read_unlock(idx);
396+ device_links_read_unlock(idx);
397+ }
388398
389399 spin_lock_irq(&dev->power.lock);
390400 }
@@ -654,8 +664,11 @@ static int rpm_suspend(struct device *dev, int rpmflags) · 263 unmodified lines
654664 goto out;
655665 }
656666
667+ if (dev->power.irq_safe)
668+ goto out;
669+
657670 /* Maybe the parent is now able to suspend. */
658− if (parent && !parent->power.ignore_children && !dev->power.irq_safe) {
671+ if (parent && !parent->power.ignore_children) {
659672 spin_unlock(&dev->power.lock);
660673
661674 spin_lock(&parent->power.lock);
@@ -664,6 +677,14 @@ static int rpm_suspend(struct device *dev, int rpmflags) · 2 unmodified lines
664677
665678 spin_lock(&dev->power.lock);
666679 }
680+ /* Maybe the suppliers are now able to suspend. */
681+ if (dev->power.links_count > 0) {
682+ spin_unlock_irq(&dev->power.lock);
683+
684+ rpm_suspend_suppliers(dev);
685+
686+ spin_lock_irq(&dev->power.lock);
687+ }
667688
668689 out:
669690 trace_rpm_return_int_rcuidle(dev, _THIS_IP_, retval);
@@ -1669,8 +1690,8 @@ void pm_runtime_get_suppliers(struct device *dev) · 999 unmodified lines
16691690 device_links_read_lock_held())
16701691 if (link->flags & DL_FLAG_PM_RUNTIME) {
16711692 link->supplier_preactivated = true;
1672− refcount_inc(&link->rpm_active);
16731693 pm_runtime_get_sync(link->supplier);
1694+ refcount_inc(&link->rpm_active);
16741695 }
16751696
16761697 device_links_read_unlock(idx);
@@ -1683,6 +1704,8 @@ void pm_runtime_get_suppliers(struct device *dev) · 6 unmodified lines
16831704 void pm_runtime_put_suppliers(struct device *dev)
16841705 {
16851706 struct device_link *link;
1707+ unsigned long flags;
1708+ bool put;
16861709 int idx;
16871710
16881711 idx = device_links_read_lock();
@@ -1691,7 +1714,11 @@ void pm_runtime_put_suppliers(struct device *dev) · 2 unmodified lines
16911714 device_links_read_lock_held())
16921715 if (link->supplier_preactivated) {
16931716 link->supplier_preactivated = false;
1694− if (refcount_dec_not_one(&link->rpm_active))
1717+ spin_lock_irqsave(&dev->power.lock, flags);
1718+ put = pm_runtime_status_suspended(dev) &&
1719+ refcount_dec_not_one(&link->rpm_active);
1720+ spin_unlock_irqrestore(&dev->power.lock, flags);
1721+ if (put)
16951722 pm_runtime_put(link->supplier);
16961723 }
16971724
drivers/base/swnode.c+20−9
@@ -938,6 +938,9 @@ int software_node_register(const struct software_node *node) · 937 unmodified lines
938938 if (software_node_to_swnode(node))
939939 return -EEXIST;
940940
941+ if (node->parent && !parent)
942+ return -EINVAL;
943+
941944 return PTR_ERR_OR_ZERO(swnode_register(node, parent, 0));
942945 }
943946 EXPORT_SYMBOL_GPL(software_node_register);
@@ -1002,25 +1005,33 @@ EXPORT_SYMBOL_GPL(fwnode_remove_software_node); · 58 unmodified lines
10021005 /**
10031006 * device_add_software_node - Assign software node to a device
10041007 * @dev: The device the software node is meant for.
1005− * @swnode: The software node.
1008+ * @node: The software node.
10061009 *
1007− * This function will register @swnode and make it the secondary firmware node
1008− * pointer of @dev. If @dev has no primary node, then @swnode will become the primary
1009− * node.
1010+ * This function will make @node the secondary firmware node pointer of @dev. If
1011+ * @dev has no primary node, then @node will become the primary node. The
1012+ * function will register @node automatically if it wasn't already registered.
10101013 */
1011−int device_add_software_node(struct device *dev, const struct software_node *swnode)
1014+int device_add_software_node(struct device *dev, const struct software_node *node)
10121015 {
1016+ struct swnode *swnode;
10131017 int ret;
10141018
10151019 /* Only one software node per device. */
10161020 if (dev_to_swnode(dev))
10171021 return -EBUSY;
10181022
1019− ret = software_node_register(swnode);
1020− if (ret)
1021− return ret;
1023+ swnode = software_node_to_swnode(node);
1024+ if (swnode) {
1025+ kobject_get(&swnode->kobj);
1026+ } else {
1027+ ret = software_node_register(node);
1028+ if (ret)
1029+ return ret;
1030+
1031+ swnode = software_node_to_swnode(node);
1032+ }
10221033
1023− set_secondary_fwnode(dev, software_node_fwnode(swnode));
1034+ set_secondary_fwnode(dev, &swnode->fwnode);
10241035
10251036 return 0;
10261037 }
drivers/block/drbd/drbd_int.h+1−1
@@ -1324,7 +1324,7 @@ struct bm_extent { · 1323 unmodified lines
13241324 * A followup commit may allow even bigger BIO sizes,
13251325 * once we thought that through. */
13261326 #define DRBD_MAX_BIO_SIZE (1U << 20)
1327−#if DRBD_MAX_BIO_SIZE > (BIO_MAX_PAGES << PAGE_SHIFT)
1327+#if DRBD_MAX_BIO_SIZE > (BIO_MAX_VECS << PAGE_SHIFT)
13281328 #error Architecture not supported: DRBD_MAX_BIO_SIZE > BIO_MAX_SIZE
13291329 #endif
13301330 #define DRBD_MAX_BIO_SIZE_SAFE (1U << 12) /* Works always = 4k */
drivers/block/floppy.c+0−1
@@ -5091,7 +5091,6 @@ module_param(floppy, charp, 0); · 5090 unmodified lines
50915091 module_param(FLOPPY_IRQ, int, 0);
50925092 module_param(FLOPPY_DMA, int, 0);
50935093 MODULE_AUTHOR("Alain L. Knaff");
5094−MODULE_SUPPORTED_DEVICE("fd");
50955094 MODULE_LICENSE("GPL");
50965095
50975096 /* This doesn't actually get used other than for module information */
drivers/block/null_blk/main.c+21−5
@@ -1369,10 +1369,13 @@ static blk_status_t null_handle_cmd(struct nullb_cmd *cmd, sector_t sector, · 1368 unmodified lines
13691369 }
13701370
13711371 if (dev->zoned)
1372− cmd->error = null_process_zoned_cmd(cmd, op,
1373− sector, nr_sectors);
1372+ sts = null_process_zoned_cmd(cmd, op, sector, nr_sectors);
13741373 else
1375− cmd->error = null_process_cmd(cmd, op, sector, nr_sectors);
1374+ sts = null_process_cmd(cmd, op, sector, nr_sectors);
1375+
1376+ /* Do not overwrite errors (e.g. timeout errors) */
1377+ if (cmd->error == BLK_STS_OK)
1378+ cmd->error = sts;
13761379
13771380 out:
13781381 nullb_complete_cmd(cmd);
@@ -1451,8 +1454,20 @@ static bool should_requeue_request(struct request *rq) · 72 unmodified lines
14511454
14521455 static enum blk_eh_timer_return null_timeout_rq(struct request *rq, bool res)
14531456 {
1457+ struct nullb_cmd *cmd = blk_mq_rq_to_pdu(rq);
1458+
14541459 pr_info("rq %p timed out\n", rq);
1455− blk_mq_complete_request(rq);
1460+
1461+ /*
1462+ * If the device is marked as blocking (i.e. memory backed or zoned
1463+ * device), the submission path may be blocked waiting for resources
1464+ * and cause real timeouts. For these real timeouts, the submission
1465+ * path will complete the request using blk_mq_complete_request().
1466+ * Only fake timeouts need to execute blk_mq_complete_request() here.
1467+ */
1468+ cmd->error = BLK_STS_TIMEOUT;
1469+ if (cmd->fake_timeout)
1470+ blk_mq_complete_request(rq);
14561471 return BLK_EH_DONE;
14571472 }
14581473
@@ -1473,6 +1488,7 @@ static blk_status_t null_queue_rq(struct blk_mq_hw_ctx *hctx, · 14 unmodified lines
14731488 cmd->rq = bd->rq;
14741489 cmd->error = BLK_STS_OK;
14751490 cmd->nq = nq;
1491+ cmd->fake_timeout = should_timeout_request(bd->rq);
14761492
14771493 blk_mq_start_request(bd->rq);
14781494
@@ -1489,7 +1505,7 @@ static blk_status_t null_queue_rq(struct blk_mq_hw_ctx *hctx, · 10 unmodified lines
14891505 return BLK_STS_OK;
14901506 }
14911507 }
1492− if (should_timeout_request(bd->rq))
1508+ if (cmd->fake_timeout)
14931509 return BLK_STS_OK;
14941510
14951511 return null_handle_cmd(cmd, sector, nr_sectors, req_op(bd->rq));
drivers/block/null_blk/null_blk.h+1−0
@@ -22,6 +22,7 @@ struct nullb_cmd { · 21 unmodified lines
2222 blk_status_t error;
2323 struct nullb_queue *nq;
2424 struct hrtimer timer;
25+ bool fake_timeout;
2526 };
2627
2728 struct nullb_queue {
drivers/block/rsxx/core.c+1−0
@@ -871,6 +871,7 @@ static int rsxx_pci_probe(struct pci_dev *dev, · 870 unmodified lines
871871 card->event_wq = create_singlethread_workqueue(DRIVER_NAME"_event");
872872 if (!card->event_wq) {
873873 dev_err(CARD_TO_DEV(card), "Failed card event setup.\n");
874+ st = -ENOMEM;
874875 goto failed_event_handler;
875876 }
876877
drivers/block/umem.c+4−1
@@ -877,6 +877,7 @@ static int mm_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) · 876 unmodified lines
877877 if (card->mm_pages[0].desc == NULL ||
878878 card->mm_pages[1].desc == NULL) {
879879 dev_printk(KERN_ERR, &card->dev->dev, "alloc failed\n");
880+ ret = -ENOMEM;
880881 goto failed_alloc;
881882 }
882883 reset_page(&card->mm_pages[0]);
@@ -888,8 +889,10 @@ static int mm_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) · 5 unmodified lines
888889 spin_lock_init(&card->lock);
889890
890891 card->queue = blk_alloc_queue(NUMA_NO_NODE);
891− if (!card->queue)
892+ if (!card->queue) {
893+ ret = -ENOMEM;
892894 goto failed_alloc;
895+ }
893896
894897 tasklet_init(&card->tasklet, process_page, (unsigned long)card);
895898
drivers/block/xen-blkback/blkback.c+1−1
@@ -891,7 +891,7 @@ next: · 890 unmodified lines
891891 out:
892892 for (i = last_map; i < num; i++) {
893893 /* Don't zap current batch's valid persistent grants. */
894− if(i >= last_map + segs_to_map)
894+ if(i >= map_until)
895895 pages[i]->persistent_gnt = NULL;
896896 pages[i]->handle = BLKBACK_INVALID_HANDLE;
897897 }
drivers/block/zram/zram_drv.c+11−6
@@ -627,7 +627,7 @@ static ssize_t writeback_store(struct device *dev, · 626 unmodified lines
627627 struct bio_vec bio_vec;
628628 struct page *page;
629629 ssize_t ret = len;
630− int mode;
630+ int mode, err;
631631 unsigned long blk_idx = 0;
632632
633633 if (sysfs_streq(buf, "idle"))
@@ -638,8 +638,8 @@ static ssize_t writeback_store(struct device *dev, · 4 unmodified lines
638638 if (strncmp(buf, PAGE_WB_SIG, sizeof(PAGE_WB_SIG) - 1))
639639 return -EINVAL;
640640
641− ret = kstrtol(buf + sizeof(PAGE_WB_SIG) - 1, 10, &index);
642− if (ret || index >= nr_pages)
641+ if (kstrtol(buf + sizeof(PAGE_WB_SIG) - 1, 10, &index) ||
642+ index >= nr_pages)
643643 return -EINVAL;
644644
645645 nr_pages = 1;
@@ -663,7 +663,7 @@ static ssize_t writeback_store(struct device *dev, · 17 unmodified lines
663663 goto release_init_lock;
664664 }
665665
666− while (nr_pages--) {
666+ for (; nr_pages != 0; index++, nr_pages--) {
667667 struct bio_vec bvec;
668668
669669 bvec.bv_page = page;
@@ -728,12 +728,17 @@ static ssize_t writeback_store(struct device *dev, · 58 unmodified lines
728728 * XXX: A single page IO would be inefficient for write
729729 * but it would be not bad as starter.
730730 */
731− ret = submit_bio_wait(&bio);
732− if (ret) {
731+ err = submit_bio_wait(&bio);
732+ if (err) {
733733 zram_slot_lock(zram, index);
734734 zram_clear_flag(zram, index, ZRAM_UNDER_WB);
735735 zram_clear_flag(zram, index, ZRAM_IDLE);
736736 zram_slot_unlock(zram, index);
737+ /*
738+ * Return last IO error unless every IO were
739+ * not suceeded.
740+ */
741+ ret = err;
737742 continue;
738743 }
739744
drivers/bluetooth/btrsi.c+0−1
@@ -194,5 +194,4 @@ module_init(rsi_91x_bt_module_init); · 193 unmodified lines
194194 module_exit(rsi_91x_bt_module_exit);
195195 MODULE_AUTHOR("Redpine Signals Inc");
196196 MODULE_DESCRIPTION("RSI BT driver");
197−MODULE_SUPPORTED_DEVICE("RSI-BT");
198197 MODULE_LICENSE("Dual BSD/GPL");
drivers/bluetooth/btusb.c+2−5
@@ -4849,8 +4849,8 @@ static int btusb_probe(struct usb_interface *intf, · 4848 unmodified lines
48494849 data->diag = NULL;
48504850 }
48514851
4852− if (!enable_autosuspend)
4853− usb_disable_autosuspend(data->udev);
4852+ if (enable_autosuspend)
4853+ usb_enable_autosuspend(data->udev);
48544854
48554855 err = hci_register_dev(hdev);
48564856 if (err < 0)
@@ -4910,9 +4910,6 @@ static void btusb_disconnect(struct usb_interface *intf) · 53 unmodified lines
49104910 gpiod_put(data->reset_gpio);
49114911
49124912 hci_free_dev(hdev);
4913−
4914− if (!enable_autosuspend)
4915− usb_enable_autosuspend(data->udev);
49164913 }
49174914
49184915 #ifdef CONFIG_PM
drivers/bus/moxtet.c+2−2
@@ -2,7 +2,7 @@ · 1 unmodified line
22 /*
33 * Turris Mox module configuration bus driver
44 *
5− * Copyright (C) 2019 Marek Behun <marek.behun@nic.cz>
5+ * Copyright (C) 2019 Marek Behún <kabel@kernel.org>
66 */
77
88 #include <dt-bindings/bus/moxtet.h>
@@ -879,6 +879,6 @@ static void __exit moxtet_exit(void) · 870 unmodified lines
879879 }
880880 module_exit(moxtet_exit);
881881
882−MODULE_AUTHOR("Marek Behun <marek.behun@nic.cz>");
882+MODULE_AUTHOR("Marek Behun <kabel@kernel.org>");
883883 MODULE_DESCRIPTION("CZ.NIC's Turris Mox module configuration bus");
884884 MODULE_LICENSE("GPL v2");
drivers/bus/mvebu-mbus.c+1−1
@@ -618,7 +618,7 @@ mvebu_mbus_find_bridge_hole(uint64_t *start, uint64_t *end) · 617 unmodified lines
618618 * This part of the memory is above 4 GB, so we don't
619619 * care for the MBus bridge hole.
620620 */
621− if (reg_start >= 0x100000000ULL)
621+ if ((u64)reg_start >= 0x100000000ULL)
622622 continue;
623623
624624 /*
drivers/bus/omap_l3_noc.c+2−2
@@ -285,7 +285,7 @@ static int omap_l3_probe(struct platform_device *pdev) · 284 unmodified lines
285285 */
286286 l3->debug_irq = platform_get_irq(pdev, 0);
287287 ret = devm_request_irq(l3->dev, l3->debug_irq, l3_interrupt_handler,
288− 0x0, "l3-dbg-irq", l3);
288+ IRQF_NO_THREAD, "l3-dbg-irq", l3);
289289 if (ret) {
290290 dev_err(l3->dev, "request_irq failed for %d\n",
291291 l3->debug_irq);
@@ -294,7 +294,7 @@ static int omap_l3_probe(struct platform_device *pdev) · 2 unmodified lines
294294
295295 l3->app_irq = platform_get_irq(pdev, 1);
296296 ret = devm_request_irq(l3->dev, l3->app_irq, l3_interrupt_handler,
297− 0x0, "l3-app-irq", l3);
297+ IRQF_NO_THREAD, "l3-app-irq", l3);
298298 if (ret)
299299 dev_err(l3->dev, "request_irq failed for %d\n", l3->app_irq);
300300
drivers/bus/ti-sysc.c+3−1
@@ -3053,7 +3053,9 @@ static int sysc_remove(struct platform_device *pdev) · 3052 unmodified lines
30533053
30543054 pm_runtime_put_sync(&pdev->dev);
30553055 pm_runtime_disable(&pdev->dev);
3056− reset_control_assert(ddata->rsts);
3056+
3057+ if (!reset_control_status(ddata->rsts))
3058+ reset_control_assert(ddata->rsts);
30573059
30583060 unprepare:
30593061 sysc_unprepare(ddata);
drivers/char/agp/Kconfig+1−1
@@ -125,7 +125,7 @@ config AGP_HP_ZX1 · 124 unmodified lines
125125
126126 config AGP_PARISC
127127 tristate "HP Quicksilver AGP support"
128− depends on AGP && PARISC && 64BIT
128+ depends on AGP && PARISC && 64BIT && IOMMU_SBA
129129 help
130130 This option gives you AGP GART support for the HP Quicksilver
131131 AGP bus adapter on HP PA-RISC machines (Ok, just on the C8000
drivers/char/applicom.c+0−3
@@ -81,9 +81,6 @@ MODULE_DESCRIPTION("Driver for Applicom Profibus card"); · 80 unmodified lines
8181 MODULE_LICENSE("GPL");
8282 MODULE_ALIAS_MISCDEV(AC_MINOR);
8383
84−MODULE_SUPPORTED_DEVICE("ac");
85−
86−
8784 static struct applicom_board {
8885 unsigned long PhysIO;
8986 void __iomem *RamIO;
drivers/char/hw_random/pseries-rng.c+1−2
@@ -54,10 +54,9 @@ static int pseries_rng_probe(struct vio_dev *dev, · 53 unmodified lines
5454 return hwrng_register(&pseries_rng);
5555 }
5656
57−static int pseries_rng_remove(struct vio_dev *dev)
57+static void pseries_rng_remove(struct vio_dev *dev)
5858 {
5959 hwrng_unregister(&pseries_rng);
60− return 0;
6160 }
6261
6362 static const struct vio_device_id pseries_rng_driver_ids[] = {
drivers/char/toshiba.c+0−1
@@ -64,7 +64,6 @@ · 63 unmodified lines
6464 MODULE_LICENSE("GPL");
6565 MODULE_AUTHOR("Jonathan Buzzard <jonathan@buzzard.org.uk>");
6666 MODULE_DESCRIPTION("Toshiba laptop SMM driver");
67−MODULE_SUPPORTED_DEVICE("toshiba");
6867
6968 static DEFINE_MUTEX(tosh_mutex);
7069 static int tosh_fn;
drivers/char/tpm/tpm_ibmvtpm.c+1−3
@@ -343,7 +343,7 @@ static int ibmvtpm_crq_send_init_complete(struct ibmvtpm_dev *ibmvtpm) · 342 unmodified lines
343343 *
344344 * Return: Always 0.
345345 */
346−static int tpm_ibmvtpm_remove(struct vio_dev *vdev)
346+static void tpm_ibmvtpm_remove(struct vio_dev *vdev)
347347 {
348348 struct tpm_chip *chip = dev_get_drvdata(&vdev->dev);
349349 struct ibmvtpm_dev *ibmvtpm = dev_get_drvdata(&chip->dev);
@@ -372,8 +372,6 @@ static int tpm_ibmvtpm_remove(struct vio_dev *vdev) · 22 unmodified lines
372372 kfree(ibmvtpm);
373373 /* For tpm_ibmvtpm_get_desired_dma */
374374 dev_set_drvdata(&vdev->dev, NULL);
375−
376− return 0;
377375 }
378376
379377 /**
drivers/clk/clk-fixed-factor.c+8−1
@@ -66,7 +66,14 @@ EXPORT_SYMBOL_GPL(clk_fixed_factor_ops); · 65 unmodified lines
6666
6767 static void devm_clk_hw_register_fixed_factor_release(struct device *dev, void *res)
6868 {
69− clk_hw_unregister_fixed_factor(&((struct clk_fixed_factor *)res)->hw);
69+ struct clk_fixed_factor *fix = res;
70+
71+ /*
72+ * We can not use clk_hw_unregister_fixed_factor, since it will kfree()
73+ * the hw, resulting in double free. Just unregister the hw and let
74+ * devres code kfree() it.
75+ */
76+ clk_hw_unregister(&fix->hw);
7077 }
7178
7279 static struct clk_hw *
drivers/clk/clk.c+21−26
@@ -4357,20 +4357,19 @@ int clk_notifier_register(struct clk *clk, struct notifier_block *nb) · 4356 unmodified lines
43574357 /* search the list of notifiers for this clk */
43584358 list_for_each_entry(cn, &clk_notifier_list, node)
43594359 if (cn->clk == clk)
4360− break;
4360+ goto found;
43614361
43624362 /* if clk wasn't in the notifier list, allocate new clk_notifier */
4363− if (cn->clk != clk) {
4364− cn = kzalloc(sizeof(*cn), GFP_KERNEL);
4365− if (!cn)
4366− goto out;
4363+ cn = kzalloc(sizeof(*cn), GFP_KERNEL);
4364+ if (!cn)
4365+ goto out;
43674366
4368− cn->clk = clk;
4369− srcu_init_notifier_head(&cn->notifier_head);
4367+ cn->clk = clk;
4368+ srcu_init_notifier_head(&cn->notifier_head);
43704369
4371− list_add(&cn->node, &clk_notifier_list);
4372− }
4370+ list_add(&cn->node, &clk_notifier_list);
43734371
4372+found:
43744373 ret = srcu_notifier_chain_register(&cn->notifier_head, nb);
43754374
43764375 clk->core->notifier_count++;
@@ -4395,32 +4394,28 @@ EXPORT_SYMBOL_GPL(clk_notifier_register); · 18 unmodified lines
43954394 */
43964395 int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb)
43974396 {
4398− struct clk_notifier *cn = NULL;
4399− int ret = -EINVAL;
4397+ struct clk_notifier *cn;
4398+ int ret = -ENOENT;
44004399
44014400 if (!clk || !nb)
44024401 return -EINVAL;
44034402
44044403 clk_prepare_lock();
44054404
4406− list_for_each_entry(cn, &clk_notifier_list, node)
4407− if (cn->clk == clk)
4408− break;
4409−
4410− if (cn->clk == clk) {
4411− ret = srcu_notifier_chain_unregister(&cn->notifier_head, nb);
4405+ list_for_each_entry(cn, &clk_notifier_list, node) {
4406+ if (cn->clk == clk) {
4407+ ret = srcu_notifier_chain_unregister(&cn->notifier_head, nb);
44124408
4413− clk->core->notifier_count--;
4409+ clk->core->notifier_count--;
44144410
4415− /* XXX the notifier code should handle this better */
4416− if (!cn->notifier_head.head) {
4417− srcu_cleanup_notifier_head(&cn->notifier_head);
4418− list_del(&cn->node);
4419− kfree(cn);
4411+ /* XXX the notifier code should handle this better */
4412+ if (!cn->notifier_head.head) {
4413+ srcu_cleanup_notifier_head(&cn->notifier_head);
4414+ list_del(&cn->node);
4415+ kfree(cn);
4416+ }
4417+ break;
44204418 }
4421−
4422− } else {
4423− ret = -ENOENT;
44244419 }
44254420
44264421 clk_prepare_unlock();
drivers/clk/qcom/camcc-sc7180.c+25−25
@@ -304,7 +304,7 @@ static struct clk_rcg2 cam_cc_bps_clk_src = { · 303 unmodified lines
304304 .name = "cam_cc_bps_clk_src",
305305 .parent_data = cam_cc_parent_data_2,
306306 .num_parents = 5,
307− .ops = &clk_rcg2_ops,
307+ .ops = &clk_rcg2_shared_ops,
308308 },
309309 };
310310
@@ -325,7 +325,7 @@ static struct clk_rcg2 cam_cc_cci_0_clk_src = { · 14 unmodified lines
325325 .name = "cam_cc_cci_0_clk_src",
326326 .parent_data = cam_cc_parent_data_5,
327327 .num_parents = 3,
328− .ops = &clk_rcg2_ops,
328+ .ops = &clk_rcg2_shared_ops,
329329 },
330330 };
331331
@@ -339,7 +339,7 @@ static struct clk_rcg2 cam_cc_cci_1_clk_src = { · 7 unmodified lines
339339 .name = "cam_cc_cci_1_clk_src",
340340 .parent_data = cam_cc_parent_data_5,
341341 .num_parents = 3,
342− .ops = &clk_rcg2_ops,
342+ .ops = &clk_rcg2_shared_ops,
343343 },
344344 };
345345
@@ -360,7 +360,7 @@ static struct clk_rcg2 cam_cc_cphy_rx_clk_src = { · 14 unmodified lines
360360 .name = "cam_cc_cphy_rx_clk_src",
361361 .parent_data = cam_cc_parent_data_3,
362362 .num_parents = 6,
363− .ops = &clk_rcg2_ops,
363+ .ops = &clk_rcg2_shared_ops,
364364 },
365365 };
366366
@@ -379,7 +379,7 @@ static struct clk_rcg2 cam_cc_csi0phytimer_clk_src = { · 12 unmodified lines
379379 .name = "cam_cc_csi0phytimer_clk_src",
380380 .parent_data = cam_cc_parent_data_0,
381381 .num_parents = 4,
382− .ops = &clk_rcg2_ops,
382+ .ops = &clk_rcg2_shared_ops,
383383 },
384384 };
385385
@@ -393,7 +393,7 @@ static struct clk_rcg2 cam_cc_csi1phytimer_clk_src = { · 7 unmodified lines
393393 .name = "cam_cc_csi1phytimer_clk_src",
394394 .parent_data = cam_cc_parent_data_0,
395395 .num_parents = 4,
396− .ops = &clk_rcg2_ops,
396+ .ops = &clk_rcg2_shared_ops,
397397 },
398398 };
399399
@@ -407,7 +407,7 @@ static struct clk_rcg2 cam_cc_csi2phytimer_clk_src = { · 7 unmodified lines
407407 .name = "cam_cc_csi2phytimer_clk_src",
408408 .parent_data = cam_cc_parent_data_0,
409409 .num_parents = 4,
410− .ops = &clk_rcg2_ops,
410+ .ops = &clk_rcg2_shared_ops,
411411 },
412412 };
413413
@@ -421,7 +421,7 @@ static struct clk_rcg2 cam_cc_csi3phytimer_clk_src = { · 7 unmodified lines
421421 .name = "cam_cc_csi3phytimer_clk_src",
422422 .parent_data = cam_cc_parent_data_0,
423423 .num_parents = 4,
424− .ops = &clk_rcg2_ops,
424+ .ops = &clk_rcg2_shared_ops,
425425 },
426426 };
427427
@@ -443,7 +443,7 @@ static struct clk_rcg2 cam_cc_fast_ahb_clk_src = { · 15 unmodified lines
443443 .name = "cam_cc_fast_ahb_clk_src",
444444 .parent_data = cam_cc_parent_data_0,
445445 .num_parents = 4,
446− .ops = &clk_rcg2_ops,
446+ .ops = &clk_rcg2_shared_ops,
447447 },
448448 };
449449
@@ -466,7 +466,7 @@ static struct clk_rcg2 cam_cc_icp_clk_src = { · 16 unmodified lines
466466 .name = "cam_cc_icp_clk_src",
467467 .parent_data = cam_cc_parent_data_2,
468468 .num_parents = 5,
469− .ops = &clk_rcg2_ops,
469+ .ops = &clk_rcg2_shared_ops,
470470 },
471471 };
472472
@@ -488,7 +488,7 @@ static struct clk_rcg2 cam_cc_ife_0_clk_src = { · 15 unmodified lines
488488 .name = "cam_cc_ife_0_clk_src",
489489 .parent_data = cam_cc_parent_data_4,
490490 .num_parents = 4,
491− .ops = &clk_rcg2_ops,
491+ .ops = &clk_rcg2_shared_ops,
492492 },
493493 };
494494
@@ -510,7 +510,7 @@ static struct clk_rcg2 cam_cc_ife_0_csid_clk_src = { · 15 unmodified lines
510510 .name = "cam_cc_ife_0_csid_clk_src",
511511 .parent_data = cam_cc_parent_data_3,
512512 .num_parents = 6,
513− .ops = &clk_rcg2_ops,
513+ .ops = &clk_rcg2_shared_ops,
514514 },
515515 };
516516
@@ -524,7 +524,7 @@ static struct clk_rcg2 cam_cc_ife_1_clk_src = { · 7 unmodified lines
524524 .name = "cam_cc_ife_1_clk_src",
525525 .parent_data = cam_cc_parent_data_4,
526526 .num_parents = 4,
527− .ops = &clk_rcg2_ops,
527+ .ops = &clk_rcg2_shared_ops,
528528 },
529529 };
530530
@@ -538,7 +538,7 @@ static struct clk_rcg2 cam_cc_ife_1_csid_clk_src = { · 7 unmodified lines
538538 .name = "cam_cc_ife_1_csid_clk_src",
539539 .parent_data = cam_cc_parent_data_3,
540540 .num_parents = 6,
541− .ops = &clk_rcg2_ops,
541+ .ops = &clk_rcg2_shared_ops,
542542 },
543543 };
544544
@@ -553,7 +553,7 @@ static struct clk_rcg2 cam_cc_ife_lite_clk_src = { · 8 unmodified lines
553553 .parent_data = cam_cc_parent_data_4,
554554 .num_parents = 4,
555555 .flags = CLK_SET_RATE_PARENT,
556− .ops = &clk_rcg2_ops,
556+ .ops = &clk_rcg2_shared_ops,
557557 },
558558 };
559559
@@ -567,7 +567,7 @@ static struct clk_rcg2 cam_cc_ife_lite_csid_clk_src = { · 7 unmodified lines
567567 .name = "cam_cc_ife_lite_csid_clk_src",
568568 .parent_data = cam_cc_parent_data_3,
569569 .num_parents = 6,
570− .ops = &clk_rcg2_ops,
570+ .ops = &clk_rcg2_shared_ops,
571571 },
572572 };
573573
@@ -590,7 +590,7 @@ static struct clk_rcg2 cam_cc_ipe_0_clk_src = { · 16 unmodified lines
590590 .name = "cam_cc_ipe_0_clk_src",
591591 .parent_data = cam_cc_parent_data_2,
592592 .num_parents = 5,
593− .ops = &clk_rcg2_ops,
593+ .ops = &clk_rcg2_shared_ops,
594594 },
595595 };
596596
@@ -613,7 +613,7 @@ static struct clk_rcg2 cam_cc_jpeg_clk_src = { · 16 unmodified lines
613613 .name = "cam_cc_jpeg_clk_src",
614614 .parent_data = cam_cc_parent_data_2,
615615 .num_parents = 5,
616− .ops = &clk_rcg2_ops,
616+ .ops = &clk_rcg2_shared_ops,
617617 },
618618 };
619619
@@ -635,7 +635,7 @@ static struct clk_rcg2 cam_cc_lrme_clk_src = { · 15 unmodified lines
635635 .name = "cam_cc_lrme_clk_src",
636636 .parent_data = cam_cc_parent_data_6,
637637 .num_parents = 5,
638− .ops = &clk_rcg2_ops,
638+ .ops = &clk_rcg2_shared_ops,
639639 },
640640 };
641641
@@ -656,7 +656,7 @@ static struct clk_rcg2 cam_cc_mclk0_clk_src = { · 14 unmodified lines
656656 .name = "cam_cc_mclk0_clk_src",
657657 .parent_data = cam_cc_parent_data_1,
658658 .num_parents = 3,
659− .ops = &clk_rcg2_ops,
659+ .ops = &clk_rcg2_shared_ops,
660660 },
661661 };
662662
@@ -670,7 +670,7 @@ static struct clk_rcg2 cam_cc_mclk1_clk_src = { · 7 unmodified lines
670670 .name = "cam_cc_mclk1_clk_src",
671671 .parent_data = cam_cc_parent_data_1,
672672 .num_parents = 3,
673− .ops = &clk_rcg2_ops,
673+ .ops = &clk_rcg2_shared_ops,
674674 },
675675 };
676676
@@ -684,7 +684,7 @@ static struct clk_rcg2 cam_cc_mclk2_clk_src = { · 7 unmodified lines
684684 .name = "cam_cc_mclk2_clk_src",
685685 .parent_data = cam_cc_parent_data_1,
686686 .num_parents = 3,
687− .ops = &clk_rcg2_ops,
687+ .ops = &clk_rcg2_shared_ops,
688688 },
689689 };
690690
@@ -698,7 +698,7 @@ static struct clk_rcg2 cam_cc_mclk3_clk_src = { · 7 unmodified lines
698698 .name = "cam_cc_mclk3_clk_src",
699699 .parent_data = cam_cc_parent_data_1,
700700 .num_parents = 3,
701− .ops = &clk_rcg2_ops,
701+ .ops = &clk_rcg2_shared_ops,
702702 },
703703 };
704704
@@ -712,7 +712,7 @@ static struct clk_rcg2 cam_cc_mclk4_clk_src = { · 7 unmodified lines
712712 .name = "cam_cc_mclk4_clk_src",
713713 .parent_data = cam_cc_parent_data_1,
714714 .num_parents = 3,
715− .ops = &clk_rcg2_ops,
715+ .ops = &clk_rcg2_shared_ops,
716716 },
717717 };
718718
@@ -732,7 +732,7 @@ static struct clk_rcg2 cam_cc_slow_ahb_clk_src = { · 13 unmodified lines
732732 .parent_data = cam_cc_parent_data_0,
733733 .num_parents = 4,
734734 .flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE,
735− .ops = &clk_rcg2_ops,
735+ .ops = &clk_rcg2_shared_ops,
736736 },
737737 };
738738
drivers/clk/qcom/clk-rcg2.c+9−8
@@ -730,7 +730,8 @@ static int clk_gfx3d_determine_rate(struct clk_hw *hw, · 729 unmodified lines
730730 struct clk_rate_request parent_req = { };
731731 struct clk_rcg2_gfx3d *cgfx = to_clk_rcg2_gfx3d(hw);
732732 struct clk_hw *xo, *p0, *p1, *p2;
733− unsigned long request, p0_rate;
733+ unsigned long p0_rate;
734+ u8 mux_div = cgfx->div;
734735 int ret;
735736
736737 p0 = cgfx->hws[0];
@@ -750,14 +751,15 @@ static int clk_gfx3d_determine_rate(struct clk_hw *hw, · 13 unmodified lines
750751 return 0;
751752 }
752753
753− request = req->rate;
754− if (cgfx->div > 1)
755− parent_req.rate = request = request * cgfx->div;
754+ if (mux_div == 0)
755+ mux_div = 1;
756+
757+ parent_req.rate = req->rate * mux_div;
756758
757759 /* This has to be a fixed rate PLL */
758760 p0_rate = clk_hw_get_rate(p0);
759761
760− if (request == p0_rate) {
762+ if (parent_req.rate == p0_rate) {
761763 req->rate = req->best_parent_rate = p0_rate;
762764 req->best_parent_hw = p0;
763765 return 0;
@@ -765,7 +767,7 @@ static int clk_gfx3d_determine_rate(struct clk_hw *hw, · 1 unmodified line
765767
766768 if (req->best_parent_hw == p0) {
767769 /* Are we going back to a previously used rate? */
768− if (clk_hw_get_rate(p2) == request)
770+ if (clk_hw_get_rate(p2) == parent_req.rate)
769771 req->best_parent_hw = p2;
770772 else
771773 req->best_parent_hw = p1;
@@ -780,8 +782,7 @@ static int clk_gfx3d_determine_rate(struct clk_hw *hw, · 8 unmodified lines
780782 return ret;
781783
782784 req->rate = req->best_parent_rate = parent_req.rate;
783− if (cgfx->div > 1)
784− req->rate /= cgfx->div;
785+ req->rate /= mux_div;
785786
786787 return 0;
787788 }
drivers/clk/qcom/clk-rpmh.c+5−2
@@ -510,9 +510,12 @@ static const struct clk_rpmh_desc clk_rpmh_sm8350 = { · 509 unmodified lines
510510 .num_clks = ARRAY_SIZE(sm8350_rpmh_clocks),
511511 };
512512
513+/* Resource name must match resource id present in cmd-db */
514+DEFINE_CLK_RPMH_ARC(sc7280, bi_tcxo, bi_tcxo_ao, "xo.lvl", 0x3, 4);
515+
513516 static struct clk_hw *sc7280_rpmh_clocks[] = {
514− [RPMH_CXO_CLK] = &sdm845_bi_tcxo.hw,
515− [RPMH_CXO_CLK_A] = &sdm845_bi_tcxo_ao.hw,
517+ [RPMH_CXO_CLK] = &sc7280_bi_tcxo.hw,
518+ [RPMH_CXO_CLK_A] = &sc7280_bi_tcxo_ao.hw,
516519 [RPMH_LN_BB_CLK2] = &sdm845_ln_bb_clk2.hw,
517520 [RPMH_LN_BB_CLK2_A] = &sdm845_ln_bb_clk2_ao.hw,
518521 [RPMH_RF_CLK1] = &sdm845_rf_clk1.hw,
drivers/clk/qcom/gcc-sc7180.c+2−2
@@ -620,7 +620,7 @@ static struct clk_rcg2 gcc_sdcc1_apps_clk_src = { · 619 unmodified lines
620620 .name = "gcc_sdcc1_apps_clk_src",
621621 .parent_data = gcc_parent_data_1,
622622 .num_parents = 5,
623− .ops = &clk_rcg2_ops,
623+ .ops = &clk_rcg2_floor_ops,
624624 },
625625 };
626626
@@ -642,7 +642,7 @@ static struct clk_rcg2 gcc_sdcc1_ice_core_clk_src = { · 15 unmodified lines
642642 .name = "gcc_sdcc1_ice_core_clk_src",
643643 .parent_data = gcc_parent_data_0,
644644 .num_parents = 4,
645− .ops = &clk_rcg2_floor_ops,
645+ .ops = &clk_rcg2_ops,
646646 },
647647 };
648648
drivers/clk/socfpga/clk-gate.c+1−1
@@ -99,7 +99,7 @@ static unsigned long socfpga_clk_recalc_rate(struct clk_hw *hwclk, · 98 unmodified lines
9999 val = readl(socfpgaclk->div_reg) >> socfpgaclk->shift;
100100 val &= GENMASK(socfpgaclk->width - 1, 0);
101101 /* Check for GPIO_DB_CLK by its offset */
102− if ((int) socfpgaclk->div_reg & SOCFPGA_GPIO_DB_CLK_OFFSET)
102+ if ((uintptr_t) socfpgaclk->div_reg & SOCFPGA_GPIO_DB_CLK_OFFSET)
103103 div = val + 1;
104104 else
105105 div = (1 << val);
drivers/counter/stm32-timer-cnt.c+33−22
@@ -31,7 +31,7 @@ struct stm32_timer_cnt { · 30 unmodified lines
3131 struct counter_device counter;
3232 struct regmap *regmap;
3333 struct clk *clk;
34− u32 ceiling;
34+ u32 max_arr;
3535 bool enabled;
3636 struct stm32_timer_regs bak;
3737 };
@@ -44,13 +44,14 @@ struct stm32_timer_cnt { · 6 unmodified lines
4444 * @STM32_COUNT_ENCODER_MODE_3: counts on both TI1FP1 and TI2FP2 edges
4545 */
4646 enum stm32_count_function {
47− STM32_COUNT_SLAVE_MODE_DISABLED = -1,
47+ STM32_COUNT_SLAVE_MODE_DISABLED,
4848 STM32_COUNT_ENCODER_MODE_1,
4949 STM32_COUNT_ENCODER_MODE_2,
5050 STM32_COUNT_ENCODER_MODE_3,
5151 };
5252
5353 static enum counter_count_function stm32_count_functions[] = {
54+ [STM32_COUNT_SLAVE_MODE_DISABLED] = COUNTER_COUNT_FUNCTION_INCREASE,
5455 [STM32_COUNT_ENCODER_MODE_1] = COUNTER_COUNT_FUNCTION_QUADRATURE_X2_A,
5556 [STM32_COUNT_ENCODER_MODE_2] = COUNTER_COUNT_FUNCTION_QUADRATURE_X2_B,
5657 [STM32_COUNT_ENCODER_MODE_3] = COUNTER_COUNT_FUNCTION_QUADRATURE_X4,
@@ -73,8 +74,10 @@ static int stm32_count_write(struct counter_device *counter, · 16 unmodified lines
7374 const unsigned long val)
7475 {
7576 struct stm32_timer_cnt *const priv = counter->priv;
77+ u32 ceiling;
7678
77− if (val > priv->ceiling)
79+ regmap_read(priv->regmap, TIM_ARR, &ceiling);
80+ if (val > ceiling)
7881 return -EINVAL;
7982
8083 return regmap_write(priv->regmap, TIM_CNT, val);
@@ -90,6 +93,9 @@ static int stm32_count_function_get(struct counter_device *counter, · 9 unmodified lines
9093 regmap_read(priv->regmap, TIM_SMCR, &smcr);
9194
9295 switch (smcr & TIM_SMCR_SMS) {
96+ case 0:
97+ *function = STM32_COUNT_SLAVE_MODE_DISABLED;
98+ return 0;
9399 case 1:
94100 *function = STM32_COUNT_ENCODER_MODE_1;
95101 return 0;
@@ -99,9 +105,9 @@ static int stm32_count_function_get(struct counter_device *counter, · 3 unmodified lines
99105 case 3:
100106 *function = STM32_COUNT_ENCODER_MODE_3;
101107 return 0;
108+ default:
109+ return -EINVAL;
102110 }
103−
104− return -EINVAL;
105111 }
106112
107113 static int stm32_count_function_set(struct counter_device *counter,
@@ -112,6 +118,9 @@ static int stm32_count_function_set(struct counter_device *counter, · 4 unmodified lines
112118 u32 cr1, sms;
113119
114120 switch (function) {
121+ case STM32_COUNT_SLAVE_MODE_DISABLED:
122+ sms = 0;
123+ break;
115124 case STM32_COUNT_ENCODER_MODE_1:
116125 sms = 1;
117126 break;
@@ -122,8 +131,7 @@ static int stm32_count_function_set(struct counter_device *counter, · 4 unmodified lines
122131 sms = 3;
123132 break;
124133 default:
125− sms = 0;
126− break;
134+ return -EINVAL;
127135 }
128136
129137 /* Store enable status */
@@ -131,10 +139,6 @@ static int stm32_count_function_set(struct counter_device *counter, · 1 unmodified line
131139
132140 regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_CEN, 0);
133141
134− /* TIMx_ARR register shouldn't be buffered (ARPE=0) */
135− regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_ARPE, 0);
136− regmap_write(priv->regmap, TIM_ARR, priv->ceiling);
137−
138142 regmap_update_bits(priv->regmap, TIM_SMCR, TIM_SMCR_SMS, sms);
139143
140144 /* Make sure that registers are updated */
@@ -185,11 +189,13 @@ static ssize_t stm32_count_ceiling_write(struct counter_device *counter, · 44 unmodified lines
185189 if (ret)
186190 return ret;
187191
192+ if (ceiling > priv->max_arr)
193+ return -ERANGE;
194+
188195 /* TIMx_ARR register shouldn't be buffered (ARPE=0) */
189196 regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_ARPE, 0);
190197 regmap_write(priv->regmap, TIM_ARR, ceiling);
191198
192− priv->ceiling = ceiling;
193199 return len;
194200 }
195201
@@ -274,31 +280,36 @@ static int stm32_action_get(struct counter_device *counter, · 78 unmodified lines
274280 size_t function;
275281 int err;
276282
277− /* Default action mode (e.g. STM32_COUNT_SLAVE_MODE_DISABLED) */
278− *action = STM32_SYNAPSE_ACTION_NONE;
279−
280283 err = stm32_count_function_get(counter, count, &function);
281284 if (err)
282− return 0;
285+ return err;
283286
284287 switch (function) {
288+ case STM32_COUNT_SLAVE_MODE_DISABLED:
289+ /* counts on internal clock when CEN=1 */
290+ *action = STM32_SYNAPSE_ACTION_NONE;
291+ return 0;
285292 case STM32_COUNT_ENCODER_MODE_1:
286293 /* counts up/down on TI1FP1 edge depending on TI2FP2 level */
287294 if (synapse->signal->id == count->synapses[0].signal->id)
288295 *action = STM32_SYNAPSE_ACTION_BOTH_EDGES;
289− break;
296+ else
297+ *action = STM32_SYNAPSE_ACTION_NONE;
298+ return 0;
290299 case STM32_COUNT_ENCODER_MODE_2:
291300 /* counts up/down on TI2FP2 edge depending on TI1FP1 level */
292301 if (synapse->signal->id == count->synapses[1].signal->id)
293302 *action = STM32_SYNAPSE_ACTION_BOTH_EDGES;
294− break;
303+ else
304+ *action = STM32_SYNAPSE_ACTION_NONE;
305+ return 0;
295306 case STM32_COUNT_ENCODER_MODE_3:
296307 /* counts up/down on both TI1FP1 and TI2FP2 edges */
297308 *action = STM32_SYNAPSE_ACTION_BOTH_EDGES;
298− break;
309+ return 0;
310+ default:
311+ return -EINVAL;
299312 }
300−
301− return 0;
302313 }
303314
304315 static const struct counter_ops stm32_timer_cnt_ops = {
@@ -359,7 +370,7 @@ static int stm32_timer_cnt_probe(struct platform_device *pdev) · 54 unmodified lines
359370
360371 priv->regmap = ddata->regmap;
361372 priv->clk = ddata->clk;
362− priv->ceiling = ddata->max_arr;
373+ priv->max_arr = ddata->max_arr;
363374
364375 priv->counter.name = dev_name(dev);
365376 priv->counter.parent = dev;
drivers/cpufreq/cpufreq-dt-platdev.c+2−0
@@ -103,6 +103,8 @@ static const struct of_device_id whitelist[] __initconst = { · 102 unmodified lines
103103 static const struct of_device_id blacklist[] __initconst = {
104104 { .compatible = "allwinner,sun50i-h6", },
105105
106+ { .compatible = "arm,vexpress", },
107+
106108 { .compatible = "calxeda,highbank", },
107109 { .compatible = "calxeda,ecx-2000", },
108110
drivers/cpufreq/freq_table.c+2−2
@@ -267,7 +267,7 @@ struct freq_attr cpufreq_freq_attr_##_name##_freqs = \ · 266 unmodified lines
267267 __ATTR_RO(_name##_frequencies)
268268
269269 /*
270− * show_scaling_available_frequencies - show available normal frequencies for
270+ * scaling_available_frequencies_show - show available normal frequencies for
271271 * the specified CPU
272272 */
273273 static ssize_t scaling_available_frequencies_show(struct cpufreq_policy *policy,
@@ -279,7 +279,7 @@ cpufreq_attr_available_freq(scaling_available); · 5 unmodified lines
279279 EXPORT_SYMBOL_GPL(cpufreq_freq_attr_scaling_available_freqs);
280280
281281 /*
282− * show_available_boost_freqs - show available boost frequencies for
282+ * scaling_boost_frequencies_show - show available boost frequencies for
283283 * the specified CPU
284284 */
285285 static ssize_t scaling_boost_frequencies_show(struct cpufreq_policy *policy,
drivers/cpufreq/qcom-cpufreq-hw.c+3−3
@@ -317,9 +317,9 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy) · 316 unmodified lines
317317 }
318318
319319 base = ioremap(res->start, resource_size(res));
320− if (IS_ERR(base)) {
320+ if (!base) {
321321 dev_err(dev, "failed to map resource %pR\n", res);
322− ret = PTR_ERR(base);
322+ ret = -ENOMEM;
323323 goto release_region;
324324 }
325325
@@ -374,7 +374,7 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy) · 48 unmodified lines
374374 error:
375375 kfree(data);
376376 unmap_base:
377− iounmap(data->base);
377+ iounmap(base);
378378 release_region:
379379 release_mem_region(res->start, resource_size(res));
380380 return ret;
drivers/crypto/nx/nx-842-pseries.c+1−3
@@ -1042,7 +1042,7 @@ error: · 1041 unmodified lines
10421042 return ret;
10431043 }
10441044
1045−static int nx842_remove(struct vio_dev *viodev)
1045+static void nx842_remove(struct vio_dev *viodev)
10461046 {
10471047 struct nx842_devdata *old_devdata;
10481048 unsigned long flags;
@@ -1063,8 +1063,6 @@ static int nx842_remove(struct vio_dev *viodev) · 14 unmodified lines
10631063 if (old_devdata)
10641064 kfree(old_devdata->counters);
10651065 kfree(old_devdata);
1066−
1067− return 0;
10681066 }
10691067
10701068 static const struct vio_device_id nx842_vio_driver_ids[] = {
drivers/crypto/nx/nx.c+1−3
@@ -783,7 +783,7 @@ static int nx_probe(struct vio_dev *viodev, const struct vio_device_id *id) · 782 unmodified lines
783783 return nx_register_algs();
784784 }
785785
786−static int nx_remove(struct vio_dev *viodev)
786+static void nx_remove(struct vio_dev *viodev)
787787 {
788788 dev_dbg(&viodev->dev, "entering nx_remove for UA 0x%x\n",
789789 viodev->unit_address);
@@ -811,8 +811,6 @@ static int nx_remove(struct vio_dev *viodev) · 21 unmodified lines
811811 nx_unregister_skcipher(&nx_ecb_aes_alg, NX_FC_AES,
812812 NX_MODE_AES_ECB);
813813 }
814−
815− return 0;
816814 }
817815
818816
drivers/cxl/mem.c+89−63
@@ -4,6 +4,7 @@ · 3 unmodified lines
44 #include <linux/security.h>
55 #include <linux/debugfs.h>
66 #include <linux/module.h>
7+#include <linux/sizes.h>
78 #include <linux/mutex.h>
89 #include <linux/cdev.h>
910 #include <linux/idr.h>
@@ -96,21 +97,18 @@ struct mbox_cmd { · 86 unmodified lines
9697 * @dev: driver core device object
9798 * @cdev: char dev core object for ioctl operations
9899 * @cxlm: pointer to the parent device driver data
99− * @ops_active: active user of @cxlm in ops handlers
100− * @ops_dead: completion when all @cxlm ops users have exited
101100 * @id: id number of this memdev instance.
102101 */
103102 struct cxl_memdev {
104103 struct device dev;
105104 struct cdev cdev;
106105 struct cxl_mem *cxlm;
107− struct percpu_ref ops_active;
108− struct completion ops_dead;
109106 int id;
110107 };
111108
112109 static int cxl_mem_major;
113110 static DEFINE_IDA(cxl_memdev_ida);
111+static DECLARE_RWSEM(cxl_memdev_rwsem);
114112 static struct dentry *cxl_debugfs;
115113 static bool cxl_raw_allow_all;
116114
@@ -169,7 +167,7 @@ struct cxl_mem_command { · 52 unmodified lines
169167 * table will be validated against the user's input. For example, if size_in is
170168 * 0, and the user passed in 1, it is an error.
171169 */
172−static struct cxl_mem_command mem_commands[] = {
170+static struct cxl_mem_command mem_commands[CXL_MEM_COMMAND_ID_MAX] = {
173171 CXL_CMD(IDENTIFY, 0, 0x43, CXL_CMD_FLAG_FORCE_ENABLE),
174172 #ifdef CONFIG_CXL_MEM_RAW_COMMANDS
175173 CXL_CMD(RAW, ~0, ~0, 0),
@@ -776,26 +774,43 @@ static long __cxl_memdev_ioctl(struct cxl_memdev *cxlmd, unsigned int cmd, · 600 unmodified lines
776774 static long cxl_memdev_ioctl(struct file *file, unsigned int cmd,
777775 unsigned long arg)
778776 {
779− struct cxl_memdev *cxlmd;
780− struct inode *inode;
781− int rc = -ENOTTY;
777+ struct cxl_memdev *cxlmd = file->private_data;
778+ int rc = -ENXIO;
782779
783− inode = file_inode(file);
784− cxlmd = container_of(inode->i_cdev, typeof(*cxlmd), cdev);
780+ down_read(&cxl_memdev_rwsem);
781+ if (cxlmd->cxlm)
782+ rc = __cxl_memdev_ioctl(cxlmd, cmd, arg);
783+ up_read(&cxl_memdev_rwsem);
785784
786− if (!percpu_ref_tryget_live(&cxlmd->ops_active))
787− return -ENXIO;
785+ return rc;
786+}
788787
789− rc = __cxl_memdev_ioctl(cxlmd, cmd, arg);
788+static int cxl_memdev_open(struct inode *inode, struct file *file)
789+{
790+ struct cxl_memdev *cxlmd =
791+ container_of(inode->i_cdev, typeof(*cxlmd), cdev);
790792
791− percpu_ref_put(&cxlmd->ops_active);
793+ get_device(&cxlmd->dev);
794+ file->private_data = cxlmd;
792795
793− return rc;
796+ return 0;
797+}
798+
799+static int cxl_memdev_release_file(struct inode *inode, struct file *file)
800+{
801+ struct cxl_memdev *cxlmd =
802+ container_of(inode->i_cdev, typeof(*cxlmd), cdev);
803+
804+ put_device(&cxlmd->dev);
805+
806+ return 0;
794807 }
795808
796809 static const struct file_operations cxl_memdev_fops = {
797810 .owner = THIS_MODULE,
798811 .unlocked_ioctl = cxl_memdev_ioctl,
812+ .open = cxl_memdev_open,
813+ .release = cxl_memdev_release_file,
799814 .compat_ioctl = compat_ptr_ioctl,
800815 .llseek = noop_llseek,
801816 };
@@ -984,7 +999,7 @@ static struct cxl_mem *cxl_mem_create(struct pci_dev *pdev, u32 reg_lo, · 182 unmodified lines
984999 return NULL;
9851000 }
9861001
987− offset = ((u64)reg_hi << 32) | FIELD_GET(CXL_REGLOC_ADDR_MASK, reg_lo);
1002+ offset = ((u64)reg_hi << 32) | (reg_lo & CXL_REGLOC_ADDR_MASK);
9881003 bar = FIELD_GET(CXL_REGLOC_BIR_MASK, reg_lo);
9891004
9901005 /* Basic sanity check that BAR is big enough */
@@ -1049,7 +1064,6 @@ static void cxl_memdev_release(struct device *dev) · 58 unmodified lines
10491064 {
10501065 struct cxl_memdev *cxlmd = to_cxl_memdev(dev);
10511066
1052− percpu_ref_exit(&cxlmd->ops_active);
10531067 ida_free(&cxl_memdev_ida, cxlmd->id);
10541068 kfree(cxlmd);
10551069 }
@@ -1066,7 +1080,7 @@ static ssize_t firmware_version_show(struct device *dev, · 10 unmodified lines
10661080 struct cxl_memdev *cxlmd = to_cxl_memdev(dev);
10671081 struct cxl_mem *cxlm = cxlmd->cxlm;
10681082
1069− return sprintf(buf, "%.16s\n", cxlm->firmware_version);
1083+ return sysfs_emit(buf, "%.16s\n", cxlm->firmware_version);
10701084 }
10711085 static DEVICE_ATTR_RO(firmware_version);
10721086
@@ -1076,7 +1090,7 @@ static ssize_t payload_max_show(struct device *dev, · 3 unmodified lines
10761090 struct cxl_memdev *cxlmd = to_cxl_memdev(dev);
10771091 struct cxl_mem *cxlm = cxlmd->cxlm;
10781092
1079− return sprintf(buf, "%zu\n", cxlm->payload_size);
1093+ return sysfs_emit(buf, "%zu\n", cxlm->payload_size);
10801094 }
10811095 static DEVICE_ATTR_RO(payload_max);
10821096
@@ -1087,7 +1101,7 @@ static ssize_t ram_size_show(struct device *dev, struct device_attribute *attr, · 4 unmodified lines
10871101 struct cxl_mem *cxlm = cxlmd->cxlm;
10881102 unsigned long long len = range_len(&cxlm->ram_range);
10891103
1090− return sprintf(buf, "%#llx\n", len);
1104+ return sysfs_emit(buf, "%#llx\n", len);
10911105 }
10921106
10931107 static struct device_attribute dev_attr_ram_size =
@@ -1100,7 +1114,7 @@ static ssize_t pmem_size_show(struct device *dev, struct device_attribute *attr, · 6 unmodified lines
11001114 struct cxl_mem *cxlm = cxlmd->cxlm;
11011115 unsigned long long len = range_len(&cxlm->pmem_range);
11021116
1103− return sprintf(buf, "%#llx\n", len);
1117+ return sysfs_emit(buf, "%#llx\n", len);
11041118 }
11051119
11061120 static struct device_attribute dev_attr_pmem_size =
@@ -1150,27 +1164,24 @@ static const struct device_type cxl_memdev_type = { · 43 unmodified lines
11501164 .groups = cxl_memdev_attribute_groups,
11511165 };
11521166
1153−static void cxlmdev_unregister(void *_cxlmd)
1167+static void cxl_memdev_shutdown(struct cxl_memdev *cxlmd)
11541168 {
1155− struct cxl_memdev *cxlmd = _cxlmd;
1156− struct device *dev = &cxlmd->dev;
1157−
1158− percpu_ref_kill(&cxlmd->ops_active);
1159− cdev_device_del(&cxlmd->cdev, dev);
1160− wait_for_completion(&cxlmd->ops_dead);
1169+ down_write(&cxl_memdev_rwsem);
11611170 cxlmd->cxlm = NULL;
1162− put_device(dev);
1171+ up_write(&cxl_memdev_rwsem);
11631172 }
11641173
1165−static void cxlmdev_ops_active_release(struct percpu_ref *ref)
1174+static void cxl_memdev_unregister(void *_cxlmd)
11661175 {
1167− struct cxl_memdev *cxlmd =
1168− container_of(ref, typeof(*cxlmd), ops_active);
1176+ struct cxl_memdev *cxlmd = _cxlmd;
1177+ struct device *dev = &cxlmd->dev;
11691178
1170− complete(&cxlmd->ops_dead);
1179+ cdev_device_del(&cxlmd->cdev, dev);
1180+ cxl_memdev_shutdown(cxlmd);
1181+ put_device(dev);
11711182 }
11721183
1173−static int cxl_mem_add_memdev(struct cxl_mem *cxlm)
1184+static struct cxl_memdev *cxl_memdev_alloc(struct cxl_mem *cxlm)
11741185 {
11751186 struct pci_dev *pdev = cxlm->pdev;
11761187 struct cxl_memdev *cxlmd;
@@ -1180,22 +1191,11 @@ static int cxl_mem_add_memdev(struct cxl_mem *cxlm) · 3 unmodified lines
11801191
11811192 cxlmd = kzalloc(sizeof(*cxlmd), GFP_KERNEL);
11821193 if (!cxlmd)
1183− return -ENOMEM;
1184− init_completion(&cxlmd->ops_dead);
1185−
1186− /*
1187− * @cxlm is deallocated when the driver unbinds so operations
1188− * that are using it need to hold a live reference.
1189− */
1190− cxlmd->cxlm = cxlm;
1191− rc = percpu_ref_init(&cxlmd->ops_active, cxlmdev_ops_active_release, 0,
1192− GFP_KERNEL);
1193− if (rc)
1194− goto err_ref;
1194+ return ERR_PTR(-ENOMEM);
11951195
11961196 rc = ida_alloc_range(&cxl_memdev_ida, 0, CXL_MEM_MAX_DEVS, GFP_KERNEL);
11971197 if (rc < 0)
1198− goto err_id;
1198+ goto err;
11991199 cxlmd->id = rc;
12001200
12011201 dev = &cxlmd->dev;
@@ -1204,30 +1204,54 @@ static int cxl_mem_add_memdev(struct cxl_mem *cxlm) · 2 unmodified lines
12041204 dev->bus = &cxl_bus_type;
12051205 dev->devt = MKDEV(cxl_mem_major, cxlmd->id);
12061206 dev->type = &cxl_memdev_type;
1207− dev_set_name(dev, "mem%d", cxlmd->id);
1207+ device_set_pm_not_required(dev);
12081208
12091209 cdev = &cxlmd->cdev;
12101210 cdev_init(cdev, &cxl_memdev_fops);
1211+ return cxlmd;
1212+
1213+err:
1214+ kfree(cxlmd);
1215+ return ERR_PTR(rc);
1216+}
1217+
1218+static int cxl_mem_add_memdev(struct cxl_mem *cxlm)
1219+{
1220+ struct cxl_memdev *cxlmd;
1221+ struct device *dev;
1222+ struct cdev *cdev;
1223+ int rc;
1224+
1225+ cxlmd = cxl_memdev_alloc(cxlm);
1226+ if (IS_ERR(cxlmd))
1227+ return PTR_ERR(cxlmd);
1228+
1229+ dev = &cxlmd->dev;
1230+ rc = dev_set_name(dev, "mem%d", cxlmd->id);
1231+ if (rc)
1232+ goto err;
1233+
1234+ /*
1235+ * Activate ioctl operations, no cxl_memdev_rwsem manipulation
1236+ * needed as this is ordered with cdev_add() publishing the device.
1237+ */
1238+ cxlmd->cxlm = cxlm;
12111239
1240+ cdev = &cxlmd->cdev;
12121241 rc = cdev_device_add(cdev, dev);
12131242 if (rc)
1214− goto err_add;
1243+ goto err;
12151244
1216− return devm_add_action_or_reset(dev->parent, cxlmdev_unregister, cxlmd);
1245+ return devm_add_action_or_reset(dev->parent, cxl_memdev_unregister,
1246+ cxlmd);
12171247
1218−err_add:
1219− ida_free(&cxl_memdev_ida, cxlmd->id);
1220−err_id:
1248+err:
12211249 /*
1222− * Theoretically userspace could have already entered the fops,
1223− * so flush ops_active.
1250+ * The cdev was briefly live, shutdown any ioctl operations that
1251+ * saw that state.
12241252 */
1225− percpu_ref_kill(&cxlmd->ops_active);
1226− wait_for_completion(&cxlmd->ops_dead);
1227− percpu_ref_exit(&cxlmd->ops_active);
1228−err_ref:
1229− kfree(cxlmd);
1230−
1253+ cxl_memdev_shutdown(cxlmd);
1254+ put_device(dev);
12311255 return rc;
12321256 }
12331257
@@ -1396,6 +1420,7 @@ out: · 162 unmodified lines
13961420 */
13971421 static int cxl_mem_identify(struct cxl_mem *cxlm)
13981422 {
1423+ /* See CXL 2.0 Table 175 Identify Memory Device Output Payload */
13991424 struct cxl_mbox_identify {
14001425 char fw_revision[0x10];
14011426 __le64 total_capacity;
@@ -1424,10 +1449,11 @@ static int cxl_mem_identify(struct cxl_mem *cxlm) · 22 unmodified lines
14241449 * For now, only the capacity is exported in sysfs
14251450 */
14261451 cxlm->ram_range.start = 0;
1427− cxlm->ram_range.end = le64_to_cpu(id.volatile_capacity) - 1;
1452+ cxlm->ram_range.end = le64_to_cpu(id.volatile_capacity) * SZ_256M - 1;
14281453
14291454 cxlm->pmem_range.start = 0;
1430− cxlm->pmem_range.end = le64_to_cpu(id.persistent_capacity) - 1;
1455+ cxlm->pmem_range.end =
1456+ le64_to_cpu(id.persistent_capacity) * SZ_256M - 1;
14311457
14321458 memcpy(cxlm->firmware_version, id.fw_revision, sizeof(id.fw_revision));
14331459
drivers/dax/bus.c+2−4
@@ -90,13 +90,11 @@ static ssize_t do_id_store(struct device_driver *drv, const char *buf, · 89 unmodified lines
9090 list_add(&dax_id->list, &dax_drv->ids);
9191 } else
9292 rc = -ENOMEM;
93− } else
94− /* nothing to remove */;
93+ }
9594 } else if (action == ID_REMOVE) {
9695 list_del(&dax_id->list);
9796 kfree(dax_id);
98− } else
99− /* dax_id already added */;
97+ }
10098 mutex_unlock(&dax_bus_lock);
10199
102100 if (rc < 0)
drivers/dma/dmaengine.c+1−0
@@ -1086,6 +1086,7 @@ static int __dma_async_device_channel_register(struct dma_device *device, · 1085 unmodified lines
10861086 kfree(chan->dev);
10871087 err_free_local:
10881088 free_percpu(chan->local);
1089+ chan->local = NULL;
10891090 return rc;
10901091 }
10911092
drivers/dma/dw/Kconfig+2−0
@@ -10,6 +10,7 @@ config DW_DMAC_CORE · 9 unmodified lines
1010
1111 config DW_DMAC
1212 tristate "Synopsys DesignWare AHB DMA platform driver"
13+ depends on HAS_IOMEM
1314 select DW_DMAC_CORE
1415 help
1516 Support the Synopsys DesignWare AHB DMA controller. This
@@ -18,6 +19,7 @@ config DW_DMAC · 2 unmodified lines
1819 config DW_DMAC_PCI
1920 tristate "Synopsys DesignWare AHB DMA PCI driver"
2021 depends on PCI
22+ depends on HAS_IOMEM
2123 select DW_DMAC_CORE
2224 help
2325 Support the Synopsys DesignWare AHB DMA controller on the
drivers/dma/idxd/device.c+54−11
@@ -282,6 +282,22 @@ void idxd_wq_drain(struct idxd_wq *wq) · 281 unmodified lines
282282 idxd_cmd_exec(idxd, IDXD_CMD_DRAIN_WQ, operand, NULL);
283283 }
284284
285+void idxd_wq_reset(struct idxd_wq *wq)
286+{
287+ struct idxd_device *idxd = wq->idxd;
288+ struct device *dev = &idxd->pdev->dev;
289+ u32 operand;
290+
291+ if (wq->state != IDXD_WQ_ENABLED) {
292+ dev_dbg(dev, "WQ %d in wrong state: %d\n", wq->id, wq->state);
293+ return;
294+ }
295+
296+ operand = BIT(wq->id % 16) | ((wq->id / 16) << 16);
297+ idxd_cmd_exec(idxd, IDXD_CMD_RESET_WQ, operand, NULL);
298+ wq->state = IDXD_WQ_DISABLED;
299+}
300+
285301 int idxd_wq_map_portal(struct idxd_wq *wq)
286302 {
287303 struct idxd_device *idxd = wq->idxd;
@@ -363,8 +379,6 @@ int idxd_wq_disable_pasid(struct idxd_wq *wq) · 75 unmodified lines
363379 void idxd_wq_disable_cleanup(struct idxd_wq *wq)
364380 {
365381 struct idxd_device *idxd = wq->idxd;
366− struct device *dev = &idxd->pdev->dev;
367− int i, wq_offset;
368382
369383 lockdep_assert_held(&idxd->dev_lock);
370384 memset(wq->wqcfg, 0, idxd->wqcfg_size);
@@ -376,14 +390,6 @@ void idxd_wq_disable_cleanup(struct idxd_wq *wq) · 5 unmodified lines
376390 wq->ats_dis = 0;
377391 clear_bit(WQ_FLAG_DEDICATED, &wq->flags);
378392 memset(wq->name, 0, WQ_NAME_SIZE);
379−
380− for (i = 0; i < WQCFG_STRIDES(idxd); i++) {
381− wq_offset = WQCFG_OFFSET(idxd, wq->id, i);
382− iowrite32(0, idxd->reg_base + wq_offset);
383− dev_dbg(dev, "WQ[%d][%d][%#x]: %#x\n",
384− wq->id, i, wq_offset,
385− ioread32(idxd->reg_base + wq_offset));
386− }
387393 }
388394
389395 /* Device control bits */
@@ -574,6 +580,36 @@ void idxd_device_drain_pasid(struct idxd_device *idxd, int pasid) · 184 unmodified lines
574580 }
575581
576582 /* Device configuration bits */
583+void idxd_msix_perm_setup(struct idxd_device *idxd)
584+{
585+ union msix_perm mperm;
586+ int i, msixcnt;
587+
588+ msixcnt = pci_msix_vec_count(idxd->pdev);
589+ if (msixcnt < 0)
590+ return;
591+
592+ mperm.bits = 0;
593+ mperm.pasid = idxd->pasid;
594+ mperm.pasid_en = device_pasid_enabled(idxd);
595+ for (i = 1; i < msixcnt; i++)
596+ iowrite32(mperm.bits, idxd->reg_base + idxd->msix_perm_offset + i * 8);
597+}
598+
599+void idxd_msix_perm_clear(struct idxd_device *idxd)
600+{
601+ union msix_perm mperm;
602+ int i, msixcnt;
603+
604+ msixcnt = pci_msix_vec_count(idxd->pdev);
605+ if (msixcnt < 0)
606+ return;
607+
608+ mperm.bits = 0;
609+ for (i = 1; i < msixcnt; i++)
610+ iowrite32(mperm.bits, idxd->reg_base + idxd->msix_perm_offset + i * 8);
611+}
612+
577613 static void idxd_group_config_write(struct idxd_group *group)
578614 {
579615 struct idxd_device *idxd = group->idxd;
@@ -642,7 +678,14 @@ static int idxd_wq_config_write(struct idxd_wq *wq) · 62 unmodified lines
642678 if (!wq->group)
643679 return 0;
644680
645− memset(wq->wqcfg, 0, idxd->wqcfg_size);
681+ /*
682+ * Instead of memset the entire shadow copy of WQCFG, copy from the hardware after
683+ * wq reset. This will copy back the sticky values that are present on some devices.
684+ */
685+ for (i = 0; i < WQCFG_STRIDES(idxd); i++) {
686+ wq_offset = WQCFG_OFFSET(idxd, wq->id, i);
687+ wq->wqcfg->bits[i] = ioread32(idxd->reg_base + wq_offset);
688+ }
646689
647690 /* byte 0-3 */
648691 wq->wqcfg->wq_size = wq->size;
drivers/dma/idxd/idxd.h+3−0
@@ -316,6 +316,8 @@ void idxd_unregister_driver(void); · 315 unmodified lines
316316 struct bus_type *idxd_get_bus_type(struct idxd_device *idxd);
317317
318318 /* device interrupt control */
319+void idxd_msix_perm_setup(struct idxd_device *idxd);
320+void idxd_msix_perm_clear(struct idxd_device *idxd);
319321 irqreturn_t idxd_irq_handler(int vec, void *data);
320322 irqreturn_t idxd_misc_thread(int vec, void *data);
321323 irqreturn_t idxd_wq_thread(int irq, void *data);
@@ -341,6 +343,7 @@ void idxd_wq_free_resources(struct idxd_wq *wq); · 19 unmodified lines
341343 int idxd_wq_enable(struct idxd_wq *wq);
342344 int idxd_wq_disable(struct idxd_wq *wq);
343345 void idxd_wq_drain(struct idxd_wq *wq);
346+void idxd_wq_reset(struct idxd_wq *wq);
344347 int idxd_wq_map_portal(struct idxd_wq *wq);
345348 void idxd_wq_unmap_portal(struct idxd_wq *wq);
346349 void idxd_wq_disable_cleanup(struct idxd_wq *wq);
drivers/dma/idxd/init.c+2−9
@@ -65,7 +65,6 @@ static int idxd_setup_interrupts(struct idxd_device *idxd) · 64 unmodified lines
6565 struct idxd_irq_entry *irq_entry;
6666 int i, msixcnt;
6767 int rc = 0;
68− union msix_perm mperm;
6968
7069 msixcnt = pci_msix_vec_count(pdev);
7170 if (msixcnt < 0) {
@@ -144,14 +143,7 @@ static int idxd_setup_interrupts(struct idxd_device *idxd) · 72 unmodified lines
144143 }
145144
146145 idxd_unmask_error_interrupts(idxd);
147−
148− /* Setup MSIX permission table */
149− mperm.bits = 0;
150− mperm.pasid = idxd->pasid;
151− mperm.pasid_en = device_pasid_enabled(idxd);
152− for (i = 1; i < msixcnt; i++)
153− iowrite32(mperm.bits, idxd->reg_base + idxd->msix_perm_offset + i * 8);
154−
146+ idxd_msix_perm_setup(idxd);
155147 return 0;
156148
157149 err_no_irq:
@@ -510,6 +502,7 @@ static void idxd_shutdown(struct pci_dev *pdev) · 352 unmodified lines
510502 idxd_flush_work_list(irq_entry);
511503 }
512504
505+ idxd_msix_perm_clear(idxd);
513506 destroy_workqueue(idxd->wq);
514507 }
515508
drivers/dma/idxd/irq.c+3−1
@@ -124,7 +124,9 @@ static int process_misc_interrupts(struct idxd_device *idxd, u32 cause) · 123 unmodified lines
124124 for (i = 0; i < 4; i++)
125125 idxd->sw_err.bits[i] = ioread64(idxd->reg_base +
126126 IDXD_SWERR_OFFSET + i * sizeof(u64));
127− iowrite64(IDXD_SWERR_ACK, idxd->reg_base + IDXD_SWERR_OFFSET);
127+
128+ iowrite64(idxd->sw_err.bits[0] & IDXD_SWERR_ACK,
129+ idxd->reg_base + IDXD_SWERR_OFFSET);
128130
129131 if (idxd->sw_err.valid && idxd->sw_err.wq_idx_valid) {
130132 int id = idxd->sw_err.wq_idx;
drivers/dma/idxd/sysfs.c+10−9
@@ -275,7 +275,6 @@ static void disable_wq(struct idxd_wq *wq) · 274 unmodified lines
275275 {
276276 struct idxd_device *idxd = wq->idxd;
277277 struct device *dev = &idxd->pdev->dev;
278− int rc;
279278
280279 mutex_lock(&wq->wq_lock);
281280 dev_dbg(dev, "%s removing WQ %s\n", __func__, dev_name(&wq->conf_dev));
@@ -296,17 +295,13 @@ static void disable_wq(struct idxd_wq *wq) · 14 unmodified lines
296295 idxd_wq_unmap_portal(wq);
297296
298297 idxd_wq_drain(wq);
299− rc = idxd_wq_disable(wq);
298+ idxd_wq_reset(wq);
300299
301300 idxd_wq_free_resources(wq);
302301 wq->client_count = 0;
303302 mutex_unlock(&wq->wq_lock);
304303
305− if (rc < 0)
306− dev_warn(dev, "Failed to disable %s: %d\n",
307− dev_name(&wq->conf_dev), rc);
308− else
309− dev_info(dev, "wq %s disabled\n", dev_name(&wq->conf_dev));
304+ dev_info(dev, "wq %s disabled\n", dev_name(&wq->conf_dev));
310305 }
311306
312307 static int idxd_config_bus_remove(struct device *dev)
@@ -989,7 +984,7 @@ static ssize_t wq_size_store(struct device *dev, · 676 unmodified lines
989984 if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
990985 return -EPERM;
991986
992− if (wq->state != IDXD_WQ_DISABLED)
987+ if (idxd->state == IDXD_DEV_ENABLED)
993988 return -EPERM;
994989
995990 if (size + total_claimed_wq_size(idxd) - wq->size > idxd->max_wq_size)
@@ -1449,8 +1444,14 @@ static ssize_t op_cap_show(struct device *dev, · 453 unmodified lines
14491444 {
14501445 struct idxd_device *idxd =
14511446 container_of(dev, struct idxd_device, conf_dev);
1447+ int i, rc = 0;
1448+
1449+ for (i = 0; i < 4; i++)
1450+ rc += sysfs_emit_at(buf, rc, "%#llx ", idxd->hw.opcap.bits[i]);
14521451
1453− return sprintf(buf, "%#llx\n", idxd->hw.opcap.bits[0]);
1452+ rc--;
1453+ rc += sysfs_emit_at(buf, rc, "\n");
1454+ return rc;
14541455 }
14551456 static DEVICE_ATTR_RO(op_cap);
14561457
drivers/dma/plx_dma.c+11−7
@@ -507,10 +507,8 @@ static int plx_dma_create(struct pci_dev *pdev) · 506 unmodified lines
507507
508508 rc = request_irq(pci_irq_vector(pdev, 0), plx_dma_isr, 0,
509509 KBUILD_MODNAME, plxdev);
510− if (rc) {
511− kfree(plxdev);
512− return rc;
513− }
510+ if (rc)
511+ goto free_plx;
514512
515513 spin_lock_init(&plxdev->ring_lock);
516514 tasklet_setup(&plxdev->desc_task, plx_dma_desc_task);
@@ -540,14 +538,20 @@ static int plx_dma_create(struct pci_dev *pdev) · 23 unmodified lines
540538 rc = dma_async_device_register(dma);
541539 if (rc) {
542540 pci_err(pdev, "Failed to register dma device: %d\n", rc);
543− free_irq(pci_irq_vector(pdev, 0), plxdev);
544− kfree(plxdev);
545− return rc;
541+ goto put_device;
546542 }
547543
548544 pci_set_drvdata(pdev, plxdev);
549545
550546 return 0;
547+
548+put_device:
549+ put_device(&pdev->dev);
550+ free_irq(pci_irq_vector(pdev, 0), plxdev);
551+free_plx:
552+ kfree(plxdev);
553+
554+ return rc;
551555 }
552556
553557 static int plx_dma_probe(struct pci_dev *pdev,
drivers/dma/tegra20-apb-dma.c+2−2
@@ -723,7 +723,7 @@ static void tegra_dma_issue_pending(struct dma_chan *dc) · 722 unmodified lines
723723 goto end;
724724 }
725725 if (!tdc->busy) {
726− err = pm_runtime_get_sync(tdc->tdma->dev);
726+ err = pm_runtime_resume_and_get(tdc->tdma->dev);
727727 if (err < 0) {
728728 dev_err(tdc2dev(tdc), "Failed to enable DMA\n");
729729 goto end;
@@ -818,7 +818,7 @@ static void tegra_dma_synchronize(struct dma_chan *dc) · 88 unmodified lines
818818 struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc);
819819 int err;
820820
821− err = pm_runtime_get_sync(tdc->tdma->dev);
821+ err = pm_runtime_resume_and_get(tdc->tdma->dev);
822822 if (err < 0) {
823823 dev_err(tdc2dev(tdc), "Failed to synchronize DMA: %d\n", err);
824824 return;
drivers/dma/xilinx/xilinx_dpdma.c+19−12
@@ -839,6 +839,7 @@ static void xilinx_dpdma_chan_queue_transfer(struct xilinx_dpdma_chan *chan) · 838 unmodified lines
839839 struct xilinx_dpdma_tx_desc *desc;
840840 struct virt_dma_desc *vdesc;
841841 u32 reg, channels;
842+ bool first_frame;
842843
843844 lockdep_assert_held(&chan->lock);
844845
@@ -852,14 +853,6 @@ static void xilinx_dpdma_chan_queue_transfer(struct xilinx_dpdma_chan *chan) · 7 unmodified lines
852853 chan->running = true;
853854 }
854855
855− if (chan->video_group)
856− channels = xilinx_dpdma_chan_video_group_ready(chan);
857− else
858− channels = BIT(chan->id);
859−
860− if (!channels)
861− return;
862−
863856 vdesc = vchan_next_desc(&chan->vchan);
864857 if (!vdesc)
865858 return;
@@ -884,13 +877,26 @@ static void xilinx_dpdma_chan_queue_transfer(struct xilinx_dpdma_chan *chan) · 18 unmodified lines
884877 FIELD_PREP(XILINX_DPDMA_CH_DESC_START_ADDRE_MASK,
885878 upper_32_bits(sw_desc->dma_addr)));
886879
887− if (chan->first_frame)
880+ first_frame = chan->first_frame;
881+ chan->first_frame = false;
882+
883+ if (chan->video_group) {
884+ channels = xilinx_dpdma_chan_video_group_ready(chan);
885+ /*
886+ * Trigger the transfer only when all channels in the group are
887+ * ready.
888+ */
889+ if (!channels)
890+ return;
891+ } else {
892+ channels = BIT(chan->id);
893+ }
894+
895+ if (first_frame)
888896 reg = XILINX_DPDMA_GBL_TRIG_MASK(channels);
889897 else
890898 reg = XILINX_DPDMA_GBL_RETRIG_MASK(channels);
891899
892− chan->first_frame = false;
893−
894900 dpdma_write(xdev->reg, XILINX_DPDMA_GBL, reg);
895901 }
896902
@@ -1042,13 +1048,14 @@ static int xilinx_dpdma_chan_stop(struct xilinx_dpdma_chan *chan) · 145 unmodified lines
10421048 */
10431049 static void xilinx_dpdma_chan_done_irq(struct xilinx_dpdma_chan *chan)
10441050 {
1045− struct xilinx_dpdma_tx_desc *active = chan->desc.active;
1051+ struct xilinx_dpdma_tx_desc *active;
10461052 unsigned long flags;
10471053
10481054 spin_lock_irqsave(&chan->lock, flags);
10491055
10501056 xilinx_dpdma_debugfs_desc_done_irq(chan);
10511057
1058+ active = chan->desc.active;
10521059 if (active)
10531060 vchan_cyclic_callback(&active->vdesc);
10541061 else
drivers/extcon/extcon.c+1−0
@@ -1241,6 +1241,7 @@ int extcon_dev_register(struct extcon_dev *edev) · 1240 unmodified lines
12411241 sizeof(*edev->nh), GFP_KERNEL);
12421242 if (!edev->nh) {
12431243 ret = -ENOMEM;
1244+ device_unregister(&edev->dev);
12441245 goto err_dev;
12451246 }
12461247
drivers/firewire/nosy.c+7−2
@@ -346,6 +346,7 @@ nosy_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · 345 unmodified lines
346346 struct client *client = file->private_data;
347347 spinlock_t *client_list_lock = &client->lynx->client_list_lock;
348348 struct nosy_stats stats;
349+ int ret;
349350
350351 switch (cmd) {
351352 case NOSY_IOC_GET_STATS:
@@ -360,11 +361,15 @@ nosy_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · 8 unmodified lines
360361 return 0;
361362
362363 case NOSY_IOC_START:
364+ ret = -EBUSY;
363365 spin_lock_irq(client_list_lock);
364− list_add_tail(&client->link, &client->lynx->client_list);
366+ if (list_empty(&client->link)) {
367+ list_add_tail(&client->link, &client->lynx->client_list);
368+ ret = 0;
369+ }
365370 spin_unlock_irq(client_list_lock);
366371
367− return 0;
372+ return ret;
368373
369374 case NOSY_IOC_STOP:
370375 spin_lock_irq(client_list_lock);
drivers/firmware/efi/efi.c+2−1
@@ -927,7 +927,7 @@ int __ref efi_mem_reserve_persistent(phys_addr_t addr, u64 size) · 926 unmodified lines
927927 }
928928
929929 /* first try to find a slot in an existing linked list entry */
930− for (prsv = efi_memreserve_root->next; prsv; prsv = rsv->next) {
930+ for (prsv = efi_memreserve_root->next; prsv; ) {
931931 rsv = memremap(prsv, sizeof(*rsv), MEMREMAP_WB);
932932 index = atomic_fetch_add_unless(&rsv->count, 1, rsv->size);
933933 if (index < rsv->size) {
@@ -937,6 +937,7 @@ int __ref efi_mem_reserve_persistent(phys_addr_t addr, u64 size) · 3 unmodified lines
937937 memunmap(rsv);
938938 return efi_mem_reserve_iomem(addr, size);
939939 }
940+ prsv = rsv->next;
940941 memunmap(rsv);
941942 }
942943
drivers/firmware/efi/libstub/arm64-stub.c+1−1
@@ -24,7 +24,7 @@ efi_status_t check_platform_features(void) · 23 unmodified lines
2424 return EFI_SUCCESS;
2525
2626 tg = (read_cpuid(ID_AA64MMFR0_EL1) >> ID_AA64MMFR0_TGRAN_SHIFT) & 0xf;
27− if (tg != ID_AA64MMFR0_TGRAN_SUPPORTED) {
27+ if (tg < ID_AA64MMFR0_TGRAN_SUPPORTED_MIN || tg > ID_AA64MMFR0_TGRAN_SUPPORTED_MAX) {
2828 if (IS_ENABLED(CONFIG_ARM64_64K_PAGES))
2929 efi_err("This 64 KB granular kernel is not supported by your CPU\n");
3030 else
drivers/firmware/efi/libstub/efi-stub.c+16−0
@@ -96,6 +96,18 @@ static void install_memreserve_table(void) · 95 unmodified lines
9696 efi_err("Failed to install memreserve config table!\n");
9797 }
9898
99+static u32 get_supported_rt_services(void)
100+{
101+ const efi_rt_properties_table_t *rt_prop_table;
102+ u32 supported = EFI_RT_SUPPORTED_ALL;
103+
104+ rt_prop_table = get_efi_config_table(EFI_RT_PROPERTIES_TABLE_GUID);
105+ if (rt_prop_table)
106+ supported &= rt_prop_table->runtime_services_supported;
107+
108+ return supported;
109+}
110+
99111 /*
100112 * EFI entry point for the arm/arm64 EFI stubs. This is the entrypoint
101113 * that is described in the PE/COFF header. Most of the code is the same
@@ -250,6 +262,10 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, · 148 unmodified lines
250262 (prop_tbl->memory_protection_attribute &
251263 EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA);
252264
265+ /* force efi_novamap if SetVirtualAddressMap() is unsupported */
266+ efi_novamap |= !(get_supported_rt_services() &
267+ EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP);
268+
253269 /* hibernation expects the runtime regions to stay in the same place */
254270 if (!IS_ENABLED(CONFIG_HIBERNATION) && !efi_nokaslr && !flat_va_mapping) {
255271 /*
drivers/firmware/efi/vars.c+4−0
@@ -484,6 +484,10 @@ int efivar_init(int (*func)(efi_char16_t *, efi_guid_t, unsigned long, void *), · 483 unmodified lines
484484 }
485485 }
486486
487+ break;
488+ case EFI_UNSUPPORTED:
489+ err = -EOPNOTSUPP;
490+ status = EFI_NOT_FOUND;
487491 break;
488492 case EFI_NOT_FOUND:
489493 break;
drivers/firmware/turris-mox-rwtm.c+2−2
@@ -2,7 +2,7 @@ · 1 unmodified line
22 /*
33 * Turris Mox rWTM firmware driver
44 *
5− * Copyright (C) 2019 Marek Behun <marek.behun@nic.cz>
5+ * Copyright (C) 2019 Marek Behún <kabel@kernel.org>
66 */
77
88 #include <linux/armada-37xx-rwtm-mailbox.h>
@@ -547,4 +547,4 @@ module_platform_driver(turris_mox_rwtm_driver); · 538 unmodified lines
547547
548548 MODULE_LICENSE("GPL v2");
549549 MODULE_DESCRIPTION("Turris Mox rWTM firmware driver");
550−MODULE_AUTHOR("Marek Behun <marek.behun@nic.cz>");
550+MODULE_AUTHOR("Marek Behun <kabel@kernel.org>");
drivers/gpio/gpio-moxtet.c+2−2
@@ -2,7 +2,7 @@ · 1 unmodified line
22 /*
33 * Turris Mox Moxtet GPIO expander
44 *
5− * Copyright (C) 2018 Marek Behun <marek.behun@nic.cz>
5+ * Copyright (C) 2018 Marek Behún <kabel@kernel.org>
66 */
77
88 #include <linux/bitops.h>
@@ -174,6 +174,6 @@ static struct moxtet_driver moxtet_gpio_driver = { · 165 unmodified lines
174174 };
175175 module_moxtet_driver(moxtet_gpio_driver);
176176
177−MODULE_AUTHOR("Marek Behun <marek.behun@nic.cz>");
177+MODULE_AUTHOR("Marek Behun <kabel@kernel.org>");
178178 MODULE_DESCRIPTION("Turris Mox Moxtet GPIO expander");
179179 MODULE_LICENSE("GPL v2");
drivers/gpio/gpio-pca953x.c+23−55
@@ -113,8 +113,29 @@ MODULE_DEVICE_TABLE(i2c, pca953x_id); · 112 unmodified lines
113113 #ifdef CONFIG_GPIO_PCA953X_IRQ
114114
115115 #include <linux/dmi.h>
116−#include <linux/gpio.h>
117−#include <linux/list.h>
116+
117+static const struct acpi_gpio_params pca953x_irq_gpios = { 0, 0, true };
118+
119+static const struct acpi_gpio_mapping pca953x_acpi_irq_gpios[] = {
120+ { "irq-gpios", &pca953x_irq_gpios, 1, ACPI_GPIO_QUIRK_ABSOLUTE_NUMBER },
121+ { }
122+};
123+
124+static int pca953x_acpi_get_irq(struct device *dev)
125+{
126+ int ret;
127+
128+ ret = devm_acpi_dev_add_driver_gpios(dev, pca953x_acpi_irq_gpios);
129+ if (ret)
130+ dev_warn(dev, "can't add GPIO ACPI mapping\n");
131+
132+ ret = acpi_dev_gpio_irq_get_by(ACPI_COMPANION(dev), "irq-gpios", 0);
133+ if (ret < 0)
134+ return ret;
135+
136+ dev_info(dev, "ACPI interrupt quirk (IRQ %d)\n", ret);
137+ return ret;
138+}
118139
119140 static const struct dmi_system_id pca953x_dmi_acpi_irq_info[] = {
120141 {
@@ -133,59 +154,6 @@ static const struct dmi_system_id pca953x_dmi_acpi_irq_info[] = { · 12 unmodified lines
133154 },
134155 {}
135156 };
136−
137−#ifdef CONFIG_ACPI
138−static int pca953x_acpi_get_pin(struct acpi_resource *ares, void *data)
139−{
140− struct acpi_resource_gpio *agpio;
141− int *pin = data;
142−
143− if (acpi_gpio_get_irq_resource(ares, &agpio))
144− *pin = agpio->pin_table[0];
145− return 1;
146−}
147−
148−static int pca953x_acpi_find_pin(struct device *dev)
149−{
150− struct acpi_device *adev = ACPI_COMPANION(dev);
151− int pin = -ENOENT, ret;
152− LIST_HEAD(r);
153−
154− ret = acpi_dev_get_resources(adev, &r, pca953x_acpi_get_pin, &pin);
155− acpi_dev_free_resource_list(&r);
156− if (ret < 0)
157− return ret;
158−
159− return pin;
160−}
161−#else
162−static inline int pca953x_acpi_find_pin(struct device *dev) { return -ENXIO; }
163−#endif
164−
165−static int pca953x_acpi_get_irq(struct device *dev)
166−{
167− int pin, ret;
168−
169− pin = pca953x_acpi_find_pin(dev);
170− if (pin < 0)
171− return pin;
172−
173− dev_info(dev, "Applying ACPI interrupt quirk (GPIO %d)\n", pin);
174−
175− if (!gpio_is_valid(pin))
176− return -EINVAL;
177−
178− ret = gpio_request(pin, "pca953x interrupt");
179− if (ret)
180− return ret;
181−
182− ret = gpio_to_irq(pin);
183−
184− /* When pin is used as an IRQ, no need to keep it requested */
185− gpio_free(pin);
186−
187− return ret;
188−}
189157 #endif
190158
191159 static const struct acpi_device_id pca953x_acpi_ids[] = {
drivers/gpio/gpiolib-acpi.c+15−6
@@ -174,7 +174,7 @@ static void acpi_gpiochip_request_irq(struct acpi_gpio_chip *acpi_gpio, · 173 unmodified lines
174174 int ret, value;
175175
176176 ret = request_threaded_irq(event->irq, NULL, event->handler,
177− event->irqflags, "ACPI:Event", event);
177+ event->irqflags | IRQF_ONESHOT, "ACPI:Event", event);
178178 if (ret) {
179179 dev_err(acpi_gpio->chip->parent,
180180 "Failed to setup interrupt handler for %d\n",
@@ -677,6 +677,7 @@ static int acpi_populate_gpio_lookup(struct acpi_resource *ares, void *data) · 496 unmodified lines
677677 if (!lookup->desc) {
678678 const struct acpi_resource_gpio *agpio = &ares->data.gpio;
679679 bool gpioint = agpio->connection_type == ACPI_RESOURCE_GPIO_TYPE_INT;
680+ struct gpio_desc *desc;
680681 u16 pin_index;
681682
682683 if (lookup->info.quirks & ACPI_GPIO_QUIRK_ONLY_GPIOIO && gpioint)
@@ -689,8 +690,12 @@ static int acpi_populate_gpio_lookup(struct acpi_resource *ares, void *data) · 6 unmodified lines
689690 if (pin_index >= agpio->pin_table_length)
690691 return 1;
691692
692− lookup->desc = acpi_get_gpiod(agpio->resource_source.string_ptr,
693+ if (lookup->info.quirks & ACPI_GPIO_QUIRK_ABSOLUTE_NUMBER)
694+ desc = gpio_to_desc(agpio->pin_table[pin_index]);
695+ else
696+ desc = acpi_get_gpiod(agpio->resource_source.string_ptr,
693697 agpio->pin_table[pin_index]);
698+ lookup->desc = desc;
694699 lookup->info.pin_config = agpio->pin_config;
695700 lookup->info.debounce = agpio->debounce_timeout;
696701 lookup->info.gpioint = gpioint;
@@ -940,8 +945,9 @@ struct gpio_desc *acpi_node_get_gpiod(struct fwnode_handle *fwnode, · 243 unmodified lines
940945 }
941946
942947 /**
943− * acpi_dev_gpio_irq_get() - Find GpioInt and translate it to Linux IRQ number
948+ * acpi_dev_gpio_irq_get_by() - Find GpioInt and translate it to Linux IRQ number
944949 * @adev: pointer to a ACPI device to get IRQ from
950+ * @name: optional name of GpioInt resource
945951 * @index: index of GpioInt resource (starting from %0)
946952 *
947953 * If the device has one or more GpioInt resources, this function can be
@@ -951,9 +957,12 @@ struct gpio_desc *acpi_node_get_gpiod(struct fwnode_handle *fwnode, · 3 unmodified lines
951957 * The function is idempotent, though each time it runs it will configure GPIO
952958 * pin direction according to the flags in GpioInt resource.
953959 *
960+ * The function takes optional @name parameter. If the resource has a property
961+ * name, then only those will be taken into account.
962+ *
954963 * Return: Linux IRQ number (> %0) on success, negative errno on failure.
955964 */
956−int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index)
965+int acpi_dev_gpio_irq_get_by(struct acpi_device *adev, const char *name, int index)
957966 {
958967 int idx, i;
959968 unsigned int irq_flags;
@@ -963,7 +972,7 @@ int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index) · 3 unmodified lines
963972 struct acpi_gpio_info info;
964973 struct gpio_desc *desc;
965974
966− desc = acpi_get_gpiod_by_index(adev, NULL, i, &info);
975+ desc = acpi_get_gpiod_by_index(adev, name, i, &info);
967976
968977 /* Ignore -EPROBE_DEFER, it only matters if idx matches */
969978 if (IS_ERR(desc) && PTR_ERR(desc) != -EPROBE_DEFER)
@@ -1008,7 +1017,7 @@ int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index) · 38 unmodified lines
10081017 }
10091018 return -ENOENT;
10101019 }
1011−EXPORT_SYMBOL_GPL(acpi_dev_gpio_irq_get);
1020+EXPORT_SYMBOL_GPL(acpi_dev_gpio_irq_get_by);
10121021
10131022 static acpi_status
10141023 acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address,
drivers/gpio/gpiolib-sysfs.c+8−0
@@ -458,6 +458,8 @@ static ssize_t export_store(struct class *class, · 457 unmodified lines
458458 long gpio;
459459 struct gpio_desc *desc;
460460 int status;
461+ struct gpio_chip *gc;
462+ int offset;
461463
462464 status = kstrtol(buf, 0, &gpio);
463465 if (status < 0)
@@ -469,6 +471,12 @@ static ssize_t export_store(struct class *class, · 5 unmodified lines
469471 pr_warn("%s: invalid GPIO %ld\n", __func__, gpio);
470472 return -EINVAL;
471473 }
474+ gc = desc->gdev->chip;
475+ offset = gpio_chip_hwgpio(desc);
476+ if (!gpiochip_line_is_valid(gc, offset)) {
477+ pr_warn("%s: GPIO %ld masked\n", __func__, gpio);
478+ return -EINVAL;
479+ }
472480
473481 /* No extra locking here; FLAG_SYSFS just signifies that the
474482 * request and export were done by on behalf of userspace, so
drivers/gpio/gpiolib.c+18−11
@@ -367,22 +367,18 @@ static int gpiochip_set_desc_names(struct gpio_chip *gc) · 366 unmodified lines
367367 *
368368 * Looks for device property "gpio-line-names" and if it exists assigns
369369 * GPIO line names for the chip. The memory allocated for the assigned
370− * names belong to the underlying software node and should not be released
370+ * names belong to the underlying firmware node and should not be released
371371 * by the caller.
372372 */
373373 static int devprop_gpiochip_set_names(struct gpio_chip *chip)
374374 {
375375 struct gpio_device *gdev = chip->gpiodev;
376− struct device *dev = chip->parent;
376+ struct fwnode_handle *fwnode = dev_fwnode(&gdev->dev);
377377 const char **names;
378378 int ret, i;
379379 int count;
380380
381− /* GPIO chip may not have a parent device whose properties we inspect. */
382− if (!dev)
383− return 0;
384−
385− count = device_property_string_array_count(dev, "gpio-line-names");
381+ count = fwnode_property_string_array_count(fwnode, "gpio-line-names");
386382 if (count < 0)
387383 return 0;
388384
@@ -396,7 +392,7 @@ static int devprop_gpiochip_set_names(struct gpio_chip *chip) · 7 unmodified lines
396392 if (!names)
397393 return -ENOMEM;
398394
399− ret = device_property_read_string_array(dev, "gpio-line-names",
395+ ret = fwnode_property_read_string_array(fwnode, "gpio-line-names",
400396 names, count);
401397 if (ret < 0) {
402398 dev_warn(&gdev->dev, "failed to read GPIO line names\n");
@@ -474,9 +470,13 @@ EXPORT_SYMBOL_GPL(gpiochip_line_is_valid); · 71 unmodified lines
474470
475471 static void gpiodevice_release(struct device *dev)
476472 {
477− struct gpio_device *gdev = dev_get_drvdata(dev);
473+ struct gpio_device *gdev = container_of(dev, struct gpio_device, dev);
474+ unsigned long flags;
478475
476+ spin_lock_irqsave(&gpio_lock, flags);
479477 list_del(&gdev->list);
478+ spin_unlock_irqrestore(&gpio_lock, flags);
479+
480480 ida_free(&gpio_ida, gdev->id);
481481 kfree_const(gdev->label);
482482 kfree(gdev->descs);
@@ -571,6 +571,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, · 88 unmodified lines
571571 struct lock_class_key *lock_key,
572572 struct lock_class_key *request_key)
573573 {
574+ struct fwnode_handle *fwnode = gc->parent ? dev_fwnode(gc->parent) : NULL;
574575 unsigned long flags;
575576 int ret = 0;
576577 unsigned i;
@@ -594,6 +595,12 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, · 17 unmodified lines
594595
595596 of_gpio_dev_init(gc, gdev);
596597
598+ /*
599+ * Assign fwnode depending on the result of the previous calls,
600+ * if none of them succeed, assign it to the parent's one.
601+ */
602+ gdev->dev.fwnode = dev_fwnode(&gdev->dev) ?: fwnode;
603+
597604 gdev->id = ida_alloc(&gpio_ida, GFP_KERNEL);
598605 if (gdev->id < 0) {
599606 ret = gdev->id;
@@ -605,7 +612,6 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, · 5 unmodified lines
605612 goto err_free_ida;
606613
607614 device_initialize(&gdev->dev);
608− dev_set_drvdata(&gdev->dev, gdev);
609615 if (gc->parent && gc->parent->driver)
610616 gdev->owner = gc->parent->driver->owner;
611617 else if (gc->owner)
@@ -4257,7 +4263,8 @@ static int __init gpiolib_dev_init(void) · 3645 unmodified lines
42574263 return ret;
42584264 }
42594265
4260− if (driver_register(&gpio_stub_drv) < 0) {
4266+ ret = driver_register(&gpio_stub_drv);
4267+ if (ret < 0) {
42614268 pr_err("gpiolib: could not register GPIO stub driver\n");
42624269 bus_unregister(&gpio_bus_type);
42634270 return ret;
drivers/gpu/drm/Kconfig+1−0
@@ -228,6 +228,7 @@ source "drivers/gpu/drm/arm/Kconfig" · 227 unmodified lines
228228 config DRM_RADEON
229229 tristate "ATI Radeon"
230230 depends on DRM && PCI && MMU
231+ depends on AGP || !AGP
231232 select FW_LOADER
232233 select DRM_KMS_HELPER
233234 select DRM_TTM
drivers/gpu/drm/amd/amdgpu/amdgpu.h+4−7
@@ -180,6 +180,7 @@ extern uint amdgpu_smu_memory_pool_size; · 179 unmodified lines
180180 extern uint amdgpu_dc_feature_mask;
181181 extern uint amdgpu_dc_debug_mask;
182182 extern uint amdgpu_dm_abm_level;
183+extern int amdgpu_backlight;
183184 extern struct amdgpu_mgpu_info mgpu_info;
184185 extern int amdgpu_ras_enable;
185186 extern uint amdgpu_ras_mask;
@@ -1006,13 +1007,9 @@ struct amdgpu_device { · 820 unmodified lines
10061007
10071008 /* s3/s4 mask */
10081009 bool in_suspend;
1009− bool in_hibernate;
1010−
1011− /*
1012− * The combination flag in_poweroff_reboot_com used to identify the poweroff
1013− * and reboot opt in the s0i3 system-wide suspend.
1014− */
1015− bool in_poweroff_reboot_com;
1010+ bool in_s3;
1011+ bool in_s4;
1012+ bool in_s0ix;
10161013
10171014 atomic_t in_gpu_reset;
10181015 enum pp_mp1_state mp1_state;
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c+1−1
@@ -903,7 +903,7 @@ void amdgpu_acpi_fini(struct amdgpu_device *adev) · 902 unmodified lines
903903 */
904904 bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev)
905905 {
906−#if defined(CONFIG_AMD_PMC)
906+#if defined(CONFIG_AMD_PMC) || defined(CONFIG_AMD_PMC_MODULE)
907907 if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
908908 if (adev->flags & AMD_IS_APU)
909909 return true;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c+34−98
@@ -2371,6 +2371,10 @@ static int amdgpu_device_set_cg_state(struct amdgpu_device *adev, · 2370 unmodified lines
23712371 i = state == AMD_CG_STATE_GATE ? j : adev->num_ip_blocks - j - 1;
23722372 if (!adev->ip_blocks[i].status.late_initialized)
23732373 continue;
2374+ /* skip CG for GFX on S0ix */
2375+ if (adev->in_s0ix &&
2376+ adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX)
2377+ continue;
23742378 /* skip CG for VCE/UVD, it's handled specially */
23752379 if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
23762380 adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE &&
@@ -2402,6 +2406,10 @@ static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power · 25 unmodified lines
24022406 i = state == AMD_PG_STATE_GATE ? j : adev->num_ip_blocks - j - 1;
24032407 if (!adev->ip_blocks[i].status.late_initialized)
24042408 continue;
2409+ /* skip PG for GFX on S0ix */
2410+ if (adev->in_s0ix &&
2411+ adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX)
2412+ continue;
24052413 /* skip CG for VCE/UVD, it's handled specially */
24062414 if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
24072415 adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE &&
@@ -2678,11 +2686,8 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev) · 270 unmodified lines
26782686 {
26792687 int i, r;
26802688
2681− if (adev->in_poweroff_reboot_com ||
2682− !amdgpu_acpi_is_s0ix_supported(adev) || amdgpu_in_reset(adev)) {
2683− amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
2684− amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
2685− }
2689+ amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
2690+ amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
26862691
26872692 for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
26882693 if (!adev->ip_blocks[i].status.valid)
@@ -2722,6 +2727,9 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev) · 33 unmodified lines
27222727 {
27232728 int i, r;
27242729
2730+ if (adev->in_s0ix)
2731+ amdgpu_gfx_state_change_set(adev, sGpuChangeState_D3Entry);
2732+
27252733 for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
27262734 if (!adev->ip_blocks[i].status.valid)
27272735 continue;
@@ -2734,6 +2742,17 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev) · 6 unmodified lines
27342742 adev->ip_blocks[i].status.hw = false;
27352743 continue;
27362744 }
2745+
2746+ /* skip suspend of gfx and psp for S0ix
2747+ * gfx is in gfxoff state, so on resume it will exit gfxoff just
2748+ * like at runtime. PSP is also part of the always on hardware
2749+ * so no need to suspend it.
2750+ */
2751+ if (adev->in_s0ix &&
2752+ (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP ||
2753+ adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX))
2754+ continue;
2755+
27372756 /* XXX handle errors */
27382757 r = adev->ip_blocks[i].version->funcs->suspend(adev);
27392758 /* XXX handle errors */
@@ -3673,14 +3692,9 @@ void amdgpu_device_fini(struct amdgpu_device *adev) · 933 unmodified lines
36733692 */
36743693 int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
36753694 {
3676− struct amdgpu_device *adev;
3677− struct drm_crtc *crtc;
3678− struct drm_connector *connector;
3679− struct drm_connector_list_iter iter;
3695+ struct amdgpu_device *adev = drm_to_adev(dev);
36803696 int r;
36813697
3682− adev = drm_to_adev(dev);
3683−
36843698 if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
36853699 return 0;
36863700
@@ -3692,61 +3706,19 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon) · 5 unmodified lines
36923706
36933707 cancel_delayed_work_sync(&adev->delayed_init_work);
36943708
3695− if (!amdgpu_device_has_dc_support(adev)) {
3696− /* turn off display hw */
3697− drm_modeset_lock_all(dev);
3698− drm_connector_list_iter_begin(dev, &iter);
3699− drm_for_each_connector_iter(connector, &iter)
3700− drm_helper_connector_dpms(connector,
3701− DRM_MODE_DPMS_OFF);
3702− drm_connector_list_iter_end(&iter);
3703− drm_modeset_unlock_all(dev);
3704− /* unpin the front buffers and cursors */
3705− list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
3706− struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
3707− struct drm_framebuffer *fb = crtc->primary->fb;
3708− struct amdgpu_bo *robj;
3709−
3710− if (amdgpu_crtc->cursor_bo && !adev->enable_virtual_display) {
3711− struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
3712− r = amdgpu_bo_reserve(aobj, true);
3713− if (r == 0) {
3714− amdgpu_bo_unpin(aobj);
3715− amdgpu_bo_unreserve(aobj);
3716− }
3717− }
3718−
3719− if (fb == NULL || fb->obj[0] == NULL) {
3720− continue;
3721− }
3722− robj = gem_to_amdgpu_bo(fb->obj[0]);
3723− /* don't unpin kernel fb objects */
3724− if (!amdgpu_fbdev_robj_is_fb(adev, robj)) {
3725− r = amdgpu_bo_reserve(robj, true);
3726− if (r == 0) {
3727− amdgpu_bo_unpin(robj);
3728− amdgpu_bo_unreserve(robj);
3729− }
3730− }
3731− }
3732− }
3733−
37343709 amdgpu_ras_suspend(adev);
37353710
37363711 r = amdgpu_device_ip_suspend_phase1(adev);
37373712
3738− amdgpu_amdkfd_suspend(adev, adev->in_runpm);
3713+ if (!adev->in_s0ix)
3714+ amdgpu_amdkfd_suspend(adev, adev->in_runpm);
37393715
37403716 /* evict vram memory */
37413717 amdgpu_bo_evict_vram(adev);
37423718
37433719 amdgpu_fence_driver_suspend(adev);
37443720
3745− if (adev->in_poweroff_reboot_com ||
3746− !amdgpu_acpi_is_s0ix_supported(adev) || amdgpu_in_reset(adev))
3747− r = amdgpu_device_ip_suspend_phase2(adev);
3748− else
3749− amdgpu_gfx_state_change_set(adev, sGpuChangeState_D3Entry);
3721+ r = amdgpu_device_ip_suspend_phase2(adev);
37503722 /* evict remaining vram memory
37513723 * This second call to evict vram is to evict the gart page table
37523724 * using the CPU.
@@ -3768,16 +3740,13 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon) · 15 unmodified lines
37683740 */
37693741 int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
37703742 {
3771− struct drm_connector *connector;
3772− struct drm_connector_list_iter iter;
37733743 struct amdgpu_device *adev = drm_to_adev(dev);
3774− struct drm_crtc *crtc;
37753744 int r = 0;
37763745
37773746 if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
37783747 return 0;
37793748
3780− if (amdgpu_acpi_is_s0ix_supported(adev))
3749+ if (adev->in_s0ix)
37813750 amdgpu_gfx_state_change_set(adev, sGpuChangeState_D0Entry);
37823751
37833752 /* post card */
@@ -3802,50 +3771,17 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon) · 18 unmodified lines
38023771 queue_delayed_work(system_wq, &adev->delayed_init_work,
38033772 msecs_to_jiffies(AMDGPU_RESUME_MS));
38043773
3805− if (!amdgpu_device_has_dc_support(adev)) {
3806− /* pin cursors */
3807− list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
3808− struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
3809−
3810− if (amdgpu_crtc->cursor_bo && !adev->enable_virtual_display) {
3811− struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
3812− r = amdgpu_bo_reserve(aobj, true);
3813− if (r == 0) {
3814− r = amdgpu_bo_pin(aobj, AMDGPU_GEM_DOMAIN_VRAM);
3815− if (r != 0)
3816− dev_err(adev->dev, "Failed to pin cursor BO (%d)\n", r);
3817− amdgpu_crtc->cursor_addr = amdgpu_bo_gpu_offset(aobj);
3818− amdgpu_bo_unreserve(aobj);
3819− }
3820− }
3821− }
3774+ if (!adev->in_s0ix) {
3775+ r = amdgpu_amdkfd_resume(adev, adev->in_runpm);
3776+ if (r)
3777+ return r;
38223778 }
3823− r = amdgpu_amdkfd_resume(adev, adev->in_runpm);
3824− if (r)
3825− return r;
38263779
38273780 /* Make sure IB tests flushed */
38283781 flush_delayed_work(&adev->delayed_init_work);
38293782
3830− /* blat the mode back in */
3831− if (fbcon) {
3832− if (!amdgpu_device_has_dc_support(adev)) {
3833− /* pre DCE11 */
3834− drm_helper_resume_force_mode(dev);
3835−
3836− /* turn on display hw */
3837− drm_modeset_lock_all(dev);
3838−
3839− drm_connector_list_iter_begin(dev, &iter);
3840− drm_for_each_connector_iter(connector, &iter)
3841− drm_helper_connector_dpms(connector,
3842− DRM_MODE_DPMS_ON);
3843− drm_connector_list_iter_end(&iter);
3844−
3845− drm_modeset_unlock_all(dev);
3846− }
3783+ if (fbcon)
38473784 amdgpu_fbdev_set_suspend(adev, 0);
3848− }
38493785
38503786 drm_kms_helper_poll_enable(dev);
38513787
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c+89−0
@@ -1310,3 +1310,92 @@ bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc, · 1309 unmodified lines
13101310 return amdgpu_display_get_crtc_scanoutpos(dev, pipe, 0, vpos, hpos,
13111311 stime, etime, mode);
13121312 }
1313+
1314+int amdgpu_display_suspend_helper(struct amdgpu_device *adev)
1315+{
1316+ struct drm_device *dev = adev_to_drm(adev);
1317+ struct drm_crtc *crtc;
1318+ struct drm_connector *connector;
1319+ struct drm_connector_list_iter iter;
1320+ int r;
1321+
1322+ /* turn off display hw */
1323+ drm_modeset_lock_all(dev);
1324+ drm_connector_list_iter_begin(dev, &iter);
1325+ drm_for_each_connector_iter(connector, &iter)
1326+ drm_helper_connector_dpms(connector,
1327+ DRM_MODE_DPMS_OFF);
1328+ drm_connector_list_iter_end(&iter);
1329+ drm_modeset_unlock_all(dev);
1330+ /* unpin the front buffers and cursors */
1331+ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
1332+ struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
1333+ struct drm_framebuffer *fb = crtc->primary->fb;
1334+ struct amdgpu_bo *robj;
1335+
1336+ if (amdgpu_crtc->cursor_bo && !adev->enable_virtual_display) {
1337+ struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
1338+ r = amdgpu_bo_reserve(aobj, true);
1339+ if (r == 0) {
1340+ amdgpu_bo_unpin(aobj);
1341+ amdgpu_bo_unreserve(aobj);
1342+ }
1343+ }
1344+
1345+ if (fb == NULL || fb->obj[0] == NULL) {
1346+ continue;
1347+ }
1348+ robj = gem_to_amdgpu_bo(fb->obj[0]);
1349+ /* don't unpin kernel fb objects */
1350+ if (!amdgpu_fbdev_robj_is_fb(adev, robj)) {
1351+ r = amdgpu_bo_reserve(robj, true);
1352+ if (r == 0) {
1353+ amdgpu_bo_unpin(robj);
1354+ amdgpu_bo_unreserve(robj);
1355+ }
1356+ }
1357+ }
1358+ return r;
1359+}
1360+
1361+int amdgpu_display_resume_helper(struct amdgpu_device *adev)
1362+{
1363+ struct drm_device *dev = adev_to_drm(adev);
1364+ struct drm_connector *connector;
1365+ struct drm_connector_list_iter iter;
1366+ struct drm_crtc *crtc;
1367+ int r;
1368+
1369+ /* pin cursors */
1370+ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
1371+ struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
1372+
1373+ if (amdgpu_crtc->cursor_bo && !adev->enable_virtual_display) {
1374+ struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
1375+ r = amdgpu_bo_reserve(aobj, true);
1376+ if (r == 0) {
1377+ r = amdgpu_bo_pin(aobj, AMDGPU_GEM_DOMAIN_VRAM);
1378+ if (r != 0)
1379+ dev_err(adev->dev, "Failed to pin cursor BO (%d)\n", r);
1380+ amdgpu_crtc->cursor_addr = amdgpu_bo_gpu_offset(aobj);
1381+ amdgpu_bo_unreserve(aobj);
1382+ }
1383+ }
1384+ }
1385+
1386+ drm_helper_resume_force_mode(dev);
1387+
1388+ /* turn on display hw */
1389+ drm_modeset_lock_all(dev);
1390+
1391+ drm_connector_list_iter_begin(dev, &iter);
1392+ drm_for_each_connector_iter(connector, &iter)
1393+ drm_helper_connector_dpms(connector,
1394+ DRM_MODE_DPMS_ON);
1395+ drm_connector_list_iter_end(&iter);
1396+
1397+ drm_modeset_unlock_all(dev);
1398+
1399+ return 0;
1400+}
1401+
drivers/gpu/drm/amd/amdgpu/amdgpu_display.h+3−0
@@ -47,4 +47,7 @@ amdgpu_display_user_framebuffer_create(struct drm_device *dev, · 46 unmodified lines
4747 const struct drm_format_info *
4848 amdgpu_lookup_format_info(u32 format, uint64_t modifier);
4949
50+int amdgpu_display_suspend_helper(struct amdgpu_device *adev);
51+int amdgpu_display_resume_helper(struct amdgpu_device *adev);
52+
5053 #endif
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c+23−12
@@ -781,6 +781,10 @@ uint amdgpu_dm_abm_level; · 780 unmodified lines
781781 MODULE_PARM_DESC(abmlevel, "ABM level (0 = off (default), 1-4 = backlight reduction level) ");
782782 module_param_named(abmlevel, amdgpu_dm_abm_level, uint, 0444);
783783
784+int amdgpu_backlight = -1;
785+MODULE_PARM_DESC(backlight, "Backlight control (0 = pwm, 1 = aux, -1 auto (default))");
786+module_param_named(backlight, amdgpu_backlight, bint, 0444);
787+
784788 /**
785789 * DOC: tmz (int)
786790 * Trusted Memory Zone (TMZ) is a method to protect data being written
@@ -1103,6 +1107,7 @@ static const struct pci_device_id pciidlist[] = { · 316 unmodified lines
11031107 {0x1002, 0x73A3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},
11041108 {0x1002, 0x73AB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},
11051109 {0x1002, 0x73AE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},
1110+ {0x1002, 0x73AF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},
11061111 {0x1002, 0x73BF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},
11071112
11081113 /* Van Gogh */
@@ -1270,24 +1275,35 @@ amdgpu_pci_shutdown(struct pci_dev *pdev) · 161 unmodified lines
12701275 */
12711276 if (!amdgpu_passthrough(adev))
12721277 adev->mp1_state = PP_MP1_STATE_UNLOAD;
1273− adev->in_poweroff_reboot_com = true;
12741278 amdgpu_device_ip_suspend(adev);
1275− adev->in_poweroff_reboot_com = false;
12761279 adev->mp1_state = PP_MP1_STATE_NONE;
12771280 }
12781281
12791282 static int amdgpu_pmops_suspend(struct device *dev)
12801283 {
12811284 struct drm_device *drm_dev = dev_get_drvdata(dev);
1285+ struct amdgpu_device *adev = drm_to_adev(drm_dev);
1286+ int r;
12821287
1283− return amdgpu_device_suspend(drm_dev, true);
1288+ if (amdgpu_acpi_is_s0ix_supported(adev))
1289+ adev->in_s0ix = true;
1290+ adev->in_s3 = true;
1291+ r = amdgpu_device_suspend(drm_dev, true);
1292+ adev->in_s3 = false;
1293+
1294+ return r;
12841295 }
12851296
12861297 static int amdgpu_pmops_resume(struct device *dev)
12871298 {
12881299 struct drm_device *drm_dev = dev_get_drvdata(dev);
1300+ struct amdgpu_device *adev = drm_to_adev(drm_dev);
1301+ int r;
12891302
1290− return amdgpu_device_resume(drm_dev, true);
1303+ r = amdgpu_device_resume(drm_dev, true);
1304+ if (amdgpu_acpi_is_s0ix_supported(adev))
1305+ adev->in_s0ix = false;
1306+ return r;
12911307 }
12921308
12931309 static int amdgpu_pmops_freeze(struct device *dev)
@@ -1296,9 +1312,9 @@ static int amdgpu_pmops_freeze(struct device *dev) · 2 unmodified lines
12961312 struct amdgpu_device *adev = drm_to_adev(drm_dev);
12971313 int r;
12981314
1299− adev->in_hibernate = true;
1315+ adev->in_s4 = true;
13001316 r = amdgpu_device_suspend(drm_dev, true);
1301− adev->in_hibernate = false;
1317+ adev->in_s4 = false;
13021318 if (r)
13031319 return r;
13041320 return amdgpu_asic_reset(adev);
@@ -1314,13 +1330,8 @@ static int amdgpu_pmops_thaw(struct device *dev) · 9 unmodified lines
13141330 static int amdgpu_pmops_poweroff(struct device *dev)
13151331 {
13161332 struct drm_device *drm_dev = dev_get_drvdata(dev);
1317− struct amdgpu_device *adev = drm_to_adev(drm_dev);
1318− int r;
13191333
1320− adev->in_poweroff_reboot_com = true;
1321− r = amdgpu_device_suspend(drm_dev, true);
1322− adev->in_poweroff_reboot_com = false;
1323− return r;
1334+ return amdgpu_device_suspend(drm_dev, true);
13241335 }
13251336
13261337 static int amdgpu_pmops_restore(struct device *dev)
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c+1−1
@@ -146,7 +146,7 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev, · 145 unmodified lines
146146 size = mode_cmd->pitches[0] * height;
147147 aligned_size = ALIGN(size, PAGE_SIZE);
148148 ret = amdgpu_gem_object_create(adev, aligned_size, 0, domain, flags,
149− ttm_bo_type_kernel, NULL, &gobj);
149+ ttm_bo_type_device, NULL, &gobj);
150150 if (ret) {
151151 pr_err("failed to allocate framebuffer (%d)\n", aligned_size);
152152 return -ENOMEM;
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c+2−2
@@ -778,9 +778,9 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) · 777 unmodified lines
778778 dev_info->high_va_offset = AMDGPU_GMC_HOLE_END;
779779 dev_info->high_va_max = AMDGPU_GMC_HOLE_END | vm_size;
780780 }
781− dev_info->virtual_address_alignment = max((int)PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE);
781+ dev_info->virtual_address_alignment = max_t(u32, PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE);
782782 dev_info->pte_fragment_size = (1 << adev->vm_manager.fragment_size) * AMDGPU_GPU_PAGE_SIZE;
783− dev_info->gart_page_size = AMDGPU_GPU_PAGE_SIZE;
783+ dev_info->gart_page_size = max_t(u32, PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE);
784784 dev_info->cu_active_number = adev->gfx.cu_info.number;
785785 dev_info->cu_ao_mask = adev->gfx.cu_info.ao_cu_mask;
786786 dev_info->ce_ram_size = adev->gfx.ce_ram_size;
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c+2−5
@@ -1028,13 +1028,10 @@ int amdgpu_bo_evict_vram(struct amdgpu_device *adev) · 1027 unmodified lines
10281028 {
10291029 struct ttm_resource_manager *man;
10301030
1031− /* late 2.6.33 fix IGP hibernate - we need pm ops to do this correct */
1032−#ifndef CONFIG_HIBERNATION
1033− if (adev->flags & AMD_IS_APU) {
1034− /* Useless to evict on IGP chips */
1031+ if (adev->in_s3 && (adev->flags & AMD_IS_APU)) {
1032+ /* No need to evict vram on APUs for suspend to ram */
10351033 return 0;
10361034 }
1037−#endif
10381035
10391036 man = ttm_manager_type(&adev->mman.bdev, TTM_PL_VRAM);
10401037 return ttm_resource_manager_evict_all(&adev->mman.bdev, man);
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c+1−1
@@ -906,7 +906,7 @@ static int amdgpu_ttm_tt_pin_userptr(struct ttm_bo_device *bdev, · 905 unmodified lines
906906
907907 /* Allocate an SG array and squash pages into it */
908908 r = sg_alloc_table_from_pages(ttm->sg, ttm->pages, ttm->num_pages, 0,
909− ttm->num_pages << PAGE_SHIFT,
909+ (u64)ttm->num_pages << PAGE_SHIFT,
910910 GFP_KERNEL);
911911 if (r)
912912 goto release_sg;
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c+5−5
@@ -2197,8 +2197,8 @@ int amdgpu_vm_bo_map(struct amdgpu_device *adev, · 2196 unmodified lines
21972197 uint64_t eaddr;
21982198
21992199 /* validate the parameters */
2200− if (saddr & AMDGPU_GPU_PAGE_MASK || offset & AMDGPU_GPU_PAGE_MASK ||
2201− size == 0 || size & AMDGPU_GPU_PAGE_MASK)
2200+ if (saddr & ~PAGE_MASK || offset & ~PAGE_MASK ||
2201+ size == 0 || size & ~PAGE_MASK)
22022202 return -EINVAL;
22032203
22042204 /* make sure object fit at this offset */
@@ -2263,8 +2263,8 @@ int amdgpu_vm_bo_replace_map(struct amdgpu_device *adev, · 58 unmodified lines
22632263 int r;
22642264
22652265 /* validate the parameters */
2266− if (saddr & AMDGPU_GPU_PAGE_MASK || offset & AMDGPU_GPU_PAGE_MASK ||
2267− size == 0 || size & AMDGPU_GPU_PAGE_MASK)
2266+ if (saddr & ~PAGE_MASK || offset & ~PAGE_MASK ||
2267+ size == 0 || size & ~PAGE_MASK)
22682268 return -EINVAL;
22692269
22702270 /* make sure object fit at this offset */
@@ -2409,7 +2409,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev, · 138 unmodified lines
24092409 after->start = eaddr + 1;
24102410 after->last = tmp->last;
24112411 after->offset = tmp->offset;
2412− after->offset += after->start - tmp->start;
2412+ after->offset += (after->start - tmp->start) << PAGE_SHIFT;
24132413 after->flags = tmp->flags;
24142414 after->bo_va = tmp->bo_va;
24152415 list_add(&after->list, &tmp->bo_va->invalids);
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c+8−1
@@ -2897,6 +2897,11 @@ static int dce_v10_0_hw_fini(void *handle) · 2896 unmodified lines
28972897 static int dce_v10_0_suspend(void *handle)
28982898 {
28992899 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
2900+ int r;
2901+
2902+ r = amdgpu_display_suspend_helper(adev);
2903+ if (r)
2904+ return r;
29002905
29012906 adev->mode_info.bl_level =
29022907 amdgpu_atombios_encoder_get_backlight_level_from_reg(adev);
@@ -2921,8 +2926,10 @@ static int dce_v10_0_resume(void *handle) · 18 unmodified lines
29212926 amdgpu_display_backlight_set_level(adev, adev->mode_info.bl_encoder,
29222927 bl_level);
29232928 }
2929+ if (ret)
2930+ return ret;
29242931
2925− return ret;
2932+ return amdgpu_display_resume_helper(adev);
29262933 }
29272934
29282935 static bool dce_v10_0_is_idle(void *handle)
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c+8−1
@@ -3027,6 +3027,11 @@ static int dce_v11_0_hw_fini(void *handle) · 3026 unmodified lines
30273027 static int dce_v11_0_suspend(void *handle)
30283028 {
30293029 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
3030+ int r;
3031+
3032+ r = amdgpu_display_suspend_helper(adev);
3033+ if (r)
3034+ return r;
30303035
30313036 adev->mode_info.bl_level =
30323037 amdgpu_atombios_encoder_get_backlight_level_from_reg(adev);
@@ -3051,8 +3056,10 @@ static int dce_v11_0_resume(void *handle) · 18 unmodified lines
30513056 amdgpu_display_backlight_set_level(adev, adev->mode_info.bl_encoder,
30523057 bl_level);
30533058 }
3059+ if (ret)
3060+ return ret;
30543061
3055− return ret;
3062+ return amdgpu_display_resume_helper(adev);
30563063 }
30573064
30583065 static bool dce_v11_0_is_idle(void *handle)
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c+7−1
@@ -2770,7 +2770,11 @@ static int dce_v6_0_hw_fini(void *handle) · 2769 unmodified lines
27702770 static int dce_v6_0_suspend(void *handle)
27712771 {
27722772 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
2773+ int r;
27732774
2775+ r = amdgpu_display_suspend_helper(adev);
2776+ if (r)
2777+ return r;
27742778 adev->mode_info.bl_level =
27752779 amdgpu_atombios_encoder_get_backlight_level_from_reg(adev);
27762780
@@ -2794,8 +2798,10 @@ static int dce_v6_0_resume(void *handle) · 17 unmodified lines
27942798 amdgpu_display_backlight_set_level(adev, adev->mode_info.bl_encoder,
27952799 bl_level);
27962800 }
2801+ if (ret)
2802+ return ret;
27972803
2798− return ret;
2804+ return amdgpu_display_resume_helper(adev);
27992805 }
28002806
28012807 static bool dce_v6_0_is_idle(void *handle)
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c+8−1
@@ -2796,6 +2796,11 @@ static int dce_v8_0_hw_fini(void *handle) · 2795 unmodified lines
27962796 static int dce_v8_0_suspend(void *handle)
27972797 {
27982798 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
2799+ int r;
2800+
2801+ r = amdgpu_display_suspend_helper(adev);
2802+ if (r)
2803+ return r;
27992804
28002805 adev->mode_info.bl_level =
28012806 amdgpu_atombios_encoder_get_backlight_level_from_reg(adev);
@@ -2820,8 +2825,10 @@ static int dce_v8_0_resume(void *handle) · 18 unmodified lines
28202825 amdgpu_display_backlight_set_level(adev, adev->mode_info.bl_encoder,
28212826 bl_level);
28222827 }
2828+ if (ret)
2829+ return ret;
28232830
2824− return ret;
2831+ return amdgpu_display_resume_helper(adev);
28252832 }
28262833
28272834 static bool dce_v8_0_is_idle(void *handle)
drivers/gpu/drm/amd/amdgpu/dce_virtual.c+14−1
@@ -39,6 +39,7 @@ · 38 unmodified lines
3939 #include "dce_v11_0.h"
4040 #include "dce_virtual.h"
4141 #include "ivsrcid/ivsrcid_vislands30.h"
42+#include "amdgpu_display.h"
4243
4344 #define DCE_VIRTUAL_VBLANK_PERIOD 16666666
4445
@@ -491,12 +492,24 @@ static int dce_virtual_hw_fini(void *handle) · 446 unmodified lines
491492
492493 static int dce_virtual_suspend(void *handle)
493494 {
495+ struct amdgpu_device *adev = (struct amdgpu_device *)handle;
496+ int r;
497+
498+ r = amdgpu_display_suspend_helper(adev);
499+ if (r)
500+ return r;
494501 return dce_virtual_hw_fini(handle);
495502 }
496503
497504 static int dce_virtual_resume(void *handle)
498505 {
499− return dce_virtual_hw_init(handle);
506+ struct amdgpu_device *adev = (struct amdgpu_device *)handle;
507+ int r;
508+
509+ r = dce_virtual_hw_init(handle);
510+ if (r)
511+ return r;
512+ return amdgpu_display_resume_helper(adev);
500513 }
501514
502515 static bool dce_virtual_is_idle(void *handle)
drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c+1−1
@@ -155,7 +155,7 @@ static int dbgdev_diq_submit_ib(struct kfd_dbgdev *dbgdev, · 154 unmodified lines
155155
156156 /* Wait till CP writes sync code: */
157157 status = amdkfd_fence_wait_timeout(
158− (unsigned int *) rm_state,
158+ rm_state,
159159 QUEUESTATE__ACTIVE, 1500);
160160
161161 kfd_gtt_sa_free(dbgdev->dev, mem_obj);
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c+3−3
@@ -1167,7 +1167,7 @@ static int start_cpsch(struct device_queue_manager *dqm) · 1166 unmodified lines
11671167 if (retval)
11681168 goto fail_allocate_vidmem;
11691169
1170− dqm->fence_addr = dqm->fence_mem->cpu_ptr;
1170+ dqm->fence_addr = (uint64_t *)dqm->fence_mem->cpu_ptr;
11711171 dqm->fence_gpu_addr = dqm->fence_mem->gpu_addr;
11721172
11731173 init_interrupts(dqm);
@@ -1340,8 +1340,8 @@ out: · 166 unmodified lines
13401340 return retval;
13411341 }
13421342
1343−int amdkfd_fence_wait_timeout(unsigned int *fence_addr,
1344− unsigned int fence_value,
1343+int amdkfd_fence_wait_timeout(uint64_t *fence_addr,
1344+ uint64_t fence_value,
13451345 unsigned int timeout_ms)
13461346 {
13471347 unsigned long end_jiffies = msecs_to_jiffies(timeout_ms) + jiffies;
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h+1−1
@@ -192,7 +192,7 @@ struct device_queue_manager { · 191 unmodified lines
192192 uint16_t vmid_pasid[VMID_NUM];
193193 uint64_t pipelines_addr;
194194 uint64_t fence_gpu_addr;
195− unsigned int *fence_addr;
195+ uint64_t *fence_addr;
196196 struct kfd_mem_obj *fence_mem;
197197 bool active_runlist;
198198 int sched_policy;
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c+1−1
@@ -347,7 +347,7 @@ fail_create_runlist_ib: · 346 unmodified lines
347347 }
348348
349349 int pm_send_query_status(struct packet_manager *pm, uint64_t fence_address,
350− uint32_t fence_value)
350+ uint64_t fence_value)
351351 {
352352 uint32_t *buffer, size;
353353 int retval = 0;
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c+1−1
@@ -283,7 +283,7 @@ static int pm_unmap_queues_v9(struct packet_manager *pm, uint32_t *buffer, · 282 unmodified lines
283283 }
284284
285285 static int pm_query_status_v9(struct packet_manager *pm, uint32_t *buffer,
286− uint64_t fence_address, uint32_t fence_value)
286+ uint64_t fence_address, uint64_t fence_value)
287287 {
288288 struct pm4_mes_query_status *packet;
289289
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_vi.c+1−1
@@ -263,7 +263,7 @@ static int pm_unmap_queues_vi(struct packet_manager *pm, uint32_t *buffer, · 262 unmodified lines
263263 }
264264
265265 static int pm_query_status_vi(struct packet_manager *pm, uint32_t *buffer,
266− uint64_t fence_address, uint32_t fence_value)
266+ uint64_t fence_address, uint64_t fence_value)
267267 {
268268 struct pm4_mes_query_status *packet;
269269
drivers/gpu/drm/amd/amdkfd/kfd_priv.h+4−4
@@ -1003,8 +1003,8 @@ int pqm_get_wave_state(struct process_queue_manager *pqm, · 1002 unmodified lines
10031003 u32 *ctl_stack_used_size,
10041004 u32 *save_area_used_size);
10051005
1006−int amdkfd_fence_wait_timeout(unsigned int *fence_addr,
1007− unsigned int fence_value,
1006+int amdkfd_fence_wait_timeout(uint64_t *fence_addr,
1007+ uint64_t fence_value,
10081008 unsigned int timeout_ms);
10091009
10101010 /* Packet Manager */
@@ -1040,7 +1040,7 @@ struct packet_manager_funcs { · 29 unmodified lines
10401040 uint32_t filter_param, bool reset,
10411041 unsigned int sdma_engine);
10421042 int (*query_status)(struct packet_manager *pm, uint32_t *buffer,
1043− uint64_t fence_address, uint32_t fence_value);
1043+ uint64_t fence_address, uint64_t fence_value);
10441044 int (*release_mem)(uint64_t gpu_addr, uint32_t *buffer);
10451045
10461046 /* Packet sizes */
@@ -1062,7 +1062,7 @@ int pm_send_set_resources(struct packet_manager *pm, · 15 unmodified lines
10621062 struct scheduling_resources *res);
10631063 int pm_send_runlist(struct packet_manager *pm, struct list_head *dqm_queues);
10641064 int pm_send_query_status(struct packet_manager *pm, uint64_t fence_address,
1065− uint32_t fence_value);
1065+ uint64_t fence_value);
10661066
10671067 int pm_send_unmap_queue(struct packet_manager *pm, enum kfd_queue_type type,
10681068 enum kfd_unmap_queues_filter mode,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c+30−20
@@ -2267,6 +2267,11 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector) · 2266 unmodified lines
22672267 caps->ext_caps->bits.hdr_aux_backlight_control == 1)
22682268 caps->aux_support = true;
22692269
2270+ if (amdgpu_backlight == 0)
2271+ caps->aux_support = false;
2272+ else if (amdgpu_backlight == 1)
2273+ caps->aux_support = true;
2274+
22702275 /* From the specification (CTA-861-G), for calculating the maximum
22712276 * luminance we need to use:
22722277 * Luminance = 50*2**(CV/32)
@@ -3185,19 +3190,6 @@ static void amdgpu_dm_update_backlight_caps(struct amdgpu_display_manager *dm) · 912 unmodified lines
31853190 #endif
31863191 }
31873192
3188−static int set_backlight_via_aux(struct dc_link *link, uint32_t brightness)
3189−{
3190− bool rc;
3191−
3192− if (!link)
3193− return 1;
3194−
3195− rc = dc_link_set_backlight_level_nits(link, true, brightness,
3196− AUX_BL_DEFAULT_TRANSITION_TIME_MS);
3197−
3198− return rc ? 0 : 1;
3199−}
3200−
32013193 static int get_brightness_range(const struct amdgpu_dm_backlight_caps *caps,
32023194 unsigned *min, unsigned *max)
32033195 {
@@ -3260,9 +3252,10 @@ static int amdgpu_dm_backlight_update_status(struct backlight_device *bd) · 56 unmodified lines
32603252 brightness = convert_brightness_from_user(&caps, bd->props.brightness);
32613253 // Change brightness based on AUX property
32623254 if (caps.aux_support)
3263− return set_backlight_via_aux(link, brightness);
3264−
3265− rc = dc_link_set_backlight_level(dm->backlight_link, brightness, 0);
3255+ rc = dc_link_set_backlight_level_nits(link, true, brightness,
3256+ AUX_BL_DEFAULT_TRANSITION_TIME_MS);
3257+ else
3258+ rc = dc_link_set_backlight_level(dm->backlight_link, brightness, 0);
32663259
32673260 return rc ? 0 : 1;
32683261 }
@@ -3270,11 +3263,27 @@ static int amdgpu_dm_backlight_update_status(struct backlight_device *bd) · 1 unmodified line
32703263 static int amdgpu_dm_backlight_get_brightness(struct backlight_device *bd)
32713264 {
32723265 struct amdgpu_display_manager *dm = bl_get_data(bd);
3273− int ret = dc_link_get_backlight_level(dm->backlight_link);
3266+ struct amdgpu_dm_backlight_caps caps;
3267+
3268+ amdgpu_dm_update_backlight_caps(dm);
3269+ caps = dm->backlight_caps;
3270+
3271+ if (caps.aux_support) {
3272+ struct dc_link *link = (struct dc_link *)dm->backlight_link;
3273+ u32 avg, peak;
3274+ bool rc;
32743275
3275− if (ret == DC_ERROR_UNEXPECTED)
3276− return bd->props.brightness;
3277− return convert_brightness_to_user(&dm->backlight_caps, ret);
3276+ rc = dc_link_get_backlight_level_nits(link, &avg, &peak);
3277+ if (!rc)
3278+ return bd->props.brightness;
3279+ return convert_brightness_to_user(&caps, avg);
3280+ } else {
3281+ int ret = dc_link_get_backlight_level(dm->backlight_link);
3282+
3283+ if (ret == DC_ERROR_UNEXPECTED)
3284+ return bd->props.brightness;
3285+ return convert_brightness_to_user(&caps, ret);
3286+ }
32783287 }
32793288
32803289 static const struct backlight_ops amdgpu_dm_backlight_ops = {
@@ -4716,6 +4725,7 @@ static int fill_dc_plane_attributes(struct amdgpu_device *adev, · 1435 unmodified lines
47164725 dc_plane_state->global_alpha_value = plane_info.global_alpha_value;
47174726 dc_plane_state->dcc = plane_info.dcc;
47184727 dc_plane_state->layer_index = plane_info.layer_index; // Always returns 0
4728+ dc_plane_state->flip_int_enabled = true;
47194729
47204730 /*
47214731 * Always set input transfer function, since plane state is refreshed
drivers/gpu/drm/amd/display/dc/core/dc_link.c+0−1
@@ -2602,7 +2602,6 @@ bool dc_link_set_backlight_level(const struct dc_link *link, · 2601 unmodified lines
26022602 if (pipe_ctx->plane_state == NULL)
26032603 frame_ramp = 0;
26042604 } else {
2605− ASSERT(false);
26062605 return false;
26072606 }
26082607
drivers/gpu/drm/amd/display/dc/dc.h+1−0
@@ -887,6 +887,7 @@ struct dc_plane_state { · 886 unmodified lines
887887 int layer_index;
888888
889889 union surface_update_flags update_flags;
890+ bool flip_int_enabled;
890891 /* private to DC core */
891892 struct dc_plane_status status;
892893 struct dc_context *ctx;
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c+11−0
@@ -1257,6 +1257,16 @@ void hubp1_soft_reset(struct hubp *hubp, bool reset) · 1256 unmodified lines
12571257 REG_UPDATE(DCHUBP_CNTL, HUBP_DISABLE, reset ? 1 : 0);
12581258 }
12591259
1260+void hubp1_set_flip_int(struct hubp *hubp)
1261+{
1262+ struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
1263+
1264+ REG_UPDATE(DCSURF_SURFACE_FLIP_INTERRUPT,
1265+ SURFACE_FLIP_INT_MASK, 1);
1266+
1267+ return;
1268+}
1269+
12601270 void hubp1_init(struct hubp *hubp)
12611271 {
12621272 //do nothing
@@ -1290,6 +1300,7 @@ static const struct hubp_funcs dcn10_hubp_funcs = { · 27 unmodified lines
12901300 .dmdata_load = NULL,
12911301 .hubp_soft_reset = hubp1_soft_reset,
12921302 .hubp_in_blank = hubp1_in_blank,
1303+ .hubp_set_flip_int = hubp1_set_flip_int,
12931304 };
12941305
12951306 /*****************************************/
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h+6−0
@@ -74,6 +74,7 @@ · 73 unmodified lines
7474 SRI(DCSURF_SURFACE_EARLIEST_INUSE_C, HUBPREQ, id),\
7575 SRI(DCSURF_SURFACE_EARLIEST_INUSE_HIGH_C, HUBPREQ, id),\
7676 SRI(DCSURF_SURFACE_CONTROL, HUBPREQ, id),\
77+ SRI(DCSURF_SURFACE_FLIP_INTERRUPT, HUBPREQ, id),\
7778 SRI(HUBPRET_CONTROL, HUBPRET, id),\
7879 SRI(DCN_EXPANSION_MODE, HUBPREQ, id),\
7980 SRI(DCHUBP_REQ_SIZE_CONFIG, HUBP, id),\
@@ -183,6 +184,7 @@ · 103 unmodified lines
183184 uint32_t DCSURF_SURFACE_EARLIEST_INUSE_C; \
184185 uint32_t DCSURF_SURFACE_EARLIEST_INUSE_HIGH_C; \
185186 uint32_t DCSURF_SURFACE_CONTROL; \
187+ uint32_t DCSURF_SURFACE_FLIP_INTERRUPT; \
186188 uint32_t HUBPRET_CONTROL; \
187189 uint32_t DCN_EXPANSION_MODE; \
188190 uint32_t DCHUBP_REQ_SIZE_CONFIG; \
@@ -332,6 +334,7 @@ · 143 unmodified lines
332334 HUBP_SF(HUBPREQ0_DCSURF_SURFACE_CONTROL, SECONDARY_META_SURFACE_TMZ_C, mask_sh),\
333335 HUBP_SF(HUBPREQ0_DCSURF_SURFACE_CONTROL, SECONDARY_SURFACE_DCC_EN, mask_sh),\
334336 HUBP_SF(HUBPREQ0_DCSURF_SURFACE_CONTROL, SECONDARY_SURFACE_DCC_IND_64B_BLK, mask_sh),\
337+ HUBP_SF(HUBPREQ0_DCSURF_SURFACE_FLIP_INTERRUPT, SURFACE_FLIP_INT_MASK, mask_sh),\
335338 HUBP_SF(HUBPRET0_HUBPRET_CONTROL, DET_BUF_PLANE1_BASE_ADDRESS, mask_sh),\
336339 HUBP_SF(HUBPRET0_HUBPRET_CONTROL, CROSSBAR_SRC_CB_B, mask_sh),\
337340 HUBP_SF(HUBPRET0_HUBPRET_CONTROL, CROSSBAR_SRC_CR_R, mask_sh),\
@@ -531,6 +534,7 @@ · 193 unmodified lines
531534 type PRIMARY_SURFACE_DCC_IND_64B_BLK;\
532535 type SECONDARY_SURFACE_DCC_EN;\
533536 type SECONDARY_SURFACE_DCC_IND_64B_BLK;\
537+ type SURFACE_FLIP_INT_MASK;\
534538 type DET_BUF_PLANE1_BASE_ADDRESS;\
535539 type CROSSBAR_SRC_CB_B;\
536540 type CROSSBAR_SRC_CR_R;\
@@ -777,4 +781,6 @@ void hubp1_read_state_common(struct hubp *hubp); · 240 unmodified lines
777781 bool hubp1_in_blank(struct hubp *hubp);
778782 void hubp1_soft_reset(struct hubp *hubp, bool reset);
779783
784+void hubp1_set_flip_int(struct hubp *hubp);
785+
780786 #endif
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c+7−0
@@ -2196,6 +2196,13 @@ static void dcn10_enable_plane( · 2195 unmodified lines
21962196 if (dc->debug.sanity_checks) {
21972197 hws->funcs.verify_allow_pstate_change_high(dc);
21982198 }
2199+
2200+ if (!pipe_ctx->top_pipe
2201+ && pipe_ctx->plane_state
2202+ && pipe_ctx->plane_state->flip_int_enabled
2203+ && pipe_ctx->plane_res.hubp->funcs->hubp_set_flip_int)
2204+ pipe_ctx->plane_res.hubp->funcs->hubp_set_flip_int(pipe_ctx->plane_res.hubp);
2205+
21992206 }
22002207
22012208 void dcn10_program_gamut_remap(struct pipe_ctx *pipe_ctx)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c+1−0
@@ -1597,6 +1597,7 @@ static struct hubp_funcs dcn20_hubp_funcs = { · 1596 unmodified lines
15971597 .validate_dml_output = hubp2_validate_dml_output,
15981598 .hubp_in_blank = hubp1_in_blank,
15991599 .hubp_soft_reset = hubp1_soft_reset,
1600+ .hubp_set_flip_int = hubp1_set_flip_int,
16001601 };
16011602
16021603
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c+8−32
@@ -1146,6 +1146,12 @@ void dcn20_enable_plane( · 1145 unmodified lines
11461146 pipe_ctx->plane_res.hubp->funcs->hubp_set_vm_system_aperture_settings(pipe_ctx->plane_res.hubp, &apt);
11471147 }
11481148
1149+ if (!pipe_ctx->top_pipe
1150+ && pipe_ctx->plane_state
1151+ && pipe_ctx->plane_state->flip_int_enabled
1152+ && pipe_ctx->plane_res.hubp->funcs->hubp_set_flip_int)
1153+ pipe_ctx->plane_res.hubp->funcs->hubp_set_flip_int(pipe_ctx->plane_res.hubp);
1154+
11491155 // if (dc->debug.sanity_checks) {
11501156 // dcn10_verify_allow_pstate_change_high(dc);
11511157 // }
@@ -1501,38 +1507,8 @@ static void dcn20_update_dchubp_dpp( · 349 unmodified lines
15011507 if (pipe_ctx->update_flags.bits.enable || pipe_ctx->update_flags.bits.opp_changed
15021508 || pipe_ctx->stream->update_flags.bits.gamut_remap
15031509 || pipe_ctx->stream->update_flags.bits.out_csc) {
1504− struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
1505−
1506− if (mpc->funcs->set_gamut_remap) {
1507− int i;
1508− int mpcc_id = hubp->inst;
1509− struct mpc_grph_gamut_adjustment adjust;
1510− bool enable_remap_dpp = false;
1511−
1512− memset(&adjust, 0, sizeof(adjust));
1513− adjust.gamut_adjust_type = GRAPHICS_GAMUT_ADJUST_TYPE_BYPASS;
1514−
1515− /* save the enablement of gamut remap for dpp */
1516− enable_remap_dpp = pipe_ctx->stream->gamut_remap_matrix.enable_remap;
1517−
1518− /* force bypass gamut remap for dpp/cm */
1519− pipe_ctx->stream->gamut_remap_matrix.enable_remap = false;
1520− dc->hwss.program_gamut_remap(pipe_ctx);
1521−
1522− /* restore gamut remap flag and use this remap into mpc */
1523− pipe_ctx->stream->gamut_remap_matrix.enable_remap = enable_remap_dpp;
1524−
1525− /* build remap matrix for top plane if enabled */
1526− if (enable_remap_dpp && pipe_ctx->top_pipe == NULL) {
1527− adjust.gamut_adjust_type = GRAPHICS_GAMUT_ADJUST_TYPE_SW;
1528− for (i = 0; i < CSC_TEMPERATURE_MATRIX_SIZE; i++)
1529− adjust.temperature_matrix[i] =
1530− pipe_ctx->stream->gamut_remap_matrix.matrix[i];
1531− }
1532− mpc->funcs->set_gamut_remap(mpc, mpcc_id, &adjust);
1533− } else
1534− /* dpp/cm gamut remap*/
1535− dc->hwss.program_gamut_remap(pipe_ctx);
1510+ /* dpp/cm gamut remap*/
1511+ dc->hwss.program_gamut_remap(pipe_ctx);
15361512
15371513 /*call the dcn2 method which uses mpc csc*/
15381514 dc->hwss.program_output_csc(dc,
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_link_encoder.c+1−2
@@ -341,8 +341,7 @@ void enc2_hw_init(struct link_encoder *enc) · 340 unmodified lines
341341 } else {
342342 AUX_REG_WRITE(AUX_DPHY_RX_CONTROL0, 0x103d1110);
343343
344− AUX_REG_WRITE(AUX_DPHY_TX_CONTROL, 0x21c4d);
345−
344+ AUX_REG_WRITE(AUX_DPHY_TX_CONTROL, 0x21c7a);
346345 }
347346
348347 //AUX_DPHY_TX_REF_CONTROL'AUX_TX_REF_DIV HW default is 0x32;
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c+1−0
@@ -838,6 +838,7 @@ static struct hubp_funcs dcn21_hubp_funcs = { · 837 unmodified lines
838838 .hubp_set_flip_control_surface_gsl = hubp2_set_flip_control_surface_gsl,
839839 .hubp_init = hubp21_init,
840840 .validate_dml_output = hubp21_validate_dml_output,
841+ .hubp_set_flip_int = hubp1_set_flip_int,
841842 };
842843
843844 bool hubp21_construct(
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c+7−6
@@ -296,7 +296,7 @@ struct _vcs_dpi_soc_bounding_box_st dcn2_1_soc = { · 295 unmodified lines
296296 .num_banks = 8,
297297 .num_chans = 4,
298298 .vmm_page_size_bytes = 4096,
299− .dram_clock_change_latency_us = 11.72,
299+ .dram_clock_change_latency_us = 23.84,
300300 .return_bus_width_bytes = 64,
301301 .dispclk_dppclk_vco_speed_mhz = 3600,
302302 .xfc_bus_transport_time_us = 4,
@@ -1062,8 +1062,6 @@ static void patch_bounding_box(struct dc *dc, struct _vcs_dpi_soc_bounding_box_s · 759 unmodified lines
10621062 {
10631063 int i;
10641064
1065− DC_FP_START();
1066−
10671065 if (dc->bb_overrides.sr_exit_time_ns) {
10681066 for (i = 0; i < WM_SET_COUNT; i++) {
10691067 dc->clk_mgr->bw_params->wm_table.entries[i].sr_exit_time_us =
@@ -1088,8 +1086,6 @@ static void patch_bounding_box(struct dc *dc, struct _vcs_dpi_soc_bounding_box_s · 18 unmodified lines
10881086 dc->bb_overrides.dram_clock_change_latency_ns / 1000.0;
10891087 }
10901088 }
1091−
1092− DC_FP_END();
10931089 }
10941090
10951091 void dcn21_calculate_wm(
@@ -1339,7 +1335,7 @@ static noinline bool dcn21_validate_bandwidth_fp(struct dc *dc, · 243 unmodified lines
13391335 int vlevel = 0;
13401336 int pipe_split_from[MAX_PIPES];
13411337 int pipe_cnt = 0;
1342− display_e2e_pipe_params_st *pipes = kzalloc(dc->res_pool->pipe_count * sizeof(display_e2e_pipe_params_st), GFP_KERNEL);
1338+ display_e2e_pipe_params_st *pipes = kzalloc(dc->res_pool->pipe_count * sizeof(display_e2e_pipe_params_st), GFP_ATOMIC);
13431339 DC_LOGGER_INIT(dc->ctx->logger);
13441340
13451341 BW_VAL_TRACE_COUNT();
@@ -1599,6 +1595,11 @@ static void update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_param · 253 unmodified lines
15991595 dcn2_1_soc.num_chans = bw_params->num_channels;
16001596
16011597 ASSERT(clk_table->num_entries);
1598+ /* Copy dcn2_1_soc.clock_limits to clock_limits to avoid copying over null states later */
1599+ for (i = 0; i < dcn2_1_soc.num_states + 1; i++) {
1600+ clock_limits[i] = dcn2_1_soc.clock_limits[i];
1601+ }
1602+
16021603 for (i = 0; i < clk_table->num_entries; i++) {
16031604 /* loop backwards*/
16041605 for (closest_clk_lvl = 0, j = dcn2_1_soc.num_states - 1; j >= 0; j--) {
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_cm_common.c+18−8
@@ -113,6 +113,7 @@ bool cm3_helper_translate_curve_to_hw_format( · 112 unmodified lines
113113 struct pwl_result_data *rgb_resulted;
114114 struct pwl_result_data *rgb;
115115 struct pwl_result_data *rgb_plus_1;
116+ struct pwl_result_data *rgb_minus_1;
116117 struct fixed31_32 end_value;
117118
118119 int32_t region_start, region_end;
@@ -140,7 +141,7 @@ bool cm3_helper_translate_curve_to_hw_format( · 21 unmodified lines
140141 region_start = -MAX_LOW_POINT;
141142 region_end = NUMBER_REGIONS - MAX_LOW_POINT;
142143 } else {
143− /* 10 segments
144+ /* 11 segments
144145 * segment is from 2^-10 to 2^0
145146 * There are less than 256 points, for optimization
146147 */
@@ -154,9 +155,10 @@ bool cm3_helper_translate_curve_to_hw_format( · 7 unmodified lines
154155 seg_distr[7] = 4;
155156 seg_distr[8] = 4;
156157 seg_distr[9] = 4;
158+ seg_distr[10] = 1;
157159
158160 region_start = -10;
159− region_end = 0;
161+ region_end = 1;
160162 }
161163
162164 for (i = region_end - region_start; i < MAX_REGIONS_NUMBER ; i++)
@@ -189,6 +191,10 @@ bool cm3_helper_translate_curve_to_hw_format( · 26 unmodified lines
189191 rgb_resulted[hw_points - 1].green = output_tf->tf_pts.green[start_index];
190192 rgb_resulted[hw_points - 1].blue = output_tf->tf_pts.blue[start_index];
191193
194+ rgb_resulted[hw_points].red = rgb_resulted[hw_points - 1].red;
195+ rgb_resulted[hw_points].green = rgb_resulted[hw_points - 1].green;
196+ rgb_resulted[hw_points].blue = rgb_resulted[hw_points - 1].blue;
197+
192198 // All 3 color channels have same x
193199 corner_points[0].red.x = dc_fixpt_pow(dc_fixpt_from_int(2),
194200 dc_fixpt_from_int(region_start));
@@ -259,15 +265,18 @@ bool cm3_helper_translate_curve_to_hw_format( · 64 unmodified lines
259265
260266 rgb = rgb_resulted;
261267 rgb_plus_1 = rgb_resulted + 1;
268+ rgb_minus_1 = rgb;
262269
263270 i = 1;
264271 while (i != hw_points + 1) {
265− if (dc_fixpt_lt(rgb_plus_1->red, rgb->red))
266− rgb_plus_1->red = rgb->red;
267− if (dc_fixpt_lt(rgb_plus_1->green, rgb->green))
268− rgb_plus_1->green = rgb->green;
269− if (dc_fixpt_lt(rgb_plus_1->blue, rgb->blue))
270− rgb_plus_1->blue = rgb->blue;
272+ if (i >= hw_points - 1) {
273+ if (dc_fixpt_lt(rgb_plus_1->red, rgb->red))
274+ rgb_plus_1->red = dc_fixpt_add(rgb->red, rgb_minus_1->delta_red);
275+ if (dc_fixpt_lt(rgb_plus_1->green, rgb->green))
276+ rgb_plus_1->green = dc_fixpt_add(rgb->green, rgb_minus_1->delta_green);
277+ if (dc_fixpt_lt(rgb_plus_1->blue, rgb->blue))
278+ rgb_plus_1->blue = dc_fixpt_add(rgb->blue, rgb_minus_1->delta_blue);
279+ }
271280
272281 rgb->delta_red = dc_fixpt_sub(rgb_plus_1->red, rgb->red);
273282 rgb->delta_green = dc_fixpt_sub(rgb_plus_1->green, rgb->green);
@@ -283,6 +292,7 @@ bool cm3_helper_translate_curve_to_hw_format( · 9 unmodified lines
283292 }
284293
285294 ++rgb_plus_1;
295+ rgb_minus_1 = rgb;
286296 ++rgb;
287297 ++i;
288298 }
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubp.c+1−0
@@ -511,6 +511,7 @@ static struct hubp_funcs dcn30_hubp_funcs = { · 510 unmodified lines
511511 .hubp_init = hubp3_init,
512512 .hubp_in_blank = hubp1_in_blank,
513513 .hubp_soft_reset = hubp1_soft_reset,
514+ .hubp_set_flip_int = hubp1_set_flip_int,
514515 };
515516
516517 bool hubp3_construct(
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubp.h+1−0
@@ -134,6 +134,7 @@ · 133 unmodified lines
134134 HUBP_SF(HUBPREQ0_DCSURF_SURFACE_CONTROL, SECONDARY_SURFACE_DCC_EN, mask_sh),\
135135 HUBP_SF(HUBPREQ0_DCSURF_SURFACE_CONTROL, SECONDARY_SURFACE_DCC_IND_BLK, mask_sh),\
136136 HUBP_SF(HUBPREQ0_DCSURF_SURFACE_CONTROL, SECONDARY_SURFACE_DCC_IND_BLK_C, mask_sh),\
137+ HUBP_SF(HUBPREQ0_DCSURF_SURFACE_FLIP_INTERRUPT, SURFACE_FLIP_INT_MASK, mask_sh),\
137138 HUBP_SF(HUBPRET0_HUBPRET_CONTROL, DET_BUF_PLANE1_BASE_ADDRESS, mask_sh),\
138139 HUBP_SF(HUBPRET0_HUBPRET_CONTROL, CROSSBAR_SRC_CB_B, mask_sh),\
139140 HUBP_SF(HUBPRET0_HUBPRET_CONTROL, CROSSBAR_SRC_CR_R, mask_sh),\
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c+31−0
@@ -2508,6 +2508,19 @@ static const struct resource_funcs dcn30_res_pool_funcs = { · 2507 unmodified lines
25082508 .patch_unknown_plane_state = dcn20_patch_unknown_plane_state,
25092509 };
25102510
2511+#define CTX ctx
2512+
2513+#define REG(reg_name) \
2514+ (DCN_BASE.instance[0].segment[mm ## reg_name ## _BASE_IDX] + mm ## reg_name)
2515+
2516+static uint32_t read_pipe_fuses(struct dc_context *ctx)
2517+{
2518+ uint32_t value = REG_READ(CC_DC_PIPE_DIS);
2519+ /* Support for max 6 pipes */
2520+ value = value & 0x3f;
2521+ return value;
2522+}
2523+
25112524 static bool dcn30_resource_construct(
25122525 uint8_t num_virtual_links,
25132526 struct dc *dc,
@@ -2517,6 +2530,15 @@ static bool dcn30_resource_construct( · 3 unmodified lines
25172530 struct dc_context *ctx = dc->ctx;
25182531 struct irq_service_init_data init_data;
25192532 struct ddc_service_init_data ddc_init_data;
2533+ uint32_t pipe_fuses = read_pipe_fuses(ctx);
2534+ uint32_t num_pipes = 0;
2535+
2536+ if (!(pipe_fuses == 0 || pipe_fuses == 0x3e)) {
2537+ BREAK_TO_DEBUGGER();
2538+ dm_error("DC: Unexpected fuse recipe for navi2x !\n");
2539+ /* fault to single pipe */
2540+ pipe_fuses = 0x3e;
2541+ }
25202542
25212543 DC_FP_START();
25222544
@@ -2650,6 +2672,15 @@ static bool dcn30_resource_construct( · 127 unmodified lines
26502672 /* PP Lib and SMU interfaces */
26512673 init_soc_bounding_box(dc, pool);
26522674
2675+ num_pipes = dcn3_0_ip.max_num_dpp;
2676+
2677+ for (i = 0; i < dcn3_0_ip.max_num_dpp; i++)
2678+ if (pipe_fuses & 1 << i)
2679+ num_pipes--;
2680+
2681+ dcn3_0_ip.max_num_dpp = num_pipes;
2682+ dcn3_0_ip.max_num_otg = num_pipes;
2683+
26532684 dml_init_instance(&dc->dml, &dcn3_0_soc, &dcn3_0_ip, DML_PROJECT_DCN30);
26542685
26552686 /* IRQ */
drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c+95−1
@@ -1619,12 +1619,106 @@ static void dcn301_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *b · 1618 unmodified lines
16191619 dml_init_instance(&dc->dml, &dcn3_01_soc, &dcn3_01_ip, DML_PROJECT_DCN30);
16201620 }
16211621
1622+static void calculate_wm_set_for_vlevel(
1623+ int vlevel,
1624+ struct wm_range_table_entry *table_entry,
1625+ struct dcn_watermarks *wm_set,
1626+ struct display_mode_lib *dml,
1627+ display_e2e_pipe_params_st *pipes,
1628+ int pipe_cnt)
1629+{
1630+ double dram_clock_change_latency_cached = dml->soc.dram_clock_change_latency_us;
1631+
1632+ ASSERT(vlevel < dml->soc.num_states);
1633+ /* only pipe 0 is read for voltage and dcf/soc clocks */
1634+ pipes[0].clks_cfg.voltage = vlevel;
1635+ pipes[0].clks_cfg.dcfclk_mhz = dml->soc.clock_limits[vlevel].dcfclk_mhz;
1636+ pipes[0].clks_cfg.socclk_mhz = dml->soc.clock_limits[vlevel].socclk_mhz;
1637+
1638+ dml->soc.dram_clock_change_latency_us = table_entry->pstate_latency_us;
1639+ dml->soc.sr_exit_time_us = table_entry->sr_exit_time_us;
1640+ dml->soc.sr_enter_plus_exit_time_us = table_entry->sr_enter_plus_exit_time_us;
1641+
1642+ wm_set->urgent_ns = get_wm_urgent(dml, pipes, pipe_cnt) * 1000;
1643+ wm_set->cstate_pstate.cstate_enter_plus_exit_ns = get_wm_stutter_enter_exit(dml, pipes, pipe_cnt) * 1000;
1644+ wm_set->cstate_pstate.cstate_exit_ns = get_wm_stutter_exit(dml, pipes, pipe_cnt) * 1000;
1645+ wm_set->cstate_pstate.pstate_change_ns = get_wm_dram_clock_change(dml, pipes, pipe_cnt) * 1000;
1646+ wm_set->pte_meta_urgent_ns = get_wm_memory_trip(dml, pipes, pipe_cnt) * 1000;
1647+ wm_set->frac_urg_bw_nom = get_fraction_of_urgent_bandwidth(dml, pipes, pipe_cnt) * 1000;
1648+ wm_set->frac_urg_bw_flip = get_fraction_of_urgent_bandwidth_imm_flip(dml, pipes, pipe_cnt) * 1000;
1649+ wm_set->urgent_latency_ns = get_urgent_latency(dml, pipes, pipe_cnt) * 1000;
1650+ dml->soc.dram_clock_change_latency_us = dram_clock_change_latency_cached;
1651+
1652+}
1653+
1654+static void dcn301_calculate_wm_and_dlg(
1655+ struct dc *dc, struct dc_state *context,
1656+ display_e2e_pipe_params_st *pipes,
1657+ int pipe_cnt,
1658+ int vlevel_req)
1659+{
1660+ int i, pipe_idx;
1661+ int vlevel, vlevel_max;
1662+ struct wm_range_table_entry *table_entry;
1663+ struct clk_bw_params *bw_params = dc->clk_mgr->bw_params;
1664+
1665+ ASSERT(bw_params);
1666+
1667+ vlevel_max = bw_params->clk_table.num_entries - 1;
1668+
1669+ /* WM Set D */
1670+ table_entry = &bw_params->wm_table.entries[WM_D];
1671+ if (table_entry->wm_type == WM_TYPE_RETRAINING)
1672+ vlevel = 0;
1673+ else
1674+ vlevel = vlevel_max;
1675+ calculate_wm_set_for_vlevel(vlevel, table_entry, &context->bw_ctx.bw.dcn.watermarks.d,
1676+ &context->bw_ctx.dml, pipes, pipe_cnt);
1677+ /* WM Set C */
1678+ table_entry = &bw_params->wm_table.entries[WM_C];
1679+ vlevel = min(max(vlevel_req, 2), vlevel_max);
1680+ calculate_wm_set_for_vlevel(vlevel, table_entry, &context->bw_ctx.bw.dcn.watermarks.c,
1681+ &context->bw_ctx.dml, pipes, pipe_cnt);
1682+ /* WM Set B */
1683+ table_entry = &bw_params->wm_table.entries[WM_B];
1684+ vlevel = min(max(vlevel_req, 1), vlevel_max);
1685+ calculate_wm_set_for_vlevel(vlevel, table_entry, &context->bw_ctx.bw.dcn.watermarks.b,
1686+ &context->bw_ctx.dml, pipes, pipe_cnt);
1687+
1688+ /* WM Set A */
1689+ table_entry = &bw_params->wm_table.entries[WM_A];
1690+ vlevel = min(vlevel_req, vlevel_max);
1691+ calculate_wm_set_for_vlevel(vlevel, table_entry, &context->bw_ctx.bw.dcn.watermarks.a,
1692+ &context->bw_ctx.dml, pipes, pipe_cnt);
1693+
1694+ for (i = 0, pipe_idx = 0; i < dc->res_pool->pipe_count; i++) {
1695+ if (!context->res_ctx.pipe_ctx[i].stream)
1696+ continue;
1697+
1698+ pipes[pipe_idx].clks_cfg.dispclk_mhz = get_dispclk_calculated(&context->bw_ctx.dml, pipes, pipe_cnt);
1699+ pipes[pipe_idx].clks_cfg.dppclk_mhz = get_dppclk_calculated(&context->bw_ctx.dml, pipes, pipe_cnt, pipe_idx);
1700+
1701+ if (dc->config.forced_clocks) {
1702+ pipes[pipe_idx].clks_cfg.dispclk_mhz = context->bw_ctx.dml.soc.clock_limits[0].dispclk_mhz;
1703+ pipes[pipe_idx].clks_cfg.dppclk_mhz = context->bw_ctx.dml.soc.clock_limits[0].dppclk_mhz;
1704+ }
1705+ if (dc->debug.min_disp_clk_khz > pipes[pipe_idx].clks_cfg.dispclk_mhz * 1000)
1706+ pipes[pipe_idx].clks_cfg.dispclk_mhz = dc->debug.min_disp_clk_khz / 1000.0;
1707+ if (dc->debug.min_dpp_clk_khz > pipes[pipe_idx].clks_cfg.dppclk_mhz * 1000)
1708+ pipes[pipe_idx].clks_cfg.dppclk_mhz = dc->debug.min_dpp_clk_khz / 1000.0;
1709+
1710+ pipe_idx++;
1711+ }
1712+
1713+ dcn20_calculate_dlg_params(dc, context, pipes, pipe_cnt, vlevel);
1714+}
1715+
16221716 static struct resource_funcs dcn301_res_pool_funcs = {
16231717 .destroy = dcn301_destroy_resource_pool,
16241718 .link_enc_create = dcn301_link_encoder_create,
16251719 .panel_cntl_create = dcn301_panel_cntl_create,
16261720 .validate_bandwidth = dcn30_validate_bandwidth,
1627− .calculate_wm_and_dlg = dcn30_calculate_wm_and_dlg,
1721+ .calculate_wm_and_dlg = dcn301_calculate_wm_and_dlg,
16281722 .populate_dml_pipes = dcn30_populate_dml_pipes_from_context,
16291723 .acquire_idle_pipe_for_layer = dcn20_acquire_idle_pipe_for_layer,
16301724 .add_stream_to_ctx = dcn30_add_stream_to_ctx,
drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h+2−0
@@ -191,6 +191,8 @@ struct hubp_funcs { · 190 unmodified lines
191191 bool (*hubp_in_blank)(struct hubp *hubp);
192192 void (*hubp_soft_reset)(struct hubp *hubp, bool reset);
193193
194+ void (*hubp_set_flip_int)(struct hubp *hubp);
195+
194196 };
195197
196198 #endif
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c+62−6
@@ -587,6 +587,48 @@ static int smu7_force_switch_to_arbf0(struct pp_hwmgr *hwmgr) · 586 unmodified lines
587587 tmp, MC_CG_ARB_FREQ_F0);
588588 }
589589
590+static uint16_t smu7_override_pcie_speed(struct pp_hwmgr *hwmgr)
591+{
592+ struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr->adev);
593+ uint16_t pcie_gen = 0;
594+
595+ if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN4 &&
596+ adev->pm.pcie_gen_mask & CAIL_ASIC_PCIE_LINK_SPEED_SUPPORT_GEN4)
597+ pcie_gen = 3;
598+ else if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3 &&
599+ adev->pm.pcie_gen_mask & CAIL_ASIC_PCIE_LINK_SPEED_SUPPORT_GEN3)
600+ pcie_gen = 2;
601+ else if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN2 &&
602+ adev->pm.pcie_gen_mask & CAIL_ASIC_PCIE_LINK_SPEED_SUPPORT_GEN2)
603+ pcie_gen = 1;
604+ else if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN1 &&
605+ adev->pm.pcie_gen_mask & CAIL_ASIC_PCIE_LINK_SPEED_SUPPORT_GEN1)
606+ pcie_gen = 0;
607+
608+ return pcie_gen;
609+}
610+
611+static uint16_t smu7_override_pcie_width(struct pp_hwmgr *hwmgr)
612+{
613+ struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr->adev);
614+ uint16_t pcie_width = 0;
615+
616+ if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X16)
617+ pcie_width = 16;
618+ else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X12)
619+ pcie_width = 12;
620+ else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X8)
621+ pcie_width = 8;
622+ else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X4)
623+ pcie_width = 4;
624+ else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X2)
625+ pcie_width = 2;
626+ else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X1)
627+ pcie_width = 1;
628+
629+ return pcie_width;
630+}
631+
590632 static int smu7_setup_default_pcie_table(struct pp_hwmgr *hwmgr)
591633 {
592634 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
@@ -683,6 +725,11 @@ static int smu7_setup_default_pcie_table(struct pp_hwmgr *hwmgr) · 90 unmodified lines
683725 PP_Min_PCIEGen),
684726 get_pcie_lane_support(data->pcie_lane_cap,
685727 PP_Max_PCIELane));
728+
729+ if (data->pcie_dpm_key_disabled)
730+ phm_setup_pcie_table_entry(&data->dpm_table.pcie_speed_table,
731+ data->dpm_table.pcie_speed_table.count,
732+ smu7_override_pcie_speed(hwmgr), smu7_override_pcie_width(hwmgr));
686733 }
687734 return 0;
688735 }
@@ -1177,7 +1224,8 @@ static int smu7_enable_sclk_mclk_dpm(struct pp_hwmgr *hwmgr) · 488 unmodified lines
11771224 (hwmgr->chip_id == CHIP_POLARIS10) ||
11781225 (hwmgr->chip_id == CHIP_POLARIS11) ||
11791226 (hwmgr->chip_id == CHIP_POLARIS12) ||
1180− (hwmgr->chip_id == CHIP_TONGA))
1227+ (hwmgr->chip_id == CHIP_TONGA) ||
1228+ (hwmgr->chip_id == CHIP_TOPAZ))
11811229 PHM_WRITE_FIELD(hwmgr->device, MC_SEQ_CNTL_3, CAC_EN, 0x1);
11821230
11831231
@@ -1248,6 +1296,13 @@ static int smu7_start_dpm(struct pp_hwmgr *hwmgr) · 64 unmodified lines
12481296 NULL)),
12491297 "Failed to enable pcie DPM during DPM Start Function!",
12501298 return -EINVAL);
1299+ } else {
1300+ PP_ASSERT_WITH_CODE(
1301+ (0 == smum_send_msg_to_smc(hwmgr,
1302+ PPSMC_MSG_PCIeDPM_Disable,
1303+ NULL)),
1304+ "Failed to disble pcie DPM during DPM Start Function!",
1305+ return -EINVAL);
12511306 }
12521307
12531308 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
@@ -3276,7 +3331,8 @@ static int smu7_apply_state_adjust_rules(struct pp_hwmgr *hwmgr, · 2022 unmodified lines
32763331
32773332 disable_mclk_switching_for_display = ((1 < hwmgr->display_config->num_display) &&
32783333 !hwmgr->display_config->multi_monitor_in_sync) ||
3279− smu7_vblank_too_short(hwmgr, hwmgr->display_config->min_vblank_time);
3334+ (hwmgr->display_config->num_display &&
3335+ smu7_vblank_too_short(hwmgr, hwmgr->display_config->min_vblank_time));
32803336
32813337 disable_mclk_switching = disable_mclk_switching_for_frame_lock ||
32823338 disable_mclk_switching_for_display;
@@ -5216,10 +5272,10 @@ static int smu7_set_watermarks_for_clocks_ranges(struct pp_hwmgr *hwmgr, · 1933 unmodified lines
52165272 for (j = 0; j < dep_sclk_table->count; j++) {
52175273 valid_entry = false;
52185274 for (k = 0; k < watermarks->num_wm_sets; k++) {
5219− if (dep_sclk_table->entries[i].clk / 10 >= watermarks->wm_clk_ranges[k].wm_min_eng_clk_in_khz &&
5220− dep_sclk_table->entries[i].clk / 10 < watermarks->wm_clk_ranges[k].wm_max_eng_clk_in_khz &&
5221− dep_mclk_table->entries[i].clk / 10 >= watermarks->wm_clk_ranges[k].wm_min_mem_clk_in_khz &&
5222− dep_mclk_table->entries[i].clk / 10 < watermarks->wm_clk_ranges[k].wm_max_mem_clk_in_khz) {
5275+ if (dep_sclk_table->entries[i].clk >= watermarks->wm_clk_ranges[k].wm_min_eng_clk_in_khz / 10 &&
5276+ dep_sclk_table->entries[i].clk < watermarks->wm_clk_ranges[k].wm_max_eng_clk_in_khz / 10 &&
5277+ dep_mclk_table->entries[i].clk >= watermarks->wm_clk_ranges[k].wm_min_mem_clk_in_khz / 10 &&
5278+ dep_mclk_table->entries[i].clk < watermarks->wm_clk_ranges[k].wm_max_mem_clk_in_khz / 10) {
52235279 valid_entry = true;
52245280 table->DisplayWatermark[i][j] = watermarks->wm_clk_ranges[k].wm_set_id;
52255281 break;
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c+111−11
@@ -54,6 +54,9 @@ · 53 unmodified lines
5454 #include "smuio/smuio_9_0_offset.h"
5555 #include "smuio/smuio_9_0_sh_mask.h"
5656
57+#define smnPCIE_LC_SPEED_CNTL 0x11140290
58+#define smnPCIE_LC_LINK_WIDTH_CNTL 0x11140288
59+
5760 #define HBM_MEMORY_CHANNEL_WIDTH 128
5861
5962 static const uint32_t channel_number[] = {1, 2, 0, 4, 0, 8, 0, 16, 2};
@@ -443,8 +446,7 @@ static void vega10_init_dpm_defaults(struct pp_hwmgr *hwmgr) · 383 unmodified lines
443446 if (PP_CAP(PHM_PlatformCaps_VCEDPM))
444447 data->smu_features[GNLD_DPM_VCE].supported = true;
445448
446− if (!data->registry_data.pcie_dpm_key_disabled)
447− data->smu_features[GNLD_DPM_LINK].supported = true;
449+ data->smu_features[GNLD_DPM_LINK].supported = true;
448450
449451 if (!data->registry_data.dcefclk_dpm_key_disabled)
450452 data->smu_features[GNLD_DPM_DCEFCLK].supported = true;
@@ -1505,6 +1507,55 @@ static int vega10_populate_single_lclk_level(struct pp_hwmgr *hwmgr, · 1054 unmodified lines
15051507 return 0;
15061508 }
15071509
1510+static int vega10_override_pcie_parameters(struct pp_hwmgr *hwmgr)
1511+{
1512+ struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr->adev);
1513+ struct vega10_hwmgr *data =
1514+ (struct vega10_hwmgr *)(hwmgr->backend);
1515+ uint32_t pcie_gen = 0, pcie_width = 0;
1516+ PPTable_t *pp_table = &(data->smc_state_table.pp_table);
1517+ int i;
1518+
1519+ if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN4)
1520+ pcie_gen = 3;
1521+ else if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3)
1522+ pcie_gen = 2;
1523+ else if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN2)
1524+ pcie_gen = 1;
1525+ else if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN1)
1526+ pcie_gen = 0;
1527+
1528+ if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X16)
1529+ pcie_width = 6;
1530+ else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X12)
1531+ pcie_width = 5;
1532+ else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X8)
1533+ pcie_width = 4;
1534+ else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X4)
1535+ pcie_width = 3;
1536+ else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X2)
1537+ pcie_width = 2;
1538+ else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X1)
1539+ pcie_width = 1;
1540+
1541+ for (i = 0; i < NUM_LINK_LEVELS; i++) {
1542+ if (pp_table->PcieGenSpeed[i] > pcie_gen)
1543+ pp_table->PcieGenSpeed[i] = pcie_gen;
1544+
1545+ if (pp_table->PcieLaneCount[i] > pcie_width)
1546+ pp_table->PcieLaneCount[i] = pcie_width;
1547+ }
1548+
1549+ if (data->registry_data.pcie_dpm_key_disabled) {
1550+ for (i = 0; i < NUM_LINK_LEVELS; i++) {
1551+ pp_table->PcieGenSpeed[i] = pcie_gen;
1552+ pp_table->PcieLaneCount[i] = pcie_width;
1553+ }
1554+ }
1555+
1556+ return 0;
1557+}
1558+
15081559 static int vega10_populate_smc_link_levels(struct pp_hwmgr *hwmgr)
15091560 {
15101561 int result = -1;
@@ -2556,6 +2607,11 @@ static int vega10_init_smc_table(struct pp_hwmgr *hwmgr) · 1045 unmodified lines
25562607 "Failed to initialize Link Level!",
25572608 return result);
25582609
2610+ result = vega10_override_pcie_parameters(hwmgr);
2611+ PP_ASSERT_WITH_CODE(!result,
2612+ "Failed to override pcie parameters!",
2613+ return result);
2614+
25592615 result = vega10_populate_all_graphic_levels(hwmgr);
25602616 PP_ASSERT_WITH_CODE(!result,
25612617 "Failed to initialize Graphics Level!",
@@ -2919,9 +2975,18 @@ static int vega10_start_dpm(struct pp_hwmgr *hwmgr, uint32_t bitmap) · 357 unmodified lines
29192975 }
29202976 }
29212977
2978+ if (data->registry_data.pcie_dpm_key_disabled) {
2979+ PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr,
2980+ false, data->smu_features[GNLD_DPM_LINK].smu_feature_bitmap),
2981+ "Attempt to Disable Link DPM feature Failed!", return -EINVAL);
2982+ data->smu_features[GNLD_DPM_LINK].enabled = false;
2983+ data->smu_features[GNLD_DPM_LINK].supported = false;
2984+ }
2985+
29222986 return 0;
29232987 }
29242988
2989+
29252990 static int vega10_enable_disable_PCC_limit_feature(struct pp_hwmgr *hwmgr, bool enable)
29262991 {
29272992 struct vega10_hwmgr *data = hwmgr->backend;
@@ -4536,6 +4601,24 @@ static int vega10_set_ppfeature_status(struct pp_hwmgr *hwmgr, uint64_t new_ppfe · 1608 unmodified lines
45364601 return 0;
45374602 }
45384603
4604+static int vega10_get_current_pcie_link_width_level(struct pp_hwmgr *hwmgr)
4605+{
4606+ struct amdgpu_device *adev = hwmgr->adev;
4607+
4608+ return (RREG32_PCIE(smnPCIE_LC_LINK_WIDTH_CNTL) &
4609+ PCIE_LC_LINK_WIDTH_CNTL__LC_LINK_WIDTH_RD_MASK)
4610+ >> PCIE_LC_LINK_WIDTH_CNTL__LC_LINK_WIDTH_RD__SHIFT;
4611+}
4612+
4613+static int vega10_get_current_pcie_link_speed_level(struct pp_hwmgr *hwmgr)
4614+{
4615+ struct amdgpu_device *adev = hwmgr->adev;
4616+
4617+ return (RREG32_PCIE(smnPCIE_LC_SPEED_CNTL) &
4618+ PSWUSP0_PCIE_LC_SPEED_CNTL__LC_CURRENT_DATA_RATE_MASK)
4619+ >> PSWUSP0_PCIE_LC_SPEED_CNTL__LC_CURRENT_DATA_RATE__SHIFT;
4620+}
4621+
45394622 static int vega10_print_clock_levels(struct pp_hwmgr *hwmgr,
45404623 enum pp_clock_type type, char *buf)
45414624 {
@@ -4544,8 +4627,9 @@ static int vega10_print_clock_levels(struct pp_hwmgr *hwmgr, · 2 unmodified lines
45444627 struct vega10_single_dpm_table *mclk_table = &(data->dpm_table.mem_table);
45454628 struct vega10_single_dpm_table *soc_table = &(data->dpm_table.soc_table);
45464629 struct vega10_single_dpm_table *dcef_table = &(data->dpm_table.dcef_table);
4547− struct vega10_pcie_table *pcie_table = &(data->dpm_table.pcie_table);
45484630 struct vega10_odn_clock_voltage_dependency_table *podn_vdd_dep = NULL;
4631+ uint32_t gen_speed, lane_width, current_gen_speed, current_lane_width;
4632+ PPTable_t *pptable = &(data->smc_state_table.pp_table);
45494633
45504634 int i, now, size = 0, count = 0;
45514635
@@ -4602,15 +4686,31 @@ static int vega10_print_clock_levels(struct pp_hwmgr *hwmgr, · 50 unmodified lines
46024686 "*" : "");
46034687 break;
46044688 case PP_PCIE:
4605− smum_send_msg_to_smc(hwmgr, PPSMC_MSG_GetCurrentLinkIndex, &now);
4606−
4607− for (i = 0; i < pcie_table->count; i++)
4608− size += sprintf(buf + size, "%d: %s %s\n", i,
4609− (pcie_table->pcie_gen[i] == 0) ? "2.5GT/s, x1" :
4610− (pcie_table->pcie_gen[i] == 1) ? "5.0GT/s, x16" :
4611− (pcie_table->pcie_gen[i] == 2) ? "8.0GT/s, x16" : "",
4612− (i == now) ? "*" : "");
4689+ current_gen_speed =
4690+ vega10_get_current_pcie_link_speed_level(hwmgr);
4691+ current_lane_width =
4692+ vega10_get_current_pcie_link_width_level(hwmgr);
4693+ for (i = 0; i < NUM_LINK_LEVELS; i++) {
4694+ gen_speed = pptable->PcieGenSpeed[i];
4695+ lane_width = pptable->PcieLaneCount[i];
4696+
4697+ size += sprintf(buf + size, "%d: %s %s %s\n", i,
4698+ (gen_speed == 0) ? "2.5GT/s," :
4699+ (gen_speed == 1) ? "5.0GT/s," :
4700+ (gen_speed == 2) ? "8.0GT/s," :
4701+ (gen_speed == 3) ? "16.0GT/s," : "",
4702+ (lane_width == 1) ? "x1" :
4703+ (lane_width == 2) ? "x2" :
4704+ (lane_width == 3) ? "x4" :
4705+ (lane_width == 4) ? "x8" :
4706+ (lane_width == 5) ? "x12" :
4707+ (lane_width == 6) ? "x16" : "",
4708+ (current_gen_speed == gen_speed) &&
4709+ (current_lane_width == lane_width) ?
4710+ "*" : "");
4711+ }
46134712 break;
4713+
46144714 case OD_SCLK:
46154715 if (hwmgr->od_enabled) {
46164716 size = sprintf(buf, "%s:\n", "OD_SCLK");
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c+90−0
@@ -133,6 +133,7 @@ static void vega12_set_default_registry_data(struct pp_hwmgr *hwmgr) · 132 unmodified lines
133133 data->registry_data.auto_wattman_debug = 0;
134134 data->registry_data.auto_wattman_sample_period = 100;
135135 data->registry_data.auto_wattman_threshold = 50;
136+ data->registry_data.pcie_dpm_key_disabled = !(hwmgr->feature_mask & PP_PCIE_DPM_MASK);
136137 }
137138
138139 static int vega12_set_features_platform_caps(struct pp_hwmgr *hwmgr)
@@ -481,6 +482,90 @@ static void vega12_init_dpm_state(struct vega12_dpm_state *dpm_state) · 342 unmodified lines
481482 dpm_state->hard_max_level = 0xffff;
482483 }
483484
485+static int vega12_override_pcie_parameters(struct pp_hwmgr *hwmgr)
486+{
487+ struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr->adev);
488+ struct vega12_hwmgr *data =
489+ (struct vega12_hwmgr *)(hwmgr->backend);
490+ uint32_t pcie_gen = 0, pcie_width = 0, smu_pcie_arg, pcie_gen_arg, pcie_width_arg;
491+ PPTable_t *pp_table = &(data->smc_state_table.pp_table);
492+ int i;
493+ int ret;
494+
495+ if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN4)
496+ pcie_gen = 3;
497+ else if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3)
498+ pcie_gen = 2;
499+ else if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN2)
500+ pcie_gen = 1;
501+ else if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN1)
502+ pcie_gen = 0;
503+
504+ if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X16)
505+ pcie_width = 6;
506+ else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X12)
507+ pcie_width = 5;
508+ else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X8)
509+ pcie_width = 4;
510+ else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X4)
511+ pcie_width = 3;
512+ else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X2)
513+ pcie_width = 2;
514+ else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X1)
515+ pcie_width = 1;
516+
517+ /* Bit 31:16: LCLK DPM level. 0 is DPM0, and 1 is DPM1
518+ * Bit 15:8: PCIE GEN, 0 to 3 corresponds to GEN1 to GEN4
519+ * Bit 7:0: PCIE lane width, 1 to 7 corresponds is x1 to x32
520+ */
521+ for (i = 0; i < NUM_LINK_LEVELS; i++) {
522+ pcie_gen_arg = (pp_table->PcieGenSpeed[i] > pcie_gen) ? pcie_gen :
523+ pp_table->PcieGenSpeed[i];
524+ pcie_width_arg = (pp_table->PcieLaneCount[i] > pcie_width) ? pcie_width :
525+ pp_table->PcieLaneCount[i];
526+
527+ if (pcie_gen_arg != pp_table->PcieGenSpeed[i] || pcie_width_arg !=
528+ pp_table->PcieLaneCount[i]) {
529+ smu_pcie_arg = (i << 16) | (pcie_gen_arg << 8) | pcie_width_arg;
530+ ret = smum_send_msg_to_smc_with_parameter(hwmgr,
531+ PPSMC_MSG_OverridePcieParameters, smu_pcie_arg,
532+ NULL);
533+ PP_ASSERT_WITH_CODE(!ret,
534+ "[OverridePcieParameters] Attempt to override pcie params failed!",
535+ return ret);
536+ }
537+
538+ /* update the pptable */
539+ pp_table->PcieGenSpeed[i] = pcie_gen_arg;
540+ pp_table->PcieLaneCount[i] = pcie_width_arg;
541+ }
542+
543+ /* override to the highest if it's disabled from ppfeaturmask */
544+ if (data->registry_data.pcie_dpm_key_disabled) {
545+ for (i = 0; i < NUM_LINK_LEVELS; i++) {
546+ smu_pcie_arg = (i << 16) | (pcie_gen << 8) | pcie_width;
547+ ret = smum_send_msg_to_smc_with_parameter(hwmgr,
548+ PPSMC_MSG_OverridePcieParameters, smu_pcie_arg,
549+ NULL);
550+ PP_ASSERT_WITH_CODE(!ret,
551+ "[OverridePcieParameters] Attempt to override pcie params failed!",
552+ return ret);
553+
554+ pp_table->PcieGenSpeed[i] = pcie_gen;
555+ pp_table->PcieLaneCount[i] = pcie_width;
556+ }
557+ ret = vega12_enable_smc_features(hwmgr,
558+ false,
559+ data->smu_features[GNLD_DPM_LINK].smu_feature_bitmap);
560+ PP_ASSERT_WITH_CODE(!ret,
561+ "Attempt to Disable DPM LINK Failed!",
562+ return ret);
563+ data->smu_features[GNLD_DPM_LINK].enabled = false;
564+ data->smu_features[GNLD_DPM_LINK].supported = false;
565+ }
566+ return 0;
567+}
568+
484569 static int vega12_get_number_of_dpm_level(struct pp_hwmgr *hwmgr,
485570 PPCLK_e clk_id, uint32_t *num_of_levels)
486571 {
@@ -968,6 +1053,11 @@ static int vega12_enable_dpm_tasks(struct pp_hwmgr *hwmgr) · 481 unmodified lines
9681053 "Failed to enable all smu features!",
9691054 return result);
9701055
1056+ result = vega12_override_pcie_parameters(hwmgr);
1057+ PP_ASSERT_WITH_CODE(!result,
1058+ "[EnableDPMTasks] Failed to override pcie parameters!",
1059+ return result);
1060+
9711061 tmp_result = vega12_power_control_set_level(hwmgr);
9721062 PP_ASSERT_WITH_CODE(!tmp_result,
9731063 "Failed to power control set level!",
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c+52−21
@@ -171,6 +171,7 @@ static void vega20_set_default_registry_data(struct pp_hwmgr *hwmgr) · 170 unmodified lines
171171 data->registry_data.gfxoff_controlled_by_driver = 1;
172172 data->gfxoff_allowed = false;
173173 data->counter_gfxoff = 0;
174+ data->registry_data.pcie_dpm_key_disabled = !(hwmgr->feature_mask & PP_PCIE_DPM_MASK);
174175 }
175176
176177 static int vega20_set_features_platform_caps(struct pp_hwmgr *hwmgr)
@@ -831,7 +832,9 @@ static int vega20_override_pcie_parameters(struct pp_hwmgr *hwmgr) · 654 unmodified lines
831832 struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr->adev);
832833 struct vega20_hwmgr *data =
833834 (struct vega20_hwmgr *)(hwmgr->backend);
834− uint32_t pcie_gen = 0, pcie_width = 0, smu_pcie_arg;
835+ uint32_t pcie_gen = 0, pcie_width = 0, smu_pcie_arg, pcie_gen_arg, pcie_width_arg;
836+ PPTable_t *pp_table = &(data->smc_state_table.pp_table);
837+ int i;
835838 int ret;
836839
837840 if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN4)
@@ -860,17 +863,51 @@ static int vega20_override_pcie_parameters(struct pp_hwmgr *hwmgr) · 22 unmodified lines
860863 * Bit 15:8: PCIE GEN, 0 to 3 corresponds to GEN1 to GEN4
861864 * Bit 7:0: PCIE lane width, 1 to 7 corresponds is x1 to x32
862865 */
863− smu_pcie_arg = (1 << 16) | (pcie_gen << 8) | pcie_width;
864− ret = smum_send_msg_to_smc_with_parameter(hwmgr,
865− PPSMC_MSG_OverridePcieParameters, smu_pcie_arg,
866− NULL);
867− PP_ASSERT_WITH_CODE(!ret,
868− "[OverridePcieParameters] Attempt to override pcie params failed!",
869− return ret);
866+ for (i = 0; i < NUM_LINK_LEVELS; i++) {
867+ pcie_gen_arg = (pp_table->PcieGenSpeed[i] > pcie_gen) ? pcie_gen :
868+ pp_table->PcieGenSpeed[i];
869+ pcie_width_arg = (pp_table->PcieLaneCount[i] > pcie_width) ? pcie_width :
870+ pp_table->PcieLaneCount[i];
871+
872+ if (pcie_gen_arg != pp_table->PcieGenSpeed[i] || pcie_width_arg !=
873+ pp_table->PcieLaneCount[i]) {
874+ smu_pcie_arg = (i << 16) | (pcie_gen_arg << 8) | pcie_width_arg;
875+ ret = smum_send_msg_to_smc_with_parameter(hwmgr,
876+ PPSMC_MSG_OverridePcieParameters, smu_pcie_arg,
877+ NULL);
878+ PP_ASSERT_WITH_CODE(!ret,
879+ "[OverridePcieParameters] Attempt to override pcie params failed!",
880+ return ret);
881+ }
882+
883+ /* update the pptable */
884+ pp_table->PcieGenSpeed[i] = pcie_gen_arg;
885+ pp_table->PcieLaneCount[i] = pcie_width_arg;
886+ }
887+
888+ /* override to the highest if it's disabled from ppfeaturmask */
889+ if (data->registry_data.pcie_dpm_key_disabled) {
890+ for (i = 0; i < NUM_LINK_LEVELS; i++) {
891+ smu_pcie_arg = (i << 16) | (pcie_gen << 8) | pcie_width;
892+ ret = smum_send_msg_to_smc_with_parameter(hwmgr,
893+ PPSMC_MSG_OverridePcieParameters, smu_pcie_arg,
894+ NULL);
895+ PP_ASSERT_WITH_CODE(!ret,
896+ "[OverridePcieParameters] Attempt to override pcie params failed!",
897+ return ret);
870898
871− data->pcie_parameters_override = true;
872− data->pcie_gen_level1 = pcie_gen;
873− data->pcie_width_level1 = pcie_width;
899+ pp_table->PcieGenSpeed[i] = pcie_gen;
900+ pp_table->PcieLaneCount[i] = pcie_width;
901+ }
902+ ret = vega20_enable_smc_features(hwmgr,
903+ false,
904+ data->smu_features[GNLD_DPM_LINK].smu_feature_bitmap);
905+ PP_ASSERT_WITH_CODE(!ret,
906+ "Attempt to Disable DPM LINK Failed!",
907+ return ret);
908+ data->smu_features[GNLD_DPM_LINK].enabled = false;
909+ data->smu_features[GNLD_DPM_LINK].supported = false;
910+ }
874911
875912 return 0;
876913 }
@@ -3319,9 +3356,7 @@ static int vega20_print_clock_levels(struct pp_hwmgr *hwmgr, · 2442 unmodified lines
33193356 data->od8_settings.od8_settings_array;
33203357 OverDriveTable_t *od_table =
33213358 &(data->smc_state_table.overdrive_table);
3322− struct phm_ppt_v3_information *pptable_information =
3323− (struct phm_ppt_v3_information *)hwmgr->pptable;
3324− PPTable_t *pptable = (PPTable_t *)pptable_information->smc_pptable;
3359+ PPTable_t *pptable = &(data->smc_state_table.pp_table);
33253360 struct pp_clock_levels_with_latency clocks;
33263361 struct vega20_single_dpm_table *fclk_dpm_table =
33273362 &(data->dpm_table.fclk_table);
@@ -3420,13 +3455,9 @@ static int vega20_print_clock_levels(struct pp_hwmgr *hwmgr, · 92 unmodified lines
34203455 current_lane_width =
34213456 vega20_get_current_pcie_link_width_level(hwmgr);
34223457 for (i = 0; i < NUM_LINK_LEVELS; i++) {
3423− if (i == 1 && data->pcie_parameters_override) {
3424− gen_speed = data->pcie_gen_level1;
3425− lane_width = data->pcie_width_level1;
3426− } else {
3427− gen_speed = pptable->PcieGenSpeed[i];
3428− lane_width = pptable->PcieLaneCount[i];
3429− }
3458+ gen_speed = pptable->PcieGenSpeed[i];
3459+ lane_width = pptable->PcieLaneCount[i];
3460+
34303461 size += sprintf(buf + size, "%d: %s %s %dMhz %s\n", i,
34313462 (gen_speed == 0) ? "2.5GT/s," :
34323463 (gen_speed == 1) ? "5.0GT/s," :
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c+3−2
@@ -1294,7 +1294,7 @@ static int smu_disable_dpms(struct smu_context *smu) · 1293 unmodified lines
12941294 bool use_baco = !smu->is_apu &&
12951295 ((amdgpu_in_reset(adev) &&
12961296 (amdgpu_asic_reset_method(adev) == AMD_RESET_METHOD_BACO)) ||
1297− ((adev->in_runpm || adev->in_hibernate) && amdgpu_asic_supports_baco(adev)));
1297+ ((adev->in_runpm || adev->in_s4) && amdgpu_asic_supports_baco(adev)));
12981298
12991299 /*
13001300 * For custom pptable uploading, skip the DPM features
@@ -1431,7 +1431,8 @@ static int smu_suspend(void *handle) · 130 unmodified lines
14311431
14321432 smu->watermarks_bitmap &= ~(WATERMARKS_LOADED);
14331433
1434− if (smu->is_apu)
1434+ /* skip CGPG when in S0ix */
1435+ if (smu->is_apu && !adev->in_s0ix)
14351436 smu_set_gfx_cgpg(&adev->smu, false);
14361437
14371438 return 0;
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c+5−0
@@ -384,10 +384,15 @@ static int vangogh_dpm_set_jpeg_enable(struct smu_context *smu, bool enable) · 383 unmodified lines
384384
385385 static bool vangogh_is_dpm_running(struct smu_context *smu)
386386 {
387+ struct amdgpu_device *adev = smu->adev;
387388 int ret = 0;
388389 uint32_t feature_mask[2];
389390 uint64_t feature_enabled;
390391
392+ /* we need to re-init after suspend so return false */
393+ if (adev->in_suspend)
394+ return false;
395+
391396 ret = smu_cmn_get_enabled_32_bits_mask(smu, feature_mask, 2);
392397
393398 if (ret)
drivers/gpu/drm/drm_fb_helper.c+1−1
@@ -2048,7 +2048,7 @@ static void drm_fbdev_cleanup(struct drm_fb_helper *fb_helper) · 2047 unmodified lines
20482048
20492049 if (shadow)
20502050 vfree(shadow);
2051− else
2051+ else if (fb_helper->buffer)
20522052 drm_client_buffer_vunmap(fb_helper->buffer);
20532053
20542054 drm_client_framebuffer_delete(fb_helper->buffer);
drivers/gpu/drm/drm_gem_shmem_helper.c+22−10
@@ -357,13 +357,14 @@ static void drm_gem_shmem_vunmap_locked(struct drm_gem_shmem_object *shmem, · 356 unmodified lines
357357 if (--shmem->vmap_use_count > 0)
358358 return;
359359
360− if (obj->import_attach)
360+ if (obj->import_attach) {
361361 dma_buf_vunmap(obj->import_attach->dmabuf, map);
362− else
362+ } else {
363363 vunmap(shmem->vaddr);
364+ drm_gem_shmem_put_pages(shmem);
365+ }
364366
365367 shmem->vaddr = NULL;
366− drm_gem_shmem_put_pages(shmem);
367368 }
368369
369370 /*
@@ -525,14 +526,28 @@ static vm_fault_t drm_gem_shmem_fault(struct vm_fault *vmf) · 155 unmodified lines
525526 struct drm_gem_object *obj = vma->vm_private_data;
526527 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj);
527528 loff_t num_pages = obj->size >> PAGE_SHIFT;
529+ vm_fault_t ret;
528530 struct page *page;
531+ pgoff_t page_offset;
529532
530− if (vmf->pgoff >= num_pages || WARN_ON_ONCE(!shmem->pages))
531− return VM_FAULT_SIGBUS;
533+ /* We don't use vmf->pgoff since that has the fake offset */
534+ page_offset = (vmf->address - vma->vm_start) >> PAGE_SHIFT;
532535
533− page = shmem->pages[vmf->pgoff];
536+ mutex_lock(&shmem->pages_lock);
534537
535− return vmf_insert_page(vma, vmf->address, page);
538+ if (page_offset >= num_pages ||
539+ WARN_ON_ONCE(!shmem->pages) ||
540+ shmem->madv < 0) {
541+ ret = VM_FAULT_SIGBUS;
542+ } else {
543+ page = shmem->pages[page_offset];
544+
545+ ret = vmf_insert_page(vma, vmf->address, page);
546+ }
547+
548+ mutex_unlock(&shmem->pages_lock);
549+
550+ return ret;
536551 }
537552
538553 static void drm_gem_shmem_vm_open(struct vm_area_struct *vma)
@@ -581,9 +596,6 @@ int drm_gem_shmem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma) · 42 unmodified lines
581596 struct drm_gem_shmem_object *shmem;
582597 int ret;
583598
584− /* Remove the fake offset */
585− vma->vm_pgoff -= drm_vma_node_start(&obj->vma_node);
586−
587599 if (obj->import_attach) {
588600 /* Drop the reference drm_gem_mmap_obj() acquired.*/
589601 drm_gem_object_put(obj);
drivers/gpu/drm/drm_ioc32.c+11−0
@@ -99,6 +99,8 @@ static int compat_drm_version(struct file *file, unsigned int cmd, · 98 unmodified lines
9999 if (copy_from_user(&v32, (void __user *)arg, sizeof(v32)))
100100 return -EFAULT;
101101
102+ memset(&v, 0, sizeof(v));
103+
102104 v = (struct drm_version) {
103105 .name_len = v32.name_len,
104106 .name = compat_ptr(v32.name),
@@ -137,6 +139,9 @@ static int compat_drm_getunique(struct file *file, unsigned int cmd, · 32 unmodified lines
137139
138140 if (copy_from_user(&uq32, (void __user *)arg, sizeof(uq32)))
139141 return -EFAULT;
142+
143+ memset(&uq, 0, sizeof(uq));
144+
140145 uq = (struct drm_unique){
141146 .unique_len = uq32.unique_len,
142147 .unique = compat_ptr(uq32.unique),
@@ -265,6 +270,8 @@ static int compat_drm_getclient(struct file *file, unsigned int cmd, · 122 unmodified lines
265270 if (copy_from_user(&c32, argp, sizeof(c32)))
266271 return -EFAULT;
267272
273+ memset(&client, 0, sizeof(client));
274+
268275 client.idx = c32.idx;
269276
270277 err = drm_ioctl_kernel(file, drm_getclient, &client, 0);
@@ -852,6 +859,8 @@ static int compat_drm_wait_vblank(struct file *file, unsigned int cmd, · 581 unmodified lines
852859 if (copy_from_user(&req32, argp, sizeof(req32)))
853860 return -EFAULT;
854861
862+ memset(&req, 0, sizeof(req));
863+
855864 req.request.type = req32.request.type;
856865 req.request.sequence = req32.request.sequence;
857866 req.request.signal = req32.request.signal;
@@ -889,6 +898,8 @@ static int compat_drm_mode_addfb2(struct file *file, unsigned int cmd, · 31 unmodified lines
889898 struct drm_mode_fb_cmd2 req64;
890899 int err;
891900
901+ memset(&req64, 0, sizeof(req64));
902+
892903 if (copy_from_user(&req64, argp,
893904 offsetof(drm_mode_fb_cmd232_t, modifier)))
894905 return -EFAULT;
drivers/gpu/drm/etnaviv/etnaviv_gem.c+2−1
@@ -689,7 +689,8 @@ static int etnaviv_gem_userptr_get_pages(struct etnaviv_gem_object *etnaviv_obj) · 688 unmodified lines
689689 struct page **pages = pvec + pinned;
690690
691691 ret = pin_user_pages_fast(ptr, num_pages,
692− !userptr->ro ? FOLL_WRITE : 0, pages);
692+ FOLL_WRITE | FOLL_FORCE | FOLL_LONGTERM,
693+ pages);
693694 if (ret < 0) {
694695 unpin_user_pages(pvec, pinned);
695696 kvfree(pvec);
drivers/gpu/drm/exynos/exynos5433_drm_decon.c+0−1
@@ -13,7 +13,6 @@ · 12 unmodified lines
1313 #include <linux/irq.h>
1414 #include <linux/mfd/syscon.h>
1515 #include <linux/of_device.h>
16−#include <linux/of_gpio.h>
1716 #include <linux/platform_device.h>
1817 #include <linux/pm_runtime.h>
1918 #include <linux/regmap.h>
drivers/gpu/drm/i915/display/intel_acpi.c+20−2
@@ -84,13 +84,31 @@ static void intel_dsm_platform_mux_info(acpi_handle dhandle) · 83 unmodified lines
8484 return;
8585 }
8686
87+ if (!pkg->package.count) {
88+ DRM_DEBUG_DRIVER("no connection in _DSM\n");
89+ return;
90+ }
91+
8792 connector_count = &pkg->package.elements[0];
8893 DRM_DEBUG_DRIVER("MUX info connectors: %lld\n",
8994 (unsigned long long)connector_count->integer.value);
9095 for (i = 1; i < pkg->package.count; i++) {
9196 union acpi_object *obj = &pkg->package.elements[i];
92− union acpi_object *connector_id = &obj->package.elements[0];
93− union acpi_object *info = &obj->package.elements[1];
97+ union acpi_object *connector_id;
98+ union acpi_object *info;
99+
100+ if (obj->type != ACPI_TYPE_PACKAGE || obj->package.count < 2) {
101+ DRM_DEBUG_DRIVER("Invalid object for MUX #%d\n", i);
102+ continue;
103+ }
104+
105+ connector_id = &obj->package.elements[0];
106+ info = &obj->package.elements[1];
107+ if (info->type != ACPI_TYPE_BUFFER || info->buffer.length < 4) {
108+ DRM_DEBUG_DRIVER("Invalid info for MUX obj #%d\n", i);
109+ continue;
110+ }
111+
94112 DRM_DEBUG_DRIVER("Connector id: 0x%016llx\n",
95113 (unsigned long long)connector_id->integer.value);
96114 DRM_DEBUG_DRIVER(" port id: %s\n",
drivers/gpu/drm/i915/display/intel_atomic_plane.c+3−2
@@ -317,12 +317,13 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_ · 316 unmodified lines
317317 if (!new_plane_state->hw.crtc && !old_plane_state->hw.crtc)
318318 return 0;
319319
320− new_crtc_state->enabled_planes |= BIT(plane->id);
321−
322320 ret = plane->check_plane(new_crtc_state, new_plane_state);
323321 if (ret)
324322 return ret;
325323
324+ if (fb)
325+ new_crtc_state->enabled_planes |= BIT(plane->id);
326+
326327 /* FIXME pre-g4x don't work like this */
327328 if (new_plane_state->uapi.visible)
328329 new_crtc_state->active_planes |= BIT(plane->id);
drivers/gpu/drm/i915/display/intel_dp.c+1−3
@@ -3619,9 +3619,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp) · 3618 unmodified lines
36193619 {
36203620 int ret;
36213621
3622− intel_dp_lttpr_init(intel_dp);
3623−
3624− if (drm_dp_read_dpcd_caps(&intel_dp->aux, intel_dp->dpcd))
3622+ if (intel_dp_init_lttpr_and_dprx_caps(intel_dp) < 0)
36253623 return false;
36263624
36273625 /*
drivers/gpu/drm/i915/display/intel_dp_aux.c+7−0
@@ -133,6 +133,7 @@ static u32 g4x_get_aux_send_ctl(struct intel_dp *intel_dp, · 132 unmodified lines
133133 else
134134 precharge = 5;
135135
136+ /* Max timeout value on G4x-BDW: 1.6ms */
136137 if (IS_BROADWELL(dev_priv))
137138 timeout = DP_AUX_CH_CTL_TIME_OUT_600us;
138139 else
@@ -159,6 +160,12 @@ static u32 skl_get_aux_send_ctl(struct intel_dp *intel_dp, · 20 unmodified lines
159160 enum phy phy = intel_port_to_phy(i915, dig_port->base.port);
160161 u32 ret;
161162
163+ /*
164+ * Max timeout values:
165+ * SKL-GLK: 1.6ms
166+ * CNL: 3.2ms
167+ * ICL+: 4ms
168+ */
162169 ret = DP_AUX_CH_CTL_SEND_BUSY |
163170 DP_AUX_CH_CTL_DONE |
164171 DP_AUX_CH_CTL_INTERRUPT |
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c+0−1
@@ -646,7 +646,6 @@ int intel_dp_aux_init_backlight_funcs(struct intel_connector *connector) · 645 unmodified lines
646646 break;
647647 case INTEL_BACKLIGHT_DISPLAY_DDI:
648648 try_intel_interface = true;
649− try_vesa_interface = true;
650649 break;
651650 default:
652651 return -ENODEV;
drivers/gpu/drm/i915/display/intel_dp_link_training.c+58−17
@@ -34,6 +34,11 @@ intel_dp_dump_link_status(const u8 link_status[DP_LINK_STATUS_SIZE]) · 33 unmodified lines
3434 link_status[3], link_status[4], link_status[5]);
3535 }
3636
37+static void intel_dp_reset_lttpr_common_caps(struct intel_dp *intel_dp)
38+{
39+ memset(&intel_dp->lttpr_common_caps, 0, sizeof(intel_dp->lttpr_common_caps));
40+}
41+
3742 static void intel_dp_reset_lttpr_count(struct intel_dp *intel_dp)
3843 {
3944 intel_dp->lttpr_common_caps[DP_PHY_REPEATER_CNT -
@@ -81,19 +86,36 @@ static void intel_dp_read_lttpr_phy_caps(struct intel_dp *intel_dp, · 41 unmodified lines
8186
8287 static bool intel_dp_read_lttpr_common_caps(struct intel_dp *intel_dp)
8388 {
84− if (drm_dp_read_lttpr_common_caps(&intel_dp->aux,
85− intel_dp->lttpr_common_caps) < 0) {
86− memset(intel_dp->lttpr_common_caps, 0,
87− sizeof(intel_dp->lttpr_common_caps));
89+ struct drm_i915_private *i915 = dp_to_i915(intel_dp);
90+
91+ if (intel_dp_is_edp(intel_dp))
8892 return false;
89− }
93+
94+ /*
95+ * Detecting LTTPRs must be avoided on platforms with an AUX timeout
96+ * period < 3.2ms. (see DP Standard v2.0, 2.11.2, 3.6.6.1).
97+ */
98+ if (INTEL_GEN(i915) < 10)
99+ return false;
100+
101+ if (drm_dp_read_lttpr_common_caps(&intel_dp->aux,
102+ intel_dp->lttpr_common_caps) < 0)
103+ goto reset_caps;
90104
91105 drm_dbg_kms(&dp_to_i915(intel_dp)->drm,
92106 "LTTPR common capabilities: %*ph\n",
93107 (int)sizeof(intel_dp->lttpr_common_caps),
94108 intel_dp->lttpr_common_caps);
95109
110+ /* The minimum value of LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV is 1.4 */
111+ if (intel_dp->lttpr_common_caps[0] < 0x14)
112+ goto reset_caps;
113+
96114 return true;
115+
116+reset_caps:
117+ intel_dp_reset_lttpr_common_caps(intel_dp);
118+ return false;
97119 }
98120
99121 static bool
@@ -106,33 +128,49 @@ intel_dp_set_lttpr_transparent_mode(struct intel_dp *intel_dp, bool enable) · 6 unmodified lines
106128 }
107129
108130 /**
109− * intel_dp_lttpr_init - detect LTTPRs and init the LTTPR link training mode
131+ * intel_dp_init_lttpr_and_dprx_caps - detect LTTPR and DPRX caps, init the LTTPR link training mode
110132 * @intel_dp: Intel DP struct
111133 *
112− * Read the LTTPR common capabilities, switch to non-transparent link training
113− * mode if any is detected and read the PHY capabilities for all detected
114− * LTTPRs. In case of an LTTPR detection error or if the number of
134+ * Read the LTTPR common and DPRX capabilities and switch to non-transparent
135+ * link training mode if any is detected and read the PHY capabilities for all
136+ * detected LTTPRs. In case of an LTTPR detection error or if the number of
115137 * LTTPRs is more than is supported (8), fall back to the no-LTTPR,
116138 * transparent mode link training mode.
117139 *
118140 * Returns:
119− * >0 if LTTPRs were detected and the non-transparent LT mode was set
141+ * >0 if LTTPRs were detected and the non-transparent LT mode was set. The
142+ * DPRX capabilities are read out.
120143 * 0 if no LTTPRs or more than 8 LTTPRs were detected or in case of a
121− * detection failure and the transparent LT mode was set
144+ * detection failure and the transparent LT mode was set. The DPRX
145+ * capabilities are read out.
146+ * <0 Reading out the DPRX capabilities failed.
122147 */
123−int intel_dp_lttpr_init(struct intel_dp *intel_dp)
148+int intel_dp_init_lttpr_and_dprx_caps(struct intel_dp *intel_dp)
124149 {
125150 int lttpr_count;
126151 bool ret;
127152 int i;
128153
129− if (intel_dp_is_edp(intel_dp))
130− return 0;
131−
132154 ret = intel_dp_read_lttpr_common_caps(intel_dp);
155+
156+ /* The DPTX shall read the DPRX caps after LTTPR detection. */
157+ if (drm_dp_read_dpcd_caps(&intel_dp->aux, intel_dp->dpcd)) {
158+ intel_dp_reset_lttpr_common_caps(intel_dp);
159+ return -EIO;
160+ }
161+
133162 if (!ret)
134163 return 0;
135164
165+ /*
166+ * The 0xF0000-0xF02FF range is only valid if the DPCD revision is
167+ * at least 1.4.
168+ */
169+ if (intel_dp->dpcd[DP_DPCD_REV] < 0x14) {
170+ intel_dp_reset_lttpr_common_caps(intel_dp);
171+ return 0;
172+ }
173+
136174 lttpr_count = drm_dp_lttpr_count(intel_dp->lttpr_common_caps);
137175 /*
138176 * Prevent setting LTTPR transparent mode explicitly if no LTTPRs are
@@ -172,7 +210,7 @@ int intel_dp_lttpr_init(struct intel_dp *intel_dp) · 33 unmodified lines
172210
173211 return lttpr_count;
174212 }
175−EXPORT_SYMBOL(intel_dp_lttpr_init);
213+EXPORT_SYMBOL(intel_dp_init_lttpr_and_dprx_caps);
176214
177215 static u8 dp_voltage_max(u8 preemph)
178216 {
@@ -807,7 +845,10 @@ void intel_dp_start_link_train(struct intel_dp *intel_dp, · 628 unmodified lines
807845 * TODO: Reiniting LTTPRs here won't be needed once proper connector
808846 * HW state readout is added.
809847 */
810− int lttpr_count = intel_dp_lttpr_init(intel_dp);
848+ int lttpr_count = intel_dp_init_lttpr_and_dprx_caps(intel_dp);
849+
850+ if (lttpr_count < 0)
851+ return;
811852
812853 if (!intel_dp_link_train_all_phys(intel_dp, crtc_state, lttpr_count))
813854 intel_dp_schedule_fallback_link_training(intel_dp, crtc_state);
drivers/gpu/drm/i915/display/intel_dp_link_training.h+1−1
@@ -11,7 +11,7 @@ · 10 unmodified lines
1111 struct intel_crtc_state;
1212 struct intel_dp;
1313
14−int intel_dp_lttpr_init(struct intel_dp *intel_dp);
14+int intel_dp_init_lttpr_and_dprx_caps(struct intel_dp *intel_dp);
1515
1616 void intel_dp_get_adjust_train(struct intel_dp *intel_dp,
1717 const struct intel_crtc_state *crtc_state,
drivers/gpu/drm/i915/display/intel_vdsc.c+2−8
@@ -1014,20 +1014,14 @@ static i915_reg_t dss_ctl1_reg(const struct intel_crtc_state *crtc_state) · 1013 unmodified lines
10141014 {
10151015 enum pipe pipe = to_intel_crtc(crtc_state->uapi.crtc)->pipe;
10161016
1017− if (crtc_state->cpu_transcoder == TRANSCODER_EDP)
1018− return DSS_CTL1;
1019−
1020− return ICL_PIPE_DSS_CTL1(pipe);
1017+ return is_pipe_dsc(crtc_state) ? ICL_PIPE_DSS_CTL1(pipe) : DSS_CTL1;
10211018 }
10221019
10231020 static i915_reg_t dss_ctl2_reg(const struct intel_crtc_state *crtc_state)
10241021 {
10251022 enum pipe pipe = to_intel_crtc(crtc_state->uapi.crtc)->pipe;
10261023
1027− if (crtc_state->cpu_transcoder == TRANSCODER_EDP)
1028− return DSS_CTL2;
1029−
1030− return ICL_PIPE_DSS_CTL2(pipe);
1024+ return is_pipe_dsc(crtc_state) ? ICL_PIPE_DSS_CTL2(pipe) : DSS_CTL2;
10311025 }
10321026
10331027 void intel_dsc_enable(struct intel_encoder *encoder,
drivers/gpu/drm/i915/display/vlv_dsi.c+2−2
@@ -992,14 +992,14 @@ static void intel_dsi_post_disable(struct intel_atomic_state *state, · 991 unmodified lines
992992 * FIXME As we do with eDP, just make a note of the time here
993993 * and perform the wait before the next panel power on.
994994 */
995− intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
995+ msleep(intel_dsi->panel_pwr_cycle_delay);
996996 }
997997
998998 static void intel_dsi_shutdown(struct intel_encoder *encoder)
999999 {
10001000 struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
10011001
1002− intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
1002+ msleep(intel_dsi->panel_pwr_cycle_delay);
10031003 }
10041004
10051005 static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
drivers/gpu/drm/i915/gt/intel_engine_cs.c+6−1
@@ -713,9 +713,12 @@ static int engine_setup_common(struct intel_engine_cs *engine) · 712 unmodified lines
713713 goto err_status;
714714 }
715715
716+ err = intel_engine_init_cmd_parser(engine);
717+ if (err)
718+ goto err_cmd_parser;
719+
716720 intel_engine_init_active(engine, ENGINE_PHYSICAL);
717721 intel_engine_init_execlists(engine);
718− intel_engine_init_cmd_parser(engine);
719722 intel_engine_init__pm(engine);
720723 intel_engine_init_retire(engine);
721724
@@ -732,6 +735,8 @@ static int engine_setup_common(struct intel_engine_cs *engine) · 10 unmodified lines
732735
733736 return 0;
734737
738+err_cmd_parser:
739+ intel_breadcrumbs_free(engine->breadcrumbs);
735740 err_status:
736741 cleanup_status_page(engine);
737742 return err;
drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c+12−1
@@ -316,7 +316,18 @@ void i915_vma_revoke_fence(struct i915_vma *vma) · 315 unmodified lines
316316 WRITE_ONCE(fence->vma, NULL);
317317 vma->fence = NULL;
318318
319− with_intel_runtime_pm_if_in_use(fence_to_uncore(fence)->rpm, wakeref)
319+ /*
320+ * Skip the write to HW if and only if the device is currently
321+ * suspended.
322+ *
323+ * If the driver does not currently hold a wakeref (if_in_use == 0),
324+ * the device may currently be runtime suspended, or it may be woken
325+ * up before the suspend takes place. If the device is not suspended
326+ * (powered down) and we skip clearing the fence register, the HW is
327+ * left in an undefined state where we may end up with multiple
328+ * registers overlapping.
329+ */
330+ with_intel_runtime_pm_if_active(fence_to_uncore(fence)->rpm, wakeref)
320331 fence_write(fence);
321332 }
322333
drivers/gpu/drm/i915/i915_cmd_parser.c+13−6
@@ -940,7 +940,7 @@ static void fini_hash_table(struct intel_engine_cs *engine) · 939 unmodified lines
940940 * struct intel_engine_cs based on whether the platform requires software
941941 * command parsing.
942942 */
943−void intel_engine_init_cmd_parser(struct intel_engine_cs *engine)
943+int intel_engine_init_cmd_parser(struct intel_engine_cs *engine)
944944 {
945945 const struct drm_i915_cmd_table *cmd_tables;
946946 int cmd_table_count;
@@ -948,7 +948,7 @@ void intel_engine_init_cmd_parser(struct intel_engine_cs *engine) · 1 unmodified line
948948
949949 if (!IS_GEN(engine->i915, 7) && !(IS_GEN(engine->i915, 9) &&
950950 engine->class == COPY_ENGINE_CLASS))
951− return;
951+ return 0;
952952
953953 switch (engine->class) {
954954 case RENDER_CLASS:
@@ -1013,19 +1013,19 @@ void intel_engine_init_cmd_parser(struct intel_engine_cs *engine) · 58 unmodified lines
10131013 break;
10141014 default:
10151015 MISSING_CASE(engine->class);
1016− return;
1016+ goto out;
10171017 }
10181018
10191019 if (!validate_cmds_sorted(engine, cmd_tables, cmd_table_count)) {
10201020 drm_err(&engine->i915->drm,
10211021 "%s: command descriptions are not sorted\n",
10221022 engine->name);
1023− return;
1023+ goto out;
10241024 }
10251025 if (!validate_regs_sorted(engine)) {
10261026 drm_err(&engine->i915->drm,
10271027 "%s: registers are not sorted\n", engine->name);
1028− return;
1028+ goto out;
10291029 }
10301030
10311031 ret = init_hash_table(engine, cmd_tables, cmd_table_count);
@@ -1033,10 +1033,17 @@ void intel_engine_init_cmd_parser(struct intel_engine_cs *engine) · 1 unmodified line
10331033 drm_err(&engine->i915->drm,
10341034 "%s: initialised failed!\n", engine->name);
10351035 fini_hash_table(engine);
1036− return;
1036+ goto out;
10371037 }
10381038
10391039 engine->flags |= I915_ENGINE_USING_CMD_PARSER;
1040+
1041+out:
1042+ if (intel_engine_requires_cmd_parser(engine) &&
1043+ !intel_engine_using_cmd_parser(engine))
1044+ return -EINVAL;
1045+
1046+ return 0;
10401047 }
10411048
10421049 /**
drivers/gpu/drm/i915/i915_drv.h+1−1
@@ -1952,7 +1952,7 @@ const char *i915_cache_level_str(struct drm_i915_private *i915, int type); · 1951 unmodified lines
19521952
19531953 /* i915_cmd_parser.c */
19541954 int i915_cmd_parser_get_version(struct drm_i915_private *dev_priv);
1955−void intel_engine_init_cmd_parser(struct intel_engine_cs *engine);
1955+int intel_engine_init_cmd_parser(struct intel_engine_cs *engine);
19561956 void intel_engine_cleanup_cmd_parser(struct intel_engine_cs *engine);
19571957 int intel_engine_cmd_parser(struct intel_engine_cs *engine,
19581958 struct i915_vma *batch,
drivers/gpu/drm/i915/i915_perf.c+5−8
@@ -603,7 +603,6 @@ static int append_oa_sample(struct i915_perf_stream *stream, · 602 unmodified lines
603603 {
604604 int report_size = stream->oa_buffer.format_size;
605605 struct drm_i915_perf_record_header header;
606− u32 sample_flags = stream->sample_flags;
607606
608607 header.type = DRM_I915_PERF_RECORD_SAMPLE;
609608 header.pad = 0;
@@ -617,10 +616,8 @@ static int append_oa_sample(struct i915_perf_stream *stream, · 7 unmodified lines
617616 return -EFAULT;
618617 buf += sizeof(header);
619618
620− if (sample_flags & SAMPLE_OA_REPORT) {
621− if (copy_to_user(buf, report, report_size))
622− return -EFAULT;
623− }
619+ if (copy_to_user(buf, report, report_size))
620+ return -EFAULT;
624621
625622 (*offset) += header.size;
626623
@@ -2682,7 +2679,7 @@ static void i915_oa_stream_enable(struct i915_perf_stream *stream) · 2055 unmodified lines
26822679
26832680 stream->perf->ops.oa_enable(stream);
26842681
2685− if (stream->periodic)
2682+ if (stream->sample_flags & SAMPLE_OA_REPORT)
26862683 hrtimer_start(&stream->poll_check_timer,
26872684 ns_to_ktime(stream->poll_oa_period),
26882685 HRTIMER_MODE_REL_PINNED);
@@ -2745,7 +2742,7 @@ static void i915_oa_stream_disable(struct i915_perf_stream *stream) · 56 unmodified lines
27452742 {
27462743 stream->perf->ops.oa_disable(stream);
27472744
2748− if (stream->periodic)
2745+ if (stream->sample_flags & SAMPLE_OA_REPORT)
27492746 hrtimer_cancel(&stream->poll_check_timer);
27502747 }
27512748
@@ -3028,7 +3025,7 @@ static ssize_t i915_perf_read(struct file *file, · 276 unmodified lines
30283025 * disabled stream as an error. In particular it might otherwise lead
30293026 * to a deadlock for blocking file descriptors...
30303027 */
3031− if (!stream->enabled)
3028+ if (!stream->enabled || !(stream->sample_flags & SAMPLE_OA_REPORT))
30323029 return -EIO;
30333030
30343031 if (!(file->f_flags & O_NONBLOCK)) {
drivers/gpu/drm/i915/i915_reg.h+22−1
@@ -3316,7 +3316,18 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg) · 3315 unmodified lines
33163316
33173317 #define ILK_DISPLAY_CHICKEN1 _MMIO(0x42000)
33183318 #define ILK_FBCQ_DIS (1 << 22)
3319−#define ILK_PABSTRETCH_DIS (1 << 21)
3319+#define ILK_PABSTRETCH_DIS REG_BIT(21)
3320+#define ILK_SABSTRETCH_DIS REG_BIT(20)
3321+#define IVB_PRI_STRETCH_MAX_MASK REG_GENMASK(21, 20)
3322+#define IVB_PRI_STRETCH_MAX_X8 REG_FIELD_PREP(IVB_PRI_STRETCH_MAX_MASK, 0)
3323+#define IVB_PRI_STRETCH_MAX_X4 REG_FIELD_PREP(IVB_PRI_STRETCH_MAX_MASK, 1)
3324+#define IVB_PRI_STRETCH_MAX_X2 REG_FIELD_PREP(IVB_PRI_STRETCH_MAX_MASK, 2)
3325+#define IVB_PRI_STRETCH_MAX_X1 REG_FIELD_PREP(IVB_PRI_STRETCH_MAX_MASK, 3)
3326+#define IVB_SPR_STRETCH_MAX_MASK REG_GENMASK(19, 18)
3327+#define IVB_SPR_STRETCH_MAX_X8 REG_FIELD_PREP(IVB_SPR_STRETCH_MAX_MASK, 0)
3328+#define IVB_SPR_STRETCH_MAX_X4 REG_FIELD_PREP(IVB_SPR_STRETCH_MAX_MASK, 1)
3329+#define IVB_SPR_STRETCH_MAX_X2 REG_FIELD_PREP(IVB_SPR_STRETCH_MAX_MASK, 2)
3330+#define IVB_SPR_STRETCH_MAX_X1 REG_FIELD_PREP(IVB_SPR_STRETCH_MAX_MASK, 3)
33203331
33213332
33223333 /*
@@ -8039,6 +8050,16 @@ enum { · 4716 unmodified lines
80398050
80408051 #define _CHICKEN_PIPESL_1_A 0x420b0
80418052 #define _CHICKEN_PIPESL_1_B 0x420b4
8053+#define HSW_PRI_STRETCH_MAX_MASK REG_GENMASK(28, 27)
8054+#define HSW_PRI_STRETCH_MAX_X8 REG_FIELD_PREP(HSW_PRI_STRETCH_MAX_MASK, 0)
8055+#define HSW_PRI_STRETCH_MAX_X4 REG_FIELD_PREP(HSW_PRI_STRETCH_MAX_MASK, 1)
8056+#define HSW_PRI_STRETCH_MAX_X2 REG_FIELD_PREP(HSW_PRI_STRETCH_MAX_MASK, 2)
8057+#define HSW_PRI_STRETCH_MAX_X1 REG_FIELD_PREP(HSW_PRI_STRETCH_MAX_MASK, 3)
8058+#define HSW_SPR_STRETCH_MAX_MASK REG_GENMASK(26, 25)
8059+#define HSW_SPR_STRETCH_MAX_X8 REG_FIELD_PREP(HSW_SPR_STRETCH_MAX_MASK, 0)
8060+#define HSW_SPR_STRETCH_MAX_X4 REG_FIELD_PREP(HSW_SPR_STRETCH_MAX_MASK, 1)
8061+#define HSW_SPR_STRETCH_MAX_X2 REG_FIELD_PREP(HSW_SPR_STRETCH_MAX_MASK, 2)
8062+#define HSW_SPR_STRETCH_MAX_X1 REG_FIELD_PREP(HSW_SPR_STRETCH_MAX_MASK, 3)
80428063 #define HSW_FBCQ_DIS (1 << 22)
80438064 #define BDW_DPRS_MASK_VBLANK_SRD (1 << 0)
80448065 #define CHICKEN_PIPESL_1(pipe) _MMIO_PIPE(pipe, _CHICKEN_PIPESL_1_A, _CHICKEN_PIPESL_1_B)
drivers/gpu/drm/i915/intel_pm.c+17−3
@@ -5471,12 +5471,12 @@ static int icl_build_plane_wm(struct intel_crtc_state *crtc_state, · 5470 unmodified lines
54715471 struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id];
54725472 int ret;
54735473
5474− memset(wm, 0, sizeof(*wm));
5475−
54765474 /* Watermarks calculated in master */
54775475 if (plane_state->planar_slave)
54785476 return 0;
54795477
5478+ memset(wm, 0, sizeof(*wm));
5479+
54805480 if (plane_state->planar_linked_plane) {
54815481 const struct drm_framebuffer *fb = plane_state->hw.fb;
54825482 enum plane_id y_plane_id = plane_state->planar_linked_plane->id;
@@ -7245,11 +7245,16 @@ static void bdw_init_clock_gating(struct drm_i915_private *dev_priv) · 1762 unmodified lines
72457245 intel_uncore_write(&dev_priv->uncore, CHICKEN_PAR1_1,
72467246 intel_uncore_read(&dev_priv->uncore, CHICKEN_PAR1_1) | DPA_MASK_VBLANK_SRD);
72477247
7248− /* WaPsrDPRSUnmaskVBlankInSRD:bdw */
72497248 for_each_pipe(dev_priv, pipe) {
7249+ /* WaPsrDPRSUnmaskVBlankInSRD:bdw */
72507250 intel_uncore_write(&dev_priv->uncore, CHICKEN_PIPESL_1(pipe),
72517251 intel_uncore_read(&dev_priv->uncore, CHICKEN_PIPESL_1(pipe)) |
72527252 BDW_DPRS_MASK_VBLANK_SRD);
7253+
7254+ /* Undocumented but fixes async flip + VT-d corruption */
7255+ if (intel_vtd_active())
7256+ intel_uncore_rmw(&dev_priv->uncore, CHICKEN_PIPESL_1(pipe),
7257+ HSW_PRI_STRETCH_MAX_MASK, HSW_PRI_STRETCH_MAX_X1);
72537258 }
72547259
72557260 /* WaVSRefCountFullforceMissDisable:bdw */
@@ -7285,11 +7290,20 @@ static void bdw_init_clock_gating(struct drm_i915_private *dev_priv) · 29 unmodified lines
72857290
72867291 static void hsw_init_clock_gating(struct drm_i915_private *dev_priv)
72877292 {
7293+ enum pipe pipe;
7294+
72887295 /* WaFbcAsynchFlipDisableFbcQueue:hsw,bdw */
72897296 intel_uncore_write(&dev_priv->uncore, CHICKEN_PIPESL_1(PIPE_A),
72907297 intel_uncore_read(&dev_priv->uncore, CHICKEN_PIPESL_1(PIPE_A)) |
72917298 HSW_FBCQ_DIS);
72927299
7300+ for_each_pipe(dev_priv, pipe) {
7301+ /* Undocumented but fixes async flip + VT-d corruption */
7302+ if (intel_vtd_active())
7303+ intel_uncore_rmw(&dev_priv->uncore, CHICKEN_PIPESL_1(pipe),
7304+ HSW_PRI_STRETCH_MAX_MASK, HSW_PRI_STRETCH_MAX_X1);
7305+ }
7306+
72937307 /* This is required by WaCatErrorRejectionIssue:hsw */
72947308 intel_uncore_write(&dev_priv->uncore, GEN7_SQ_CHICKEN_MBCUNIT_CONFIG,
72957309 intel_uncore_read(&dev_priv->uncore, GEN7_SQ_CHICKEN_MBCUNIT_CONFIG) |
drivers/gpu/drm/i915/intel_runtime_pm.c+24−5
@@ -412,12 +412,20 @@ intel_wakeref_t intel_runtime_pm_get(struct intel_runtime_pm *rpm) · 411 unmodified lines
412412 }
413413
414414 /**
415− * intel_runtime_pm_get_if_in_use - grab a runtime pm reference if device in use
415+ * __intel_runtime_pm_get_if_active - grab a runtime pm reference if device is active
416416 * @rpm: the intel_runtime_pm structure
417+ * @ignore_usecount: get a ref even if dev->power.usage_count is 0
417418 *
418419 * This function grabs a device-level runtime pm reference if the device is
419− * already in use and ensures that it is powered up. It is illegal to try
420− * and access the HW should intel_runtime_pm_get_if_in_use() report failure.
420+ * already active and ensures that it is powered up. It is illegal to try
421+ * and access the HW should intel_runtime_pm_get_if_active() report failure.
422+ *
423+ * If @ignore_usecount=true, a reference will be acquired even if there is no
424+ * user requiring the device to be powered up (dev->power.usage_count == 0).
425+ * If the function returns false in this case then it's guaranteed that the
426+ * device's runtime suspend hook has been called already or that it will be
427+ * called (and hence it's also guaranteed that the device's runtime resume
428+ * hook will be called eventually).
421429 *
422430 * Any runtime pm reference obtained by this function must have a symmetric
423431 * call to intel_runtime_pm_put() to release the reference again.
@@ -425,7 +433,8 @@ intel_wakeref_t intel_runtime_pm_get(struct intel_runtime_pm *rpm) · 1 unmodified line
425433 * Returns: the wakeref cookie to pass to intel_runtime_pm_put(), evaluates
426434 * as True if the wakeref was acquired, or False otherwise.
427435 */
428−intel_wakeref_t intel_runtime_pm_get_if_in_use(struct intel_runtime_pm *rpm)
436+static intel_wakeref_t __intel_runtime_pm_get_if_active(struct intel_runtime_pm *rpm,
437+ bool ignore_usecount)
429438 {
430439 if (IS_ENABLED(CONFIG_PM)) {
431440 /*
@@ -434,7 +443,7 @@ intel_wakeref_t intel_runtime_pm_get_if_in_use(struct intel_runtime_pm *rpm) · 2 unmodified lines
434443 * function, since the power state is undefined. This applies
435444 * atm to the late/early system suspend/resume handlers.
436445 */
437− if (pm_runtime_get_if_in_use(rpm->kdev) <= 0)
446+ if (pm_runtime_get_if_active(rpm->kdev, ignore_usecount) <= 0)
438447 return 0;
439448 }
440449
@@ -443,6 +452,16 @@ intel_wakeref_t intel_runtime_pm_get_if_in_use(struct intel_runtime_pm *rpm) · 2 unmodified lines
443452 return track_intel_runtime_pm_wakeref(rpm);
444453 }
445454
455+intel_wakeref_t intel_runtime_pm_get_if_in_use(struct intel_runtime_pm *rpm)
456+{
457+ return __intel_runtime_pm_get_if_active(rpm, false);
458+}
459+
460+intel_wakeref_t intel_runtime_pm_get_if_active(struct intel_runtime_pm *rpm)
461+{
462+ return __intel_runtime_pm_get_if_active(rpm, true);
463+}
464+
446465 /**
447466 * intel_runtime_pm_get_noresume - grab a runtime pm reference
448467 * @rpm: the intel_runtime_pm structure
drivers/gpu/drm/i915/intel_runtime_pm.h+5−0
@@ -177,6 +177,7 @@ void intel_runtime_pm_driver_release(struct intel_runtime_pm *rpm); · 176 unmodified lines
177177
178178 intel_wakeref_t intel_runtime_pm_get(struct intel_runtime_pm *rpm);
179179 intel_wakeref_t intel_runtime_pm_get_if_in_use(struct intel_runtime_pm *rpm);
180+intel_wakeref_t intel_runtime_pm_get_if_active(struct intel_runtime_pm *rpm);
180181 intel_wakeref_t intel_runtime_pm_get_noresume(struct intel_runtime_pm *rpm);
181182 intel_wakeref_t intel_runtime_pm_get_raw(struct intel_runtime_pm *rpm);
182183
@@ -188,6 +189,10 @@ intel_wakeref_t intel_runtime_pm_get_raw(struct intel_runtime_pm *rpm); · 5 unmodified lines
188189 for ((wf) = intel_runtime_pm_get_if_in_use(rpm); (wf); \
189190 intel_runtime_pm_put((rpm), (wf)), (wf) = 0)
190191
192+#define with_intel_runtime_pm_if_active(rpm, wf) \
193+ for ((wf) = intel_runtime_pm_get_if_active(rpm); (wf); \
194+ intel_runtime_pm_put((rpm), (wf)), (wf) = 0)
195+
191196 void intel_runtime_pm_put_unchecked(struct intel_runtime_pm *rpm);
192197 #if IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)
193198 void intel_runtime_pm_put(struct intel_runtime_pm *rpm, intel_wakeref_t wref);
drivers/gpu/drm/imx/imx-drm-core.c+1−1
@@ -215,7 +215,7 @@ static int imx_drm_bind(struct device *dev) · 214 unmodified lines
215215
216216 ret = drmm_mode_config_init(drm);
217217 if (ret)
218− return ret;
218+ goto err_kms;
219219
220220 ret = drm_vblank_init(drm, MAX_CRTC);
221221 if (ret)
drivers/gpu/drm/imx/imx-ldb.c+11−1
@@ -197,6 +197,11 @@ static void imx_ldb_encoder_enable(struct drm_encoder *encoder) · 196 unmodified lines
197197 int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN;
198198 int mux = drm_of_encoder_active_port_id(imx_ldb_ch->child, encoder);
199199
200+ if (mux < 0 || mux >= ARRAY_SIZE(ldb->clk_sel)) {
201+ dev_warn(ldb->dev, "%s: invalid mux %d\n", __func__, mux);
202+ return;
203+ }
204+
200205 drm_panel_prepare(imx_ldb_ch->panel);
201206
202207 if (dual) {
@@ -255,6 +260,11 @@ imx_ldb_encoder_atomic_mode_set(struct drm_encoder *encoder, · 52 unmodified lines
255260 int mux = drm_of_encoder_active_port_id(imx_ldb_ch->child, encoder);
256261 u32 bus_format = imx_ldb_ch->bus_format;
257262
263+ if (mux < 0 || mux >= ARRAY_SIZE(ldb->clk_sel)) {
264+ dev_warn(ldb->dev, "%s: invalid mux %d\n", __func__, mux);
265+ return;
266+ }
267+
258268 if (mode->clock > 170000) {
259269 dev_warn(ldb->dev,
260270 "%s: mode exceeds 170 MHz pixel clock\n", __func__);
@@ -583,7 +593,7 @@ static int imx_ldb_bind(struct device *dev, struct device *master, void *data) · 322 unmodified lines
583593 struct imx_ldb_channel *channel = &imx_ldb->channel[i];
584594
585595 if (!channel->ldb)
586− break;
596+ continue;
587597
588598 ret = imx_ldb_register(drm, channel);
589599 if (ret)
drivers/gpu/drm/meson/meson_drv.c+11−0
@@ -482,6 +482,16 @@ static int meson_probe_remote(struct platform_device *pdev, · 481 unmodified lines
482482 return count;
483483 }
484484
485+static void meson_drv_shutdown(struct platform_device *pdev)
486+{
487+ struct meson_drm *priv = dev_get_drvdata(&pdev->dev);
488+ struct drm_device *drm = priv->drm;
489+
490+ DRM_DEBUG_DRIVER("\n");
491+ drm_kms_helper_poll_fini(drm);
492+ drm_atomic_helper_shutdown(drm);
493+}
494+
485495 static int meson_drv_probe(struct platform_device *pdev)
486496 {
487497 struct component_match *match = NULL;
@@ -553,6 +563,7 @@ static const struct dev_pm_ops meson_drv_pm_ops = { · 65 unmodified lines
553563
554564 static struct platform_driver meson_drm_platform_driver = {
555565 .probe = meson_drv_probe,
566+ .shutdown = meson_drv_shutdown,
556567 .driver = {
557568 .name = "meson-drm",
558569 .of_match_table = dt_match,
drivers/gpu/drm/msm/adreno/a5xx_gpu.c+2−2
@@ -1386,8 +1386,8 @@ static int a5xx_pm_suspend(struct msm_gpu *gpu) · 1385 unmodified lines
13861386
13871387 static int a5xx_get_timestamp(struct msm_gpu *gpu, uint64_t *value)
13881388 {
1389− *value = gpu_read64(gpu, REG_A5XX_RBBM_PERFCTR_CP_0_LO,
1390− REG_A5XX_RBBM_PERFCTR_CP_0_HI);
1389+ *value = gpu_read64(gpu, REG_A5XX_RBBM_ALWAYSON_COUNTER_LO,
1390+ REG_A5XX_RBBM_ALWAYSON_COUNTER_HI);
13911391
13921392 return 0;
13931393 }
drivers/gpu/drm/msm/adreno/a5xx_power.c+1−1
@@ -304,7 +304,7 @@ int a5xx_power_init(struct msm_gpu *gpu) · 303 unmodified lines
304304 /* Set up the limits management */
305305 if (adreno_is_a530(adreno_gpu))
306306 a530_lm_setup(gpu);
307− else
307+ else if (adreno_is_a540(adreno_gpu))
308308 a540_lm_setup(gpu);
309309
310310 /* Set up SP/TP power collpase */
drivers/gpu/drm/msm/adreno/a6xx_gmu.c+1−1
@@ -339,7 +339,7 @@ void a6xx_gmu_clear_oob(struct a6xx_gmu *gmu, enum a6xx_gmu_oob_state state) · 338 unmodified lines
339339 else
340340 bit = a6xx_gmu_oob_bits[state].ack_new;
341341
342− gmu_write(gmu, REG_A6XX_GMU_HOST2GMU_INTR_SET, bit);
342+ gmu_write(gmu, REG_A6XX_GMU_HOST2GMU_INTR_SET, 1 << bit);
343343 }
344344
345345 /* Enable CPU control of SPTP power power collapse */
drivers/gpu/drm/msm/adreno/a6xx_gpu.c+75−33
@@ -522,28 +522,73 @@ static int a6xx_cp_init(struct msm_gpu *gpu) · 521 unmodified lines
522522 return a6xx_idle(gpu, ring) ? 0 : -EINVAL;
523523 }
524524
525−static void a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu,
525+/*
526+ * Check that the microcode version is new enough to include several key
527+ * security fixes. Return true if the ucode is safe.
528+ */
529+static bool a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu,
526530 struct drm_gem_object *obj)
527531 {
532+ struct adreno_gpu *adreno_gpu = &a6xx_gpu->base;
533+ struct msm_gpu *gpu = &adreno_gpu->base;
528534 u32 *buf = msm_gem_get_vaddr(obj);
535+ bool ret = false;
529536
530537 if (IS_ERR(buf))
531− return;
538+ return false;
532539
533540 /*
534− * If the lowest nibble is 0xa that is an indication that this microcode
535− * has been patched. The actual version is in dword [3] but we only care
536− * about the patchlevel which is the lowest nibble of dword [3]
537− *
538− * Otherwise check that the firmware is greater than or equal to 1.90
539− * which was the first version that had this fix built in
541+ * Targets up to a640 (a618, a630 and a640) need to check for a
542+ * microcode version that is patched to support the whereami opcode or
543+ * one that is new enough to include it by default.
540544 */
541− if (((buf[0] & 0xf) == 0xa) && (buf[2] & 0xf) >= 1)
542− a6xx_gpu->has_whereami = true;
543− else if ((buf[0] & 0xfff) > 0x190)
544− a6xx_gpu->has_whereami = true;
545+ if (adreno_is_a618(adreno_gpu) || adreno_is_a630(adreno_gpu) ||
546+ adreno_is_a640(adreno_gpu)) {
547+ /*
548+ * If the lowest nibble is 0xa that is an indication that this
549+ * microcode has been patched. The actual version is in dword
550+ * [3] but we only care about the patchlevel which is the lowest
551+ * nibble of dword [3]
552+ *
553+ * Otherwise check that the firmware is greater than or equal
554+ * to 1.90 which was the first version that had this fix built
555+ * in
556+ */
557+ if ((((buf[0] & 0xf) == 0xa) && (buf[2] & 0xf) >= 1) ||
558+ (buf[0] & 0xfff) >= 0x190) {
559+ a6xx_gpu->has_whereami = true;
560+ ret = true;
561+ goto out;
562+ }
545563
564+ DRM_DEV_ERROR(&gpu->pdev->dev,
565+ "a630 SQE ucode is too old. Have version %x need at least %x\n",
566+ buf[0] & 0xfff, 0x190);
567+ } else {
568+ /*
569+ * a650 tier targets don't need whereami but still need to be
570+ * equal to or newer than 0.95 for other security fixes
571+ */
572+ if (adreno_is_a650(adreno_gpu)) {
573+ if ((buf[0] & 0xfff) >= 0x095) {
574+ ret = true;
575+ goto out;
576+ }
577+
578+ DRM_DEV_ERROR(&gpu->pdev->dev,
579+ "a650 SQE ucode is too old. Have version %x need at least %x\n",
580+ buf[0] & 0xfff, 0x095);
581+ }
582+
583+ /*
584+ * When a660 is added those targets should return true here
585+ * since those have all the critical security fixes built in
586+ * from the start
587+ */
588+ }
589+out:
546590 msm_gem_put_vaddr(obj);
591+ return ret;
547592 }
548593
549594 static int a6xx_ucode_init(struct msm_gpu *gpu)
@@ -566,7 +611,13 @@ static int a6xx_ucode_init(struct msm_gpu *gpu) · 16 unmodified lines
566611 }
567612
568613 msm_gem_object_set_name(a6xx_gpu->sqe_bo, "sqefw");
569− a6xx_ucode_check_version(a6xx_gpu, a6xx_gpu->sqe_bo);
614+ if (!a6xx_ucode_check_version(a6xx_gpu, a6xx_gpu->sqe_bo)) {
615+ msm_gem_unpin_iova(a6xx_gpu->sqe_bo, gpu->aspace);
616+ drm_gem_object_put(a6xx_gpu->sqe_bo);
617+
618+ a6xx_gpu->sqe_bo = NULL;
619+ return -EPERM;
620+ }
570621 }
571622
572623 gpu_write64(gpu, REG_A6XX_CP_SQE_INSTR_BASE_LO,
@@ -1177,8 +1228,8 @@ static int a6xx_get_timestamp(struct msm_gpu *gpu, uint64_t *value) · 604 unmodified lines
11771228 /* Force the GPU power on so we can read this register */
11781229 a6xx_gmu_set_oob(&a6xx_gpu->gmu, GMU_OOB_PERFCOUNTER_SET);
11791230
1180− *value = gpu_read64(gpu, REG_A6XX_RBBM_PERFCTR_CP_0_LO,
1181− REG_A6XX_RBBM_PERFCTR_CP_0_HI);
1231+ *value = gpu_read64(gpu, REG_A6XX_CP_ALWAYS_ON_COUNTER_LO,
1232+ REG_A6XX_CP_ALWAYS_ON_COUNTER_HI);
11821233
11831234 a6xx_gmu_clear_oob(&a6xx_gpu->gmu, GMU_OOB_PERFCOUNTER_SET);
11841235 mutex_unlock(&perfcounter_oob);
@@ -1350,35 +1401,26 @@ static int a6xx_set_supported_hw(struct device *dev, struct a6xx_gpu *a6xx_gpu, · 165 unmodified lines
13501401 u32 revn)
13511402 {
13521403 struct opp_table *opp_table;
1353− struct nvmem_cell *cell;
13541404 u32 supp_hw = UINT_MAX;
1355− void *buf;
1405+ u16 speedbin;
1406+ int ret;
13561407
1357− cell = nvmem_cell_get(dev, "speed_bin");
1408+ ret = nvmem_cell_read_u16(dev, "speed_bin", &speedbin);
13581409 /*
13591410 * -ENOENT means that the platform doesn't support speedbin which is
13601411 * fine
13611412 */
1362− if (PTR_ERR(cell) == -ENOENT)
1413+ if (ret == -ENOENT) {
13631414 return 0;
1364− else if (IS_ERR(cell)) {
1365− DRM_DEV_ERROR(dev,
1366− "failed to read speed-bin. Some OPPs may not be supported by hardware");
1367− goto done;
1368− }
1369−
1370− buf = nvmem_cell_read(cell, NULL);
1371− if (IS_ERR(buf)) {
1372− nvmem_cell_put(cell);
1415+ } else if (ret) {
13731416 DRM_DEV_ERROR(dev,
1374− "failed to read speed-bin. Some OPPs may not be supported by hardware");
1417+ "failed to read speed-bin (%d). Some OPPs may not be supported by hardware",
1418+ ret);
13751419 goto done;
13761420 }
1421+ speedbin = le16_to_cpu(speedbin);
13771422
1378− supp_hw = fuse_to_supp_hw(dev, revn, *((u32 *) buf));
1379−
1380− kfree(buf);
1381− nvmem_cell_put(cell);
1423+ supp_hw = fuse_to_supp_hw(dev, revn, speedbin);
13821424
13831425 done:
13841426 opp_table = dev_pm_opp_set_supported_hw(dev, &supp_hw, 1);
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c+3−1
@@ -496,7 +496,9 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx, · 495 unmodified lines
496496
497497 DPU_REG_WRITE(c, CTL_TOP, mode_sel);
498498 DPU_REG_WRITE(c, CTL_INTF_ACTIVE, intf_active);
499− DPU_REG_WRITE(c, CTL_MERGE_3D_ACTIVE, BIT(cfg->merge_3d - MERGE_3D_0));
499+ if (cfg->merge_3d)
500+ DPU_REG_WRITE(c, CTL_MERGE_3D_ACTIVE,
501+ BIT(cfg->merge_3d - MERGE_3D_0));
500502 }
501503
502504 static void dpu_hw_ctl_intf_cfg(struct dpu_hw_ctl *ctx,
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c+7−5
@@ -43,6 +43,8 @@ · 42 unmodified lines
4343 #define DPU_DEBUGFS_DIR "msm_dpu"
4444 #define DPU_DEBUGFS_HWMASKNAME "hw_log_mask"
4545
46+#define MIN_IB_BW 400000000ULL /* Min ib vote 400MB */
47+
4648 static int dpu_kms_hw_init(struct msm_kms *kms);
4749 static void _dpu_kms_mmu_destroy(struct dpu_kms *dpu_kms);
4850
@@ -931,6 +933,9 @@ static int dpu_kms_hw_init(struct msm_kms *kms) · 882 unmodified lines
931933 DPU_DEBUG("REG_DMA is not defined");
932934 }
933935
936+ if (of_device_is_compatible(dev->dev->of_node, "qcom,sc7180-mdss"))
937+ dpu_kms_parse_data_bus_icc_path(dpu_kms);
938+
934939 pm_runtime_get_sync(&dpu_kms->pdev->dev);
935940
936941 dpu_kms->core_rev = readl_relaxed(dpu_kms->mmio + 0x0);
@@ -1032,9 +1037,6 @@ static int dpu_kms_hw_init(struct msm_kms *kms) · 95 unmodified lines
10321037
10331038 dpu_vbif_init_memtypes(dpu_kms);
10341039
1035− if (of_device_is_compatible(dev->dev->of_node, "qcom,sc7180-mdss"))
1036− dpu_kms_parse_data_bus_icc_path(dpu_kms);
1037−
10381040 pm_runtime_put_sync(&dpu_kms->pdev->dev);
10391041
10401042 return 0;
@@ -1191,10 +1193,10 @@ static int __maybe_unused dpu_runtime_resume(struct device *dev) · 150 unmodified lines
11911193
11921194 ddev = dpu_kms->dev;
11931195
1196+ WARN_ON(!(dpu_kms->num_paths));
11941197 /* Min vote of BW is required before turning on AXI clk */
11951198 for (i = 0; i < dpu_kms->num_paths; i++)
1196− icc_set_bw(dpu_kms->path[i], 0,
1197− dpu_kms->catalog->perf.min_dram_ib);
1199+ icc_set_bw(dpu_kms->path[i], 0, Bps_to_icc(MIN_IB_BW));
11981200
11991201 rc = msm_dss_enable_clk(mp->clk_config, mp->num_clk, true);
12001202 if (rc) {
drivers/gpu/drm/msm/dp/dp_aux.c+7−0
@@ -32,6 +32,8 @@ struct dp_aux_private { · 31 unmodified lines
3232 struct drm_dp_aux dp_aux;
3333 };
3434
35+#define MAX_AUX_RETRIES 5
36+
3537 static const char *dp_aux_get_error(u32 aux_error)
3638 {
3739 switch (aux_error) {
@@ -377,6 +379,11 @@ static ssize_t dp_aux_transfer(struct drm_dp_aux *dp_aux, · 339 unmodified lines
377379 ret = dp_aux_cmd_fifo_tx(aux, msg);
378380
379381 if (ret < 0) {
382+ if (aux->native) {
383+ aux->retry_cnt++;
384+ if (!(aux->retry_cnt % MAX_AUX_RETRIES))
385+ dp_catalog_aux_update_cfg(aux->catalog);
386+ }
380387 usleep_range(400, 500); /* at least 400us to next try */
381388 goto unlock_exit;
382389 }
drivers/gpu/drm/msm/dsi/pll/dsi_pll.c+1−1
@@ -163,7 +163,7 @@ struct msm_dsi_pll *msm_dsi_pll_init(struct platform_device *pdev, · 162 unmodified lines
163163 break;
164164 case MSM_DSI_PHY_7NM:
165165 case MSM_DSI_PHY_7NM_V4_1:
166− pll = msm_dsi_pll_7nm_init(pdev, id);
166+ pll = msm_dsi_pll_7nm_init(pdev, type, id);
167167 break;
168168 default:
169169 pll = ERR_PTR(-ENXIO);
drivers/gpu/drm/msm/dsi/pll/dsi_pll.h+4−2
@@ -117,10 +117,12 @@ msm_dsi_pll_10nm_init(struct platform_device *pdev, int id) · 116 unmodified lines
117117 }
118118 #endif
119119 #ifdef CONFIG_DRM_MSM_DSI_7NM_PHY
120−struct msm_dsi_pll *msm_dsi_pll_7nm_init(struct platform_device *pdev, int id);
120+struct msm_dsi_pll *msm_dsi_pll_7nm_init(struct platform_device *pdev,
121+ enum msm_dsi_phy_type type, int id);
121122 #else
122123 static inline struct msm_dsi_pll *
123−msm_dsi_pll_7nm_init(struct platform_device *pdev, int id)
124+msm_dsi_pll_7nm_init(struct platform_device *pdev,
125+ enum msm_dsi_phy_type type, int id)
124126 {
125127 return ERR_PTR(-ENODEV);
126128 }
drivers/gpu/drm/msm/dsi/pll/dsi_pll_7nm.c+6−5
@@ -325,7 +325,7 @@ static void dsi_pll_commit(struct dsi_pll_7nm *pll) · 324 unmodified lines
325325 pll_write(base + REG_DSI_7nm_PHY_PLL_FRAC_DIV_START_LOW_1, reg->frac_div_start_low);
326326 pll_write(base + REG_DSI_7nm_PHY_PLL_FRAC_DIV_START_MID_1, reg->frac_div_start_mid);
327327 pll_write(base + REG_DSI_7nm_PHY_PLL_FRAC_DIV_START_HIGH_1, reg->frac_div_start_high);
328− pll_write(base + REG_DSI_7nm_PHY_PLL_PLL_LOCKDET_RATE_1, 0x40);
328+ pll_write(base + REG_DSI_7nm_PHY_PLL_PLL_LOCKDET_RATE_1, reg->pll_lockdet_rate);
329329 pll_write(base + REG_DSI_7nm_PHY_PLL_PLL_LOCK_DELAY, 0x06);
330330 pll_write(base + REG_DSI_7nm_PHY_PLL_CMODE_1, 0x10); /* TODO: 0x00 for CPHY */
331331 pll_write(base + REG_DSI_7nm_PHY_PLL_CLOCK_INVERTERS, reg->pll_clock_inverters);
@@ -509,6 +509,7 @@ static unsigned long dsi_pll_7nm_vco_recalc_rate(struct clk_hw *hw, · 177 unmodified lines
509509 {
510510 struct msm_dsi_pll *pll = hw_clk_to_pll(hw);
511511 struct dsi_pll_7nm *pll_7nm = to_pll_7nm(pll);
512+ struct dsi_pll_config *config = &pll_7nm->pll_configuration;
512513 void __iomem *base = pll_7nm->mmio;
513514 u64 ref_clk = pll_7nm->vco_ref_clk_rate;
514515 u64 vco_rate = 0x0;
@@ -529,9 +530,8 @@ static unsigned long dsi_pll_7nm_vco_recalc_rate(struct clk_hw *hw, · 14 unmodified lines
529530 /*
530531 * TODO:
531532 * 1. Assumes prescaler is disabled
532− * 2. Multiplier is 2^18. it should be 2^(num_of_frac_bits)
533533 */
534− multiplier = 1 << 18;
534+ multiplier = 1 << config->frac_bits;
535535 pll_freq = dec * (ref_clk * 2);
536536 tmp64 = (ref_clk * 2 * frac);
537537 pll_freq += div_u64(tmp64, multiplier);
@@ -852,7 +852,8 @@ err_base_clk_hw: · 314 unmodified lines
852852 return ret;
853853 }
854854
855−struct msm_dsi_pll *msm_dsi_pll_7nm_init(struct platform_device *pdev, int id)
855+struct msm_dsi_pll *msm_dsi_pll_7nm_init(struct platform_device *pdev,
856+ enum msm_dsi_phy_type type, int id)
856857 {
857858 struct dsi_pll_7nm *pll_7nm;
858859 struct msm_dsi_pll *pll;
@@ -885,7 +886,7 @@ struct msm_dsi_pll *msm_dsi_pll_7nm_init(struct platform_device *pdev, int id) · 26 unmodified lines
885886 pll = &pll_7nm->base;
886887 pll->min_rate = 1000000000UL;
887888 pll->max_rate = 3500000000UL;
888− if (pll->type == MSM_DSI_PHY_7NM_V4_1) {
889+ if (type == MSM_DSI_PHY_7NM_V4_1) {
889890 pll->min_rate = 600000000UL;
890891 pll->max_rate = (unsigned long)5000000000ULL;
891892 /* workaround for max rate overflowing on 32-bit builds: */
drivers/gpu/drm/msm/msm_atomic.c+5−2
@@ -57,10 +57,13 @@ static void vblank_put(struct msm_kms *kms, unsigned crtc_mask) · 56 unmodified lines
5757
5858 static void lock_crtcs(struct msm_kms *kms, unsigned int crtc_mask)
5959 {
60+ int crtc_index;
6061 struct drm_crtc *crtc;
6162
62− for_each_crtc_mask(kms->dev, crtc, crtc_mask)
63− mutex_lock(&kms->commit_lock[drm_crtc_index(crtc)]);
63+ for_each_crtc_mask(kms->dev, crtc, crtc_mask) {
64+ crtc_index = drm_crtc_index(crtc);
65+ mutex_lock_nested(&kms->commit_lock[crtc_index], crtc_index);
66+ }
6467 }
6568
6669 static void unlock_crtcs(struct msm_kms *kms, unsigned int crtc_mask)
drivers/gpu/drm/msm/msm_drv.c+13−0
@@ -570,6 +570,7 @@ err_free_priv: · 569 unmodified lines
570570 kfree(priv);
571571 err_put_drm_dev:
572572 drm_dev_put(ddev);
573+ platform_set_drvdata(pdev, NULL);
573574 return ret;
574575 }
575576
@@ -1072,6 +1073,10 @@ static int __maybe_unused msm_pm_resume(struct device *dev) · 496 unmodified lines
10721073 static int __maybe_unused msm_pm_prepare(struct device *dev)
10731074 {
10741075 struct drm_device *ddev = dev_get_drvdata(dev);
1076+ struct msm_drm_private *priv = ddev ? ddev->dev_private : NULL;
1077+
1078+ if (!priv || !priv->kms)
1079+ return 0;
10751080
10761081 return drm_mode_config_helper_suspend(ddev);
10771082 }
@@ -1079,6 +1084,10 @@ static int __maybe_unused msm_pm_prepare(struct device *dev) · 1 unmodified line
10791084 static void __maybe_unused msm_pm_complete(struct device *dev)
10801085 {
10811086 struct drm_device *ddev = dev_get_drvdata(dev);
1087+ struct msm_drm_private *priv = ddev ? ddev->dev_private : NULL;
1088+
1089+ if (!priv || !priv->kms)
1090+ return;
10821091
10831092 drm_mode_config_helper_resume(ddev);
10841093 }
@@ -1311,6 +1320,10 @@ static int msm_pdev_remove(struct platform_device *pdev) · 226 unmodified lines
13111320 static void msm_pdev_shutdown(struct platform_device *pdev)
13121321 {
13131322 struct drm_device *drm = platform_get_drvdata(pdev);
1323+ struct msm_drm_private *priv = drm ? drm->dev_private : NULL;
1324+
1325+ if (!priv || !priv->kms)
1326+ return;
13141327
13151328 drm_atomic_helper_shutdown(drm);
13161329 }
drivers/gpu/drm/msm/msm_fence.c+1−1
@@ -45,7 +45,7 @@ int msm_wait_fence(struct msm_fence_context *fctx, uint32_t fence, · 44 unmodified lines
4545 int ret;
4646
4747 if (fence > fctx->last_fence) {
48− DRM_ERROR("%s: waiting on invalid fence: %u (of %u)\n",
48+ DRM_ERROR_RATELIMITED("%s: waiting on invalid fence: %u (of %u)\n",
4949 fctx->name, fence, fctx->last_fence);
5050 return -EINVAL;
5151 }
drivers/gpu/drm/msm/msm_kms.h+2−6
@@ -157,7 +157,6 @@ struct msm_kms { · 156 unmodified lines
157157 * from the crtc's pending_timer close to end of the frame:
158158 */
159159 struct mutex commit_lock[MAX_CRTCS];
160− struct lock_class_key commit_lock_keys[MAX_CRTCS];
161160 unsigned pending_crtc_mask;
162161 struct msm_pending_timer pending_timers[MAX_CRTCS];
163162 };
@@ -167,11 +166,8 @@ static inline int msm_kms_init(struct msm_kms *kms, · 3 unmodified lines
167166 {
168167 unsigned i, ret;
169168
170− for (i = 0; i < ARRAY_SIZE(kms->commit_lock); i++) {
171− lockdep_register_key(&kms->commit_lock_keys[i]);
172− __mutex_init(&kms->commit_lock[i], "&kms->commit_lock[i]",
173− &kms->commit_lock_keys[i]);
174− }
169+ for (i = 0; i < ARRAY_SIZE(kms->commit_lock); i++)
170+ mutex_init(&kms->commit_lock[i]);
175171
176172 kms->funcs = funcs;
177173
drivers/gpu/drm/nouveau/dispnv50/disp.c+12−1
@@ -2693,9 +2693,20 @@ nv50_display_create(struct drm_device *dev) · 2692 unmodified lines
26932693 else
26942694 nouveau_display(dev)->format_modifiers = disp50xx_modifiers;
26952695
2696− if (disp->disp->object.oclass >= GK104_DISP) {
2696+ /* FIXME: 256x256 cursors are supported on Kepler, however unlike Maxwell and later
2697+ * generations Kepler requires that we use small pages (4K) for cursor scanout surfaces. The
2698+ * proper fix for this is to teach nouveau to migrate fbs being used for the cursor plane to
2699+ * small page allocations in prepare_fb(). When this is implemented, we should also force
2700+ * large pages (128K) for ovly fbs in order to fix Kepler ovlys.
2701+ * But until then, just limit cursors to 128x128 - which is small enough to avoid ever using
2702+ * large pages.
2703+ */
2704+ if (disp->disp->object.oclass >= GM107_DISP) {
26972705 dev->mode_config.cursor_width = 256;
26982706 dev->mode_config.cursor_height = 256;
2707+ } else if (disp->disp->object.oclass >= GK104_DISP) {
2708+ dev->mode_config.cursor_width = 128;
2709+ dev->mode_config.cursor_height = 128;
26992710 } else {
27002711 dev->mode_config.cursor_width = 64;
27012712 dev->mode_config.cursor_height = 64;
drivers/gpu/drm/nouveau/nouveau_bo.c+12−2
@@ -551,12 +551,17 @@ nouveau_bo_sync_for_device(struct nouveau_bo *nvbo) · 550 unmodified lines
551551
552552 if (!ttm_dma)
553553 return;
554+ if (!ttm_dma->pages) {
555+ NV_DEBUG(drm, "ttm_dma 0x%p: pages NULL\n", ttm_dma);
556+ return;
557+ }
554558
555559 /* Don't waste time looping if the object is coherent */
556560 if (nvbo->force_coherent)
557561 return;
558562
559− for (i = 0; i < ttm_dma->num_pages; ++i) {
563+ i = 0;
564+ while (i < ttm_dma->num_pages) {
560565 struct page *p = ttm_dma->pages[i];
561566 size_t num_pages = 1;
562567
@@ -582,12 +587,17 @@ nouveau_bo_sync_for_cpu(struct nouveau_bo *nvbo) · 19 unmodified lines
582587
583588 if (!ttm_dma)
584589 return;
590+ if (!ttm_dma->pages) {
591+ NV_DEBUG(drm, "ttm_dma 0x%p: pages NULL\n", ttm_dma);
592+ return;
593+ }
585594
586595 /* Don't waste time looping if the object is coherent */
587596 if (nvbo->force_coherent)
588597 return;
589598
590− for (i = 0; i < ttm_dma->num_pages; ++i) {
599+ i = 0;
600+ while (i < ttm_dma->num_pages) {
591601 struct page *p = ttm_dma->pages[i];
592602 size_t num_pages = 1;
593603
drivers/gpu/drm/omapdrm/dss/dsi.c+4−3
@@ -2149,11 +2149,12 @@ static int dsi_vc_send_short(struct dsi_data *dsi, int vc, · 2148 unmodified lines
21492149 const struct mipi_dsi_msg *msg)
21502150 {
21512151 struct mipi_dsi_packet pkt;
2152+ int ret;
21522153 u32 r;
21532154
2154− r = mipi_dsi_create_packet(&pkt, msg);
2155− if (r < 0)
2156− return r;
2155+ ret = mipi_dsi_create_packet(&pkt, msg);
2156+ if (ret < 0)
2157+ return ret;
21572158
21582159 WARN_ON(!dsi_bus_is_locked(dsi));
21592160
drivers/gpu/drm/panel/panel-dsi-cm.c+9−3
@@ -37,6 +37,7 @@ struct dsic_panel_data { · 36 unmodified lines
3737 u32 height_mm;
3838 u32 max_hs_rate;
3939 u32 max_lp_rate;
40+ bool te_support;
4041 };
4142
4243 struct panel_drv_data {
@@ -334,9 +335,11 @@ static int dsicm_power_on(struct panel_drv_data *ddata) · 291 unmodified lines
334335 if (r)
335336 goto err;
336337
337− r = mipi_dsi_dcs_set_tear_on(ddata->dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
338− if (r)
339− goto err;
338+ if (ddata->panel_data->te_support) {
339+ r = mipi_dsi_dcs_set_tear_on(ddata->dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
340+ if (r)
341+ goto err;
342+ }
340343
341344 /* possible panel bug */
342345 msleep(100);
@@ -619,6 +622,7 @@ static const struct dsic_panel_data taal_data = { · 276 unmodified lines
619622 .height_mm = 0,
620623 .max_hs_rate = 300000000,
621624 .max_lp_rate = 10000000,
625+ .te_support = true,
622626 };
623627
624628 static const struct dsic_panel_data himalaya_data = {
@@ -629,6 +633,7 @@ static const struct dsic_panel_data himalaya_data = { · 4 unmodified lines
629633 .height_mm = 88,
630634 .max_hs_rate = 300000000,
631635 .max_lp_rate = 10000000,
636+ .te_support = false,
632637 };
633638
634639 static const struct dsic_panel_data droid4_data = {
@@ -639,6 +644,7 @@ static const struct dsic_panel_data droid4_data = { · 4 unmodified lines
639644 .height_mm = 89,
640645 .max_hs_rate = 300000000,
641646 .max_lp_rate = 10000000,
647+ .te_support = false,
642648 };
643649
644650 static const struct of_device_id dsicm_of_match[] = {
drivers/gpu/drm/qxl/qxl_display.c+1−0
@@ -328,6 +328,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc, · 327 unmodified lines
328328
329329 head.id = i;
330330 head.flags = 0;
331+ head.surface_id = 0;
331332 oldcount = qdev->monitors_config->count;
332333 if (crtc->state->active) {
333334 struct drm_display_mode *mode = &crtc->mode;
drivers/gpu/drm/qxl/qxl_release.c+10−2
@@ -321,7 +321,7 @@ int qxl_alloc_release_reserved(struct qxl_device *qdev, unsigned long size, · 320 unmodified lines
321321 int type, struct qxl_release **release,
322322 struct qxl_bo **rbo)
323323 {
324− struct qxl_bo *bo;
324+ struct qxl_bo *bo, *free_bo = NULL;
325325 int idr_ret;
326326 int ret = 0;
327327 union qxl_release_info *info;
@@ -347,7 +347,7 @@ int qxl_alloc_release_reserved(struct qxl_device *qdev, unsigned long size, · 19 unmodified lines
347347
348348 mutex_lock(&qdev->release_mutex);
349349 if (qdev->current_release_bo_offset[cur_idx] + 1 >= releases_per_bo[cur_idx]) {
350− qxl_bo_unref(&qdev->current_release_bo[cur_idx]);
350+ free_bo = qdev->current_release_bo[cur_idx];
351351 qdev->current_release_bo_offset[cur_idx] = 0;
352352 qdev->current_release_bo[cur_idx] = NULL;
353353 }
@@ -355,6 +355,10 @@ int qxl_alloc_release_reserved(struct qxl_device *qdev, unsigned long size, · 1 unmodified line
355355 ret = qxl_release_bo_alloc(qdev, &qdev->current_release_bo[cur_idx]);
356356 if (ret) {
357357 mutex_unlock(&qdev->release_mutex);
358+ if (free_bo) {
359+ qxl_bo_unpin(free_bo);
360+ qxl_bo_unref(&free_bo);
361+ }
358362 qxl_release_free(qdev, *release);
359363 return ret;
360364 }
@@ -370,6 +374,10 @@ int qxl_alloc_release_reserved(struct qxl_device *qdev, unsigned long size, · 9 unmodified lines
370374 *rbo = bo;
371375
372376 mutex_unlock(&qdev->release_mutex);
377+ if (free_bo) {
378+ qxl_bo_unpin(free_bo);
379+ qxl_bo_unref(&free_bo);
380+ }
373381
374382 ret = qxl_release_list_add(*release, bo);
375383 qxl_bo_unref(&bo);
drivers/gpu/drm/radeon/radeon.h+2−0
@@ -574,6 +574,8 @@ struct radeon_gem { · 573 unmodified lines
574574 struct list_head objects;
575575 };
576576
577+extern const struct drm_gem_object_funcs radeon_gem_object_funcs;
578+
577579 int radeon_gem_init(struct radeon_device *rdev);
578580 void radeon_gem_fini(struct radeon_device *rdev);
579581 int radeon_gem_object_create(struct radeon_device *rdev, unsigned long size,
drivers/gpu/drm/radeon/radeon_gem.c+2−2
@@ -43,7 +43,7 @@ struct sg_table *radeon_gem_prime_get_sg_table(struct drm_gem_object *obj); · 42 unmodified lines
4343 int radeon_gem_prime_pin(struct drm_gem_object *obj);
4444 void radeon_gem_prime_unpin(struct drm_gem_object *obj);
4545
46−static const struct drm_gem_object_funcs radeon_gem_object_funcs;
46+const struct drm_gem_object_funcs radeon_gem_object_funcs;
4747
4848 static void radeon_gem_object_free(struct drm_gem_object *gobj)
4949 {
@@ -227,7 +227,7 @@ static int radeon_gem_handle_lockup(struct radeon_device *rdev, int r) · 177 unmodified lines
227227 return r;
228228 }
229229
230−static const struct drm_gem_object_funcs radeon_gem_object_funcs = {
230+const struct drm_gem_object_funcs radeon_gem_object_funcs = {
231231 .free = radeon_gem_object_free,
232232 .open = radeon_gem_object_open,
233233 .close = radeon_gem_object_close,
drivers/gpu/drm/radeon/radeon_prime.c+2−0
@@ -56,6 +56,8 @@ struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev, · 55 unmodified lines
5656 if (ret)
5757 return ERR_PTR(ret);
5858
59+ bo->tbo.base.funcs = &radeon_gem_object_funcs;
60+
5961 mutex_lock(&rdev->gem.mutex);
6062 list_add_tail(&bo->list, &rdev->gem.objects);
6163 mutex_unlock(&rdev->gem.mutex);
drivers/gpu/drm/radeon/radeon_ttm.c+2−2
@@ -364,7 +364,7 @@ static int radeon_ttm_tt_pin_userptr(struct ttm_bo_device *bdev, struct ttm_tt * · 363 unmodified lines
364364 if (gtt->userflags & RADEON_GEM_USERPTR_ANONONLY) {
365365 /* check that we only pin down anonymous memory
366366 to prevent problems with writeback */
367− unsigned long end = gtt->userptr + ttm->num_pages * PAGE_SIZE;
367+ unsigned long end = gtt->userptr + (u64)ttm->num_pages * PAGE_SIZE;
368368 struct vm_area_struct *vma;
369369 vma = find_vma(gtt->usermm, gtt->userptr);
370370 if (!vma || vma->vm_file || vma->vm_end < end)
@@ -386,7 +386,7 @@ static int radeon_ttm_tt_pin_userptr(struct ttm_bo_device *bdev, struct ttm_tt * · 15 unmodified lines
386386 } while (pinned < ttm->num_pages);
387387
388388 r = sg_alloc_table_from_pages(ttm->sg, ttm->pages, ttm->num_pages, 0,
389− ttm->num_pages << PAGE_SHIFT,
389+ (u64)ttm->num_pages << PAGE_SHIFT,
390390 GFP_KERNEL);
391391 if (r)
392392 goto release_sg;
drivers/gpu/drm/rcar-du/rcar_du_encoder.c+6−25
@@ -48,21 +48,12 @@ static unsigned int rcar_du_encoder_count_ports(struct device_node *node) · 47 unmodified lines
4848 static const struct drm_encoder_funcs rcar_du_encoder_funcs = {
4949 };
5050
51−static void rcar_du_encoder_release(struct drm_device *dev, void *res)
52−{
53− struct rcar_du_encoder *renc = res;
54−
55− drm_encoder_cleanup(&renc->base);
56− kfree(renc);
57−}
58−
5951 int rcar_du_encoder_init(struct rcar_du_device *rcdu,
6052 enum rcar_du_output output,
6153 struct device_node *enc_node)
6254 {
6355 struct rcar_du_encoder *renc;
6456 struct drm_bridge *bridge;
65− int ret;
6657
6758 /*
6859 * Locate the DRM bridge from the DT node. For the DPAD outputs, if the
@@ -101,26 +92,16 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu, · 32 unmodified lines
10192 return -ENOLINK;
10293 }
10394
104− renc = kzalloc(sizeof(*renc), GFP_KERNEL);
105− if (renc == NULL)
106− return -ENOMEM;
107−
108− renc->output = output;
109−
11095 dev_dbg(rcdu->dev, "initializing encoder %pOF for output %u\n",
11196 enc_node, output);
11297
113− ret = drm_encoder_init(&rcdu->ddev, &renc->base, &rcar_du_encoder_funcs,
114− DRM_MODE_ENCODER_NONE, NULL);
115− if (ret < 0) {
116− kfree(renc);
117− return ret;
118− }
98+ renc = drmm_encoder_alloc(&rcdu->ddev, struct rcar_du_encoder, base,
99+ &rcar_du_encoder_funcs, DRM_MODE_ENCODER_NONE,
100+ NULL);
101+ if (!renc)
102+ return -ENOMEM;
119103
120− ret = drmm_add_action_or_reset(&rcdu->ddev, rcar_du_encoder_release,
121− renc);
122− if (ret)
123− return ret;
104+ renc->output = output;
124105
125106 /*
126107 * Attach the bridge to the encoder. The bridge will create the
drivers/gpu/drm/tegra/dc.c+13−17
@@ -1688,6 +1688,11 @@ static void tegra_dc_commit_state(struct tegra_dc *dc, · 1687 unmodified lines
16881688 dev_err(dc->dev,
16891689 "failed to set clock rate to %lu Hz\n",
16901690 state->pclk);
1691+
1692+ err = clk_set_rate(dc->clk, state->pclk);
1693+ if (err < 0)
1694+ dev_err(dc->dev, "failed to set clock %pC to %lu Hz: %d\n",
1695+ dc->clk, state->pclk, err);
16911696 }
16921697
16931698 DRM_DEBUG_KMS("rate: %lu, div: %u\n", clk_get_rate(dc->clk),
@@ -1698,11 +1703,6 @@ static void tegra_dc_commit_state(struct tegra_dc *dc, · 4 unmodified lines
16981703 value = SHIFT_CLK_DIVIDER(state->div) | PIXEL_CLK_DIVIDER_PCD1;
16991704 tegra_dc_writel(dc, value, DC_DISP_DISP_CLOCK_CONTROL);
17001705 }
1701−
1702− err = clk_set_rate(dc->clk, state->pclk);
1703− if (err < 0)
1704− dev_err(dc->dev, "failed to set clock %pC to %lu Hz: %d\n",
1705− dc->clk, state->pclk, err);
17061706 }
17071707
17081708 static void tegra_dc_stop(struct tegra_dc *dc)
@@ -2501,22 +2501,18 @@ static int tegra_dc_couple(struct tegra_dc *dc) · 792 unmodified lines
25012501 * POWER_CONTROL registers during CRTC enabling.
25022502 */
25032503 if (dc->soc->coupled_pm && dc->pipe == 1) {
2504− u32 flags = DL_FLAG_PM_RUNTIME | DL_FLAG_AUTOREMOVE_CONSUMER;
2505− struct device_link *link;
2506− struct device *partner;
2504+ struct device *companion;
2505+ struct tegra_dc *parent;
25072506
2508− partner = driver_find_device(dc->dev->driver, NULL, NULL,
2509− tegra_dc_match_by_pipe);
2510− if (!partner)
2507+ companion = driver_find_device(dc->dev->driver, NULL, (const void *)0,
2508+ tegra_dc_match_by_pipe);
2509+ if (!companion)
25112510 return -EPROBE_DEFER;
25122511
2513− link = device_link_add(dc->dev, partner, flags);
2514− if (!link) {
2515− dev_err(dc->dev, "failed to link controllers\n");
2516− return -EINVAL;
2517− }
2512+ parent = dev_get_drvdata(companion);
2513+ dc->client.parent = &parent->client;
25182514
2519− dev_dbg(dc->dev, "coupled to %s\n", dev_name(partner));
2515+ dev_dbg(dc->dev, "coupled to %s\n", dev_name(companion));
25202516 }
25212517
25222518 return 0;
drivers/gpu/drm/tegra/sor.c+7−0
@@ -3115,6 +3115,12 @@ static int tegra_sor_init(struct host1x_client *client) · 3114 unmodified lines
31153115 * kernel is possible.
31163116 */
31173117 if (sor->rst) {
3118+ err = pm_runtime_resume_and_get(sor->dev);
3119+ if (err < 0) {
3120+ dev_err(sor->dev, "failed to get runtime PM: %d\n", err);
3121+ return err;
3122+ }
3123+
31183124 err = reset_control_acquire(sor->rst);
31193125 if (err < 0) {
31203126 dev_err(sor->dev, "failed to acquire SOR reset: %d\n",
@@ -3148,6 +3154,7 @@ static int tegra_sor_init(struct host1x_client *client) · 27 unmodified lines
31483154 }
31493155
31503156 reset_control_release(sor->rst);
3157+ pm_runtime_put(sor->dev);
31513158 }
31523159
31533160 err = clk_prepare_enable(sor->clk_safe);
drivers/gpu/drm/tiny/gm12u320.c+36−8
@@ -83,6 +83,7 @@ MODULE_PARM_DESC(eco_mode, "Turn on Eco mode (less bright, more silent)"); · 82 unmodified lines
8383
8484 struct gm12u320_device {
8585 struct drm_device dev;
86+ struct device *dmadev;
8687 struct drm_simple_display_pipe pipe;
8788 struct drm_connector conn;
8889 unsigned char *cmd_buf;
@@ -601,6 +602,22 @@ static const uint64_t gm12u320_pipe_modifiers[] = { · 512 unmodified lines
601602 DRM_FORMAT_MOD_INVALID
602603 };
603604
605+/*
606+ * FIXME: Dma-buf sharing requires DMA support by the importing device.
607+ * This function is a workaround to make USB devices work as well.
608+ * See todo.rst for how to fix the issue in the dma-buf framework.
609+ */
610+static struct drm_gem_object *gm12u320_gem_prime_import(struct drm_device *dev,
611+ struct dma_buf *dma_buf)
612+{
613+ struct gm12u320_device *gm12u320 = to_gm12u320(dev);
614+
615+ if (!gm12u320->dmadev)
616+ return ERR_PTR(-ENODEV);
617+
618+ return drm_gem_prime_import_dev(dev, dma_buf, gm12u320->dmadev);
619+}
620+
604621 DEFINE_DRM_GEM_FOPS(gm12u320_fops);
605622
606623 static const struct drm_driver gm12u320_drm_driver = {
@@ -614,6 +631,7 @@ static const struct drm_driver gm12u320_drm_driver = { · 7 unmodified lines
614631
615632 .fops = &gm12u320_fops,
616633 DRM_GEM_SHMEM_DRIVER_OPS,
634+ .gem_prime_import = gm12u320_gem_prime_import,
617635 };
618636
619637 static const struct drm_mode_config_funcs gm12u320_mode_config_funcs = {
@@ -640,15 +658,18 @@ static int gm12u320_usb_probe(struct usb_interface *interface, · 20 unmodified lines
640658 struct gm12u320_device, dev);
641659 if (IS_ERR(gm12u320))
642660 return PTR_ERR(gm12u320);
661+ dev = &gm12u320->dev;
662+
663+ gm12u320->dmadev = usb_intf_get_dma_device(to_usb_interface(dev->dev));
664+ if (!gm12u320->dmadev)
665+ drm_warn(dev, "buffer sharing not supported"); /* not an error */
643666
644667 INIT_DELAYED_WORK(&gm12u320->fb_update.work, gm12u320_fb_update_work);
645668 mutex_init(&gm12u320->fb_update.lock);
646669
647− dev = &gm12u320->dev;
648−
649670 ret = drmm_mode_config_init(dev);
650671 if (ret)
651− return ret;
672+ goto err_put_device;
652673
653674 dev->mode_config.min_width = GM12U320_USER_WIDTH;
654675 dev->mode_config.max_width = GM12U320_USER_WIDTH;
@@ -658,15 +679,15 @@ static int gm12u320_usb_probe(struct usb_interface *interface, · 3 unmodified lines
658679
659680 ret = gm12u320_usb_alloc(gm12u320);
660681 if (ret)
661− return ret;
682+ goto err_put_device;
662683
663684 ret = gm12u320_set_ecomode(gm12u320);
664685 if (ret)
665− return ret;
686+ goto err_put_device;
666687
667688 ret = gm12u320_conn_init(gm12u320);
668689 if (ret)
669− return ret;
690+ goto err_put_device;
670691
671692 ret = drm_simple_display_pipe_init(&gm12u320->dev,
672693 &gm12u320->pipe,
@@ -676,24 +697,31 @@ static int gm12u320_usb_probe(struct usb_interface *interface, · 3 unmodified lines
676697 gm12u320_pipe_modifiers,
677698 &gm12u320->conn);
678699 if (ret)
679− return ret;
700+ goto err_put_device;
680701
681702 drm_mode_config_reset(dev);
682703
683704 usb_set_intfdata(interface, dev);
684705 ret = drm_dev_register(dev, 0);
685706 if (ret)
686− return ret;
707+ goto err_put_device;
687708
688709 drm_fbdev_generic_setup(dev, 0);
689710
690711 return 0;
712+
713+err_put_device:
714+ put_device(gm12u320->dmadev);
715+ return ret;
691716 }
692717
693718 static void gm12u320_usb_disconnect(struct usb_interface *interface)
694719 {
695720 struct drm_device *dev = usb_get_intfdata(interface);
721+ struct gm12u320_device *gm12u320 = to_gm12u320(dev);
696722
723+ put_device(gm12u320->dmadev);
724+ gm12u320->dmadev = NULL;
697725 drm_dev_unplug(dev);
698726 drm_atomic_helper_shutdown(dev);
699727 }
drivers/gpu/drm/ttm/ttm_bo.c+6−2
@@ -136,7 +136,8 @@ void ttm_bo_move_to_lru_tail(struct ttm_buffer_object *bo, · 135 unmodified lines
136136 struct ttm_bo_device *bdev = bo->bdev;
137137 struct ttm_resource_manager *man;
138138
139− dma_resv_assert_held(bo->base.resv);
139+ if (!bo->deleted)
140+ dma_resv_assert_held(bo->base.resv);
140141
141142 if (bo->pin_count) {
142143 ttm_bo_del_from_lru(bo);
@@ -508,8 +509,11 @@ static void ttm_bo_release(struct kref *kref) · 365 unmodified lines
508509 * Make pinned bos immediately available to
509510 * shrinkers, now that they are queued for
510511 * destruction.
512+ *
513+ * FIXME: QXL is triggering this. Can be removed when the
514+ * driver is fixed.
511515 */
512− if (WARN_ON(bo->pin_count)) {
516+ if (WARN_ON_ONCE(bo->pin_count)) {
513517 bo->pin_count = 0;
514518 ttm_bo_move_to_lru_tail(bo, &bo->mem, NULL);
515519 }
drivers/gpu/drm/ttm/ttm_pool.c+2−2
@@ -268,13 +268,13 @@ static void ttm_pool_type_init(struct ttm_pool_type *pt, struct ttm_pool *pool, · 267 unmodified lines
268268 /* Remove a pool_type from the global shrinker list and free all pages */
269269 static void ttm_pool_type_fini(struct ttm_pool_type *pt)
270270 {
271− struct page *p, *tmp;
271+ struct page *p;
272272
273273 mutex_lock(&shrinker_lock);
274274 list_del(&pt->shrinker_list);
275275 mutex_unlock(&shrinker_lock);
276276
277− list_for_each_entry_safe(p, tmp, &pt->pages, lru)
277+ while ((p = ttm_pool_type_take(pt)))
278278 ttm_pool_free_page(pt->pool, pt->caching, pt->order, p);
279279 }
280280
drivers/gpu/drm/udl/udl_drv.c+17−0
@@ -32,6 +32,22 @@ static int udl_usb_resume(struct usb_interface *interface) · 31 unmodified lines
3232 return drm_mode_config_helper_resume(dev);
3333 }
3434
35+/*
36+ * FIXME: Dma-buf sharing requires DMA support by the importing device.
37+ * This function is a workaround to make USB devices work as well.
38+ * See todo.rst for how to fix the issue in the dma-buf framework.
39+ */
40+static struct drm_gem_object *udl_driver_gem_prime_import(struct drm_device *dev,
41+ struct dma_buf *dma_buf)
42+{
43+ struct udl_device *udl = to_udl(dev);
44+
45+ if (!udl->dmadev)
46+ return ERR_PTR(-ENODEV);
47+
48+ return drm_gem_prime_import_dev(dev, dma_buf, udl->dmadev);
49+}
50+
3551 DEFINE_DRM_GEM_FOPS(udl_driver_fops);
3652
3753 static const struct drm_driver driver = {
@@ -40,6 +56,7 @@ static const struct drm_driver driver = { · 2 unmodified lines
4056 /* GEM hooks */
4157 .fops = &udl_driver_fops,
4258 DRM_GEM_SHMEM_DRIVER_OPS,
59+ .gem_prime_import = udl_driver_gem_prime_import,
4360
4461 .name = DRIVER_NAME,
4562 .desc = DRIVER_DESC,
drivers/gpu/drm/udl/udl_drv.h+1−0
@@ -50,6 +50,7 @@ struct urb_list { · 49 unmodified lines
5050 struct udl_device {
5151 struct drm_device drm;
5252 struct device *dev;
53+ struct device *dmadev;
5354
5455 struct drm_simple_display_pipe display_pipe;
5556
drivers/gpu/drm/udl/udl_main.c+10−0
@@ -315,6 +315,10 @@ int udl_init(struct udl_device *udl) · 314 unmodified lines
315315
316316 DRM_DEBUG("\n");
317317
318+ udl->dmadev = usb_intf_get_dma_device(to_usb_interface(dev->dev));
319+ if (!udl->dmadev)
320+ drm_warn(dev, "buffer sharing not supported"); /* not an error */
321+
318322 mutex_init(&udl->gem_lock);
319323
320324 if (!udl_parse_vendor_descriptor(udl)) {
@@ -343,12 +347,18 @@ int udl_init(struct udl_device *udl) · 22 unmodified lines
343347 err:
344348 if (udl->urbs.count)
345349 udl_free_urb_list(dev);
350+ put_device(udl->dmadev);
346351 DRM_ERROR("%d\n", ret);
347352 return ret;
348353 }
349354
350355 int udl_drop_usb(struct drm_device *dev)
351356 {
357+ struct udl_device *udl = to_udl(dev);
358+
352359 udl_free_urb_list(dev);
360+ put_device(udl->dmadev);
361+ udl->dmadev = NULL;
362+
353363 return 0;
354364 }
drivers/gpu/drm/vc4/vc4_crtc.c+17−0
@@ -210,6 +210,7 @@ static u32 vc4_get_fifo_full_level(struct vc4_crtc *vc4_crtc, u32 format) · 209 unmodified lines
210210 {
211211 const struct vc4_crtc_data *crtc_data = vc4_crtc_to_vc4_crtc_data(vc4_crtc);
212212 const struct vc4_pv_data *pv_data = vc4_crtc_to_vc4_pv_data(vc4_crtc);
213+ struct vc4_dev *vc4 = to_vc4_dev(vc4_crtc->base.dev);
213214 u32 fifo_len_bytes = pv_data->fifo_depth;
214215
215216 /*
@@ -238,6 +239,22 @@ static u32 vc4_get_fifo_full_level(struct vc4_crtc *vc4_crtc, u32 format) · 22 unmodified lines
238239 if (crtc_data->hvs_output == 5)
239240 return 32;
240241
242+ /*
243+ * It looks like in some situations, we will overflow
244+ * the PixelValve FIFO (with the bit 10 of PV stat being
245+ * set) and stall the HVS / PV, eventually resulting in
246+ * a page flip timeout.
247+ *
248+ * Displaying the video overlay during a playback with
249+ * Kodi on an RPi3 seems to be a great solution with a
250+ * failure rate around 50%.
251+ *
252+ * Removing 1 from the FIFO full level however
253+ * seems to completely remove that issue.
254+ */
255+ if (!vc4->hvs->hvs5)
256+ return fifo_len_bytes - 3 * HVS_FIFO_LATENCY_PIX - 1;
257+
241258 return fifo_len_bytes - 3 * HVS_FIFO_LATENCY_PIX;
242259 }
243260 }
drivers/gpu/drm/vc4/vc4_plane.c+0−1
@@ -1146,7 +1146,6 @@ static void vc4_plane_atomic_async_update(struct drm_plane *plane, · 1145 unmodified lines
11461146 plane->state->src_y = state->src_y;
11471147 plane->state->src_w = state->src_w;
11481148 plane->state->src_h = state->src_h;
1149− plane->state->src_h = state->src_h;
11501149 plane->state->alpha = state->alpha;
11511150 plane->state->pixel_blend_mode = state->pixel_blend_mode;
11521151 plane->state->rotation = state->rotation;
drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c+4−0
@@ -481,11 +481,15 @@ static int vmw_cotable_resize(struct vmw_resource *res, size_t new_size) · 480 unmodified lines
481481 vmw_bo_unreference(&old_buf);
482482 res->id = vcotbl->type;
483483
484+ /* Release the pin acquired in vmw_bo_init */
485+ ttm_bo_unpin(bo);
486+
484487 return 0;
485488
486489 out_map_new:
487490 ttm_bo_kunmap(&old_map);
488491 out_wait:
492+ ttm_bo_unpin(bo);
489493 ttm_bo_unreserve(bo);
490494 vmw_bo_unreference(&buf);
491495
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c+8−9
@@ -712,17 +712,8 @@ static int vmw_driver_load(struct vmw_private *dev_priv, u32 pci_id) · 711 unmodified lines
712712 dev_priv->last_read_seqno = (uint32_t) -100;
713713 dev_priv->drm.dev_private = dev_priv;
714714
715− ret = vmw_setup_pci_resources(dev_priv, pci_id);
716− if (ret)
717− return ret;
718− ret = vmw_detect_version(dev_priv);
719− if (ret)
720− goto out_no_pci_or_version;
721−
722715 mutex_init(&dev_priv->cmdbuf_mutex);
723− mutex_init(&dev_priv->release_mutex);
724716 mutex_init(&dev_priv->binding_mutex);
725− mutex_init(&dev_priv->global_kms_state_mutex);
726717 ttm_lock_init(&dev_priv->reservation_sem);
727718 spin_lock_init(&dev_priv->resource_lock);
728719 spin_lock_init(&dev_priv->hw_lock);
@@ -730,6 +721,14 @@ static int vmw_driver_load(struct vmw_private *dev_priv, u32 pci_id) · 1 unmodified line
730721 spin_lock_init(&dev_priv->cap_lock);
731722 spin_lock_init(&dev_priv->cursor_lock);
732723
724+ ret = vmw_setup_pci_resources(dev_priv, pci_id);
725+ if (ret)
726+ return ret;
727+ ret = vmw_detect_version(dev_priv);
728+ if (ret)
729+ goto out_no_pci_or_version;
730+
731+
733732 for (i = vmw_res_context; i < vmw_res_max; ++i) {
734733 idr_init(&dev_priv->res_idr[i]);
735734 INIT_LIST_HEAD(&dev_priv->res_lru[i]);
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h+1−4
@@ -529,7 +529,6 @@ struct vmw_private { · 528 unmodified lines
529529 struct vmw_overlay *overlay_priv;
530530 struct drm_property *hotplug_mode_update_property;
531531 struct drm_property *implicit_placement_property;
532− struct mutex global_kms_state_mutex;
533532 spinlock_t cursor_lock;
534533 struct drm_atomic_state *suspend_state;
535534
@@ -592,7 +591,6 @@ struct vmw_private { · 56 unmodified lines
592591 bool refuse_hibernation;
593592 bool suspend_locked;
594593
595− struct mutex release_mutex;
596594 atomic_t num_fifo_resources;
597595
598596 /*
@@ -1524,9 +1522,8 @@ static inline void vmw_bo_unreference(struct vmw_buffer_object **buf) · 925 unmodified lines
15241522 struct vmw_buffer_object *tmp_buf = *buf;
15251523
15261524 *buf = NULL;
1527− if (tmp_buf != NULL) {
1525+ if (tmp_buf != NULL)
15281526 ttm_bo_put(&tmp_buf->base);
1529− }
15301527 }
15311528
15321529 static inline struct vmw_buffer_object *
drivers/gpu/drm/vmwgfx/vmwgfx_mob.c+14−0
@@ -94,6 +94,16 @@ static void vmw_mob_pt_setup(struct vmw_mob *mob, · 93 unmodified lines
9494 struct vmw_piter data_iter,
9595 unsigned long num_data_pages);
9696
97+
98+static inline void vmw_bo_unpin_unlocked(struct ttm_buffer_object *bo)
99+{
100+ int ret = ttm_bo_reserve(bo, false, true, NULL);
101+ BUG_ON(ret != 0);
102+ ttm_bo_unpin(bo);
103+ ttm_bo_unreserve(bo);
104+}
105+
106+
97107 /*
98108 * vmw_setup_otable_base - Issue an object table base setup command to
99109 * the device
@@ -277,6 +287,7 @@ out_no_setup: · 177 unmodified lines
277287 &batch->otables[i]);
278288 }
279289
290+ vmw_bo_unpin_unlocked(batch->otable_bo);
280291 ttm_bo_put(batch->otable_bo);
281292 batch->otable_bo = NULL;
282293 return ret;
@@ -340,6 +351,7 @@ static void vmw_otable_batch_takedown(struct vmw_private *dev_priv, · 57 unmodified lines
340351 BUG_ON(ret != 0);
341352
342353 vmw_bo_fence_single(bo, NULL);
354+ ttm_bo_unpin(bo);
343355 ttm_bo_unreserve(bo);
344356
345357 ttm_bo_put(batch->otable_bo);
@@ -528,6 +540,7 @@ static void vmw_mob_pt_setup(struct vmw_mob *mob, · 182 unmodified lines
528540 void vmw_mob_destroy(struct vmw_mob *mob)
529541 {
530542 if (mob->pt_bo) {
543+ vmw_bo_unpin_unlocked(mob->pt_bo);
531544 ttm_bo_put(mob->pt_bo);
532545 mob->pt_bo = NULL;
533546 }
@@ -643,6 +656,7 @@ int vmw_mob_bind(struct vmw_private *dev_priv, · 109 unmodified lines
643656 out_no_cmd_space:
644657 vmw_fifo_resource_dec(dev_priv);
645658 if (pt_set_up) {
659+ vmw_bo_unpin_unlocked(mob->pt_bo);
646660 ttm_bo_put(mob->pt_bo);
647661 mob->pt_bo = NULL;
648662 }
drivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.c+1−3
@@ -500,8 +500,6 @@ vm_fault_t vmw_bo_vm_huge_fault(struct vm_fault *vmf, · 499 unmodified lines
500500 vm_fault_t ret;
501501 pgoff_t fault_page_size;
502502 bool write = vmf->flags & FAULT_FLAG_WRITE;
503− bool is_cow_mapping =
504− (vma->vm_flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE;
505503
506504 switch (pe_size) {
507505 case PE_SIZE_PMD:
@@ -518,7 +516,7 @@ vm_fault_t vmw_bo_vm_huge_fault(struct vm_fault *vmf, · 10 unmodified lines
518516 }
519517
520518 /* Always do write dirty-tracking and COW on PTE level. */
521− if (write && (READ_ONCE(vbo->dirty) || is_cow_mapping))
519+ if (write && (READ_ONCE(vbo->dirty) || is_cow_mapping(vma->vm_flags)))
522520 return VM_FAULT_FALLBACK;
523521
524522 ret = ttm_bo_vm_reserve(bo, vmf);
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c+1−1
@@ -49,7 +49,7 @@ int vmw_mmap(struct file *filp, struct vm_area_struct *vma) · 48 unmodified lines
4949 vma->vm_ops = &vmw_vm_ops;
5050
5151 /* Use VM_PFNMAP rather than VM_MIXEDMAP if not a COW mapping */
52− if ((vma->vm_flags & (VM_SHARED | VM_MAYWRITE)) != VM_MAYWRITE)
52+ if (!is_cow_mapping(vma->vm_flags))
5353 vma->vm_flags = (vma->vm_flags & ~VM_MIXEDMAP) | VM_PFNMAP;
5454
5555 return 0;
drivers/gpu/drm/xen/xen_drm_front.c+4−2
@@ -521,7 +521,7 @@ static int xen_drm_drv_init(struct xen_drm_front_info *front_info) · 520 unmodified lines
521521 drm_dev = drm_dev_alloc(&xen_drm_driver, dev);
522522 if (IS_ERR(drm_dev)) {
523523 ret = PTR_ERR(drm_dev);
524− goto fail;
524+ goto fail_dev;
525525 }
526526
527527 drm_info->drm_dev = drm_dev;
@@ -551,8 +551,10 @@ fail_modeset: · 23 unmodified lines
551551 drm_kms_helper_poll_fini(drm_dev);
552552 drm_mode_config_cleanup(drm_dev);
553553 drm_dev_put(drm_dev);
554−fail:
554+fail_dev:
555555 kfree(drm_info);
556+ front_info->drm_info = NULL;
557+fail:
556558 return ret;
557559 }
558560
drivers/gpu/drm/xen/xen_drm_front_conn.h+0−1
@@ -16,7 +16,6 @@ · 15 unmodified lines
1616 struct drm_connector;
1717 struct xen_drm_front_drm_info;
1818
19−struct xen_drm_front_drm_info;
2019
2120 int xen_drm_front_conn_init(struct xen_drm_front_drm_info *drm_info,
2221 struct drm_connector *connector);
drivers/gpu/host1x/bus.c+6−4
@@ -705,8 +705,9 @@ void host1x_driver_unregister(struct host1x_driver *driver) · 704 unmodified lines
705705 EXPORT_SYMBOL(host1x_driver_unregister);
706706
707707 /**
708− * host1x_client_register() - register a host1x client
708+ * __host1x_client_register() - register a host1x client
709709 * @client: host1x client
710+ * @key: lock class key for the client-specific mutex
710711 *
711712 * Registers a host1x client with each host1x controller instance. Note that
712713 * each client will only match their parent host1x controller and will only be
@@ -715,13 +716,14 @@ EXPORT_SYMBOL(host1x_driver_unregister); · 2 unmodified lines
715716 * device and call host1x_device_init(), which will in turn call each client's
716717 * &host1x_client_ops.init implementation.
717718 */
718−int host1x_client_register(struct host1x_client *client)
719+int __host1x_client_register(struct host1x_client *client,
720+ struct lock_class_key *key)
719721 {
720722 struct host1x *host1x;
721723 int err;
722724
723725 INIT_LIST_HEAD(&client->list);
724− mutex_init(&client->lock);
726+ __mutex_init(&client->lock, "host1x client lock", key);
725727 client->usecount = 0;
726728
727729 mutex_lock(&devices_lock);
@@ -742,7 +744,7 @@ int host1x_client_register(struct host1x_client *client) · 14 unmodified lines
742744
743745 return 0;
744746 }
745−EXPORT_SYMBOL(host1x_client_register);
747+EXPORT_SYMBOL(__host1x_client_register);
746748
747749 /**
748750 * host1x_client_unregister() - unregister a host1x client
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c+37−3
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 #include <linux/bitops.h>
1111 #include <linux/delay.h>
1212 #include <linux/dma-mapping.h>
13+#include <linux/dmi.h>
1314 #include <linux/interrupt.h>
1415 #include <linux/io-64-nonatomic-lo-hi.h>
1516 #include <linux/module.h>
@@ -22,9 +23,13 @@ · 6 unmodified lines
2223
2324 #define ACEL_EN BIT(0)
2425 #define GYRO_EN BIT(1)
25−#define MAGNO_EN BIT(2)
26+#define MAGNO_EN BIT(2)
2627 #define ALS_EN BIT(19)
2728
29+static int sensor_mask_override = -1;
30+module_param_named(sensor_mask, sensor_mask_override, int, 0444);
31+MODULE_PARM_DESC(sensor_mask, "override the detected sensors mask");
32+
2833 void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info info)
2934 {
3035 union sfh_cmd_param cmd_param;
@@ -73,12 +78,41 @@ void amd_stop_all_sensors(struct amd_mp2_dev *privdata) · 42 unmodified lines
7378 writel(cmd_base.ul, privdata->mmio + AMD_C2P_MSG0);
7479 }
7580
81+static const struct dmi_system_id dmi_sensor_mask_overrides[] = {
82+ {
83+ .matches = {
84+ DMI_MATCH(DMI_PRODUCT_NAME, "HP ENVY x360 Convertible 13-ag0xxx"),
85+ },
86+ .driver_data = (void *)(ACEL_EN | MAGNO_EN),
87+ },
88+ {
89+ .matches = {
90+ DMI_MATCH(DMI_PRODUCT_NAME, "HP ENVY x360 Convertible 15-cp0xxx"),
91+ },
92+ .driver_data = (void *)(ACEL_EN | MAGNO_EN),
93+ },
94+ { }
95+};
96+
7697 int amd_mp2_get_sensor_num(struct amd_mp2_dev *privdata, u8 *sensor_id)
7798 {
7899 int activestatus, num_of_sensors = 0;
100+ const struct dmi_system_id *dmi_id;
101+ u32 activecontrolstatus;
102+
103+ if (sensor_mask_override == -1) {
104+ dmi_id = dmi_first_match(dmi_sensor_mask_overrides);
105+ if (dmi_id)
106+ sensor_mask_override = (long)dmi_id->driver_data;
107+ }
108+
109+ if (sensor_mask_override >= 0) {
110+ activestatus = sensor_mask_override;
111+ } else {
112+ activecontrolstatus = readl(privdata->mmio + AMD_P2C_MSG3);
113+ activestatus = activecontrolstatus >> 4;
114+ }
79115
80− privdata->activecontrolstatus = readl(privdata->mmio + AMD_P2C_MSG3);
81− activestatus = privdata->activecontrolstatus >> 4;
82116 if (ACEL_EN & activestatus)
83117 sensor_id[num_of_sensors++] = accel_idx;
84118
drivers/hid/amd-sfh-hid/amd_sfh_pcie.h+0−1
@@ -61,7 +61,6 @@ struct amd_mp2_dev { · 60 unmodified lines
6161 struct pci_dev *pdev;
6262 struct amdtp_cl_data *cl_data;
6363 void __iomem *mmio;
64− u32 activecontrolstatus;
6564 };
6665
6766 struct amd_mp2_sensor_info {
drivers/hid/hid-alps.c+1−0
@@ -761,6 +761,7 @@ static int alps_input_configured(struct hid_device *hdev, struct hid_input *hi) · 760 unmodified lines
761761
762762 if (input_register_device(data->input2)) {
763763 input_free_device(input2);
764+ ret = -ENOENT;
764765 goto exit;
765766 }
766767 }
drivers/hid/hid-asus.c+3−0
@@ -1221,6 +1221,9 @@ static const struct hid_device_id asus_devices[] = { · 1220 unmodified lines
12211221 { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
12221222 USB_DEVICE_ID_ASUSTEK_ROG_NKEY_KEYBOARD),
12231223 QUIRK_USE_KBD_BACKLIGHT | QUIRK_ROG_NKEY_KEYBOARD },
1224+ { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
1225+ USB_DEVICE_ID_ASUSTEK_ROG_NKEY_KEYBOARD2),
1226+ QUIRK_USE_KBD_BACKLIGHT | QUIRK_ROG_NKEY_KEYBOARD },
12241227 { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
12251228 USB_DEVICE_ID_ASUSTEK_T100TA_KEYBOARD),
12261229 QUIRK_T100_KEYBOARD | QUIRK_NO_CONSUMER_USAGES },
drivers/hid/hid-cp2112.c+11−11
@@ -161,6 +161,7 @@ struct cp2112_device { · 160 unmodified lines
161161 atomic_t read_avail;
162162 atomic_t xfer_avail;
163163 struct gpio_chip gc;
164+ struct irq_chip irq;
164165 u8 *in_out_buffer;
165166 struct mutex lock;
166167
@@ -1175,16 +1176,6 @@ static int cp2112_gpio_irq_type(struct irq_data *d, unsigned int type) · 1008 unmodified lines
11751176 return 0;
11761177 }
11771178
1178−static struct irq_chip cp2112_gpio_irqchip = {
1179− .name = "cp2112-gpio",
1180− .irq_startup = cp2112_gpio_irq_startup,
1181− .irq_shutdown = cp2112_gpio_irq_shutdown,
1182− .irq_ack = cp2112_gpio_irq_ack,
1183− .irq_mask = cp2112_gpio_irq_mask,
1184− .irq_unmask = cp2112_gpio_irq_unmask,
1185− .irq_set_type = cp2112_gpio_irq_type,
1186−};
1187−
11881179 static int __maybe_unused cp2112_allocate_irq(struct cp2112_device *dev,
11891180 int pin)
11901181 {
@@ -1339,8 +1330,17 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id) · 148 unmodified lines
13391330 dev->gc.can_sleep = 1;
13401331 dev->gc.parent = &hdev->dev;
13411332
1333+ dev->irq.name = "cp2112-gpio";
1334+ dev->irq.irq_startup = cp2112_gpio_irq_startup;
1335+ dev->irq.irq_shutdown = cp2112_gpio_irq_shutdown;
1336+ dev->irq.irq_ack = cp2112_gpio_irq_ack;
1337+ dev->irq.irq_mask = cp2112_gpio_irq_mask;
1338+ dev->irq.irq_unmask = cp2112_gpio_irq_unmask;
1339+ dev->irq.irq_set_type = cp2112_gpio_irq_type;
1340+ dev->irq.flags = IRQCHIP_MASK_ON_SUSPEND;
1341+
13421342 girq = &dev->gc.irq;
1343− girq->chip = &cp2112_gpio_irqchip;
1343+ girq->chip = &dev->irq;
13441344 /* The event comes from the outside so no parent handler */
13451345 girq->parent_handler = NULL;
13461346 girq->num_parents = 0;
drivers/hid/hid-google-hammer.c+2−0
@@ -573,6 +573,8 @@ static void hammer_remove(struct hid_device *hdev) · 572 unmodified lines
573573 }
574574
575575 static const struct hid_device_id hammer_devices[] = {
576+ { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC,
577+ USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_DON) },
576578 { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC,
577579 USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_HAMMER) },
578580 { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC,
drivers/hid/hid-ids.h+2−0
@@ -194,6 +194,7 @@ · 193 unmodified lines
194194 #define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD2 0x1837
195195 #define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD3 0x1822
196196 #define USB_DEVICE_ID_ASUSTEK_ROG_NKEY_KEYBOARD 0x1866
197+#define USB_DEVICE_ID_ASUSTEK_ROG_NKEY_KEYBOARD2 0x19b6
197198 #define USB_DEVICE_ID_ASUSTEK_FX503VD_KEYBOARD 0x1869
198199
199200 #define USB_VENDOR_ID_ATEN 0x0557
@@ -493,6 +494,7 @@ · 293 unmodified lines
493494 #define USB_DEVICE_ID_GOOGLE_MASTERBALL 0x503c
494495 #define USB_DEVICE_ID_GOOGLE_MAGNEMITE 0x503d
495496 #define USB_DEVICE_ID_GOOGLE_MOONBALL 0x5044
497+#define USB_DEVICE_ID_GOOGLE_DON 0x5050
496498
497499 #define USB_VENDOR_ID_GOTOP 0x08f2
498500 #define USB_DEVICE_ID_SUPER_Q2 0x007f
drivers/hid/wacom_wac.c+3−5
@@ -2533,7 +2533,7 @@ static void wacom_wac_finger_slot(struct wacom_wac *wacom_wac, · 2532 unmodified lines
25332533 !wacom_wac->shared->is_touch_on) {
25342534 if (!wacom_wac->shared->touch_down)
25352535 return;
2536− prox = 0;
2536+ prox = false;
25372537 }
25382538
25392539 wacom_wac->hid_data.num_received++;
@@ -3574,8 +3574,6 @@ int wacom_setup_pen_input_capabilities(struct input_dev *input_dev, · 1034 unmodified lines
35743574 {
35753575 struct wacom_features *features = &wacom_wac->features;
35763576
3577− input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
3578−
35793577 if (!(features->device_type & WACOM_DEVICETYPE_PEN))
35803578 return -ENODEV;
35813579
@@ -3590,6 +3588,7 @@ int wacom_setup_pen_input_capabilities(struct input_dev *input_dev, · 8 unmodified lines
35903588 return 0;
35913589 }
35923590
3591+ input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
35933592 __set_bit(BTN_TOUCH, input_dev->keybit);
35943593 __set_bit(ABS_MISC, input_dev->absbit);
35953594
@@ -3742,8 +3741,6 @@ int wacom_setup_touch_input_capabilities(struct input_dev *input_dev, · 146 unmodified lines
37423741 {
37433742 struct wacom_features *features = &wacom_wac->features;
37443743
3745− input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
3746−
37473744 if (!(features->device_type & WACOM_DEVICETYPE_TOUCH))
37483745 return -ENODEV;
37493746
@@ -3756,6 +3753,7 @@ int wacom_setup_touch_input_capabilities(struct input_dev *input_dev, · 6 unmodified lines
37563753 /* setup has already been done */
37573754 return 0;
37583755
3756+ input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
37593757 __set_bit(BTN_TOUCH, input_dev->keybit);
37603758
37613759 if (features->touch_max == 1) {
drivers/i2c/busses/i2c-designware-master.c+1−0
@@ -129,6 +129,7 @@ static int i2c_dw_set_timings_master(struct dw_i2c_dev *dev) · 128 unmodified lines
129129 if ((comp_param1 & DW_IC_COMP_PARAM_1_SPEED_MODE_MASK)
130130 != DW_IC_COMP_PARAM_1_SPEED_MODE_HIGH) {
131131 dev_err(dev->dev, "High Speed not supported!\n");
132+ t->bus_freq_hz = I2C_MAX_FAST_MODE_FREQ;
132133 dev->master_cfg &= ~DW_IC_CON_SPEED_MASK;
133134 dev->master_cfg |= DW_IC_CON_SPEED_FAST;
134135 dev->hs_hcnt = 0;
drivers/i2c/busses/i2c-exynos5.c+1−1
@@ -1,5 +1,5 @@
11 // SPDX-License-Identifier: GPL-2.0-only
2−/**
2+/*
33 * i2c-exynos5.c - Samsung Exynos5 I2C Controller Driver
44 *
55 * Copyright (C) 2013 Samsung Electronics Co., Ltd.
drivers/i2c/busses/i2c-hix5hd2.c+1−1
@@ -1,7 +1,7 @@
11 // SPDX-License-Identifier: GPL-2.0-or-later
22 /*
33 * Copyright (c) 2014 Linaro Ltd.
4− * Copyright (c) 2014 Hisilicon Limited.
4+ * Copyright (c) 2014 HiSilicon Limited.
55 *
66 * Now only support 7 bit address.
77 */
drivers/i2c/busses/i2c-jz4780.c+2−2
@@ -525,8 +525,8 @@ static irqreturn_t jz4780_i2c_irq(int irqno, void *dev_id) · 524 unmodified lines
525525 i2c_sta = jz4780_i2c_readw(i2c, JZ4780_I2C_STA);
526526 data = *i2c->wbuf;
527527 data &= ~JZ4780_I2C_DC_READ;
528− if ((!i2c->stop_hold) && (i2c->cdata->version >=
529− ID_X1000))
528+ if ((i2c->wt_len == 1) && (!i2c->stop_hold) &&
529+ (i2c->cdata->version >= ID_X1000))
530530 data |= X1000_I2C_DC_STOP;
531531 jz4780_i2c_writew(i2c, JZ4780_I2C_DC, data);
532532 i2c->wbuf++;
drivers/i2c/busses/i2c-mv64xxx.c+4−0
@@ -221,6 +221,10 @@ mv64xxx_i2c_hw_init(struct mv64xxx_i2c_data *drv_data) · 220 unmodified lines
221221 writel(0, drv_data->reg_base + drv_data->reg_offsets.ext_addr);
222222 writel(MV64XXX_I2C_REG_CONTROL_TWSIEN | MV64XXX_I2C_REG_CONTROL_STOP,
223223 drv_data->reg_base + drv_data->reg_offsets.control);
224+
225+ if (drv_data->errata_delay)
226+ udelay(5);
227+
224228 drv_data->state = MV64XXX_I2C_STATE_IDLE;
225229 }
226230
drivers/i2c/busses/i2c-stm32f4.c+1−1
@@ -534,7 +534,7 @@ static void stm32f4_i2c_handle_rx_addr(struct stm32f4_i2c_dev *i2c_dev) · 533 unmodified lines
534534 default:
535535 /*
536536 * N-byte reception:
537− * Enable ACK, reset POS (ACK postion) and clear ADDR flag.
537+ * Enable ACK, reset POS (ACK position) and clear ADDR flag.
538538 * In that way, ACK will be sent as soon as the current byte
539539 * will be received in the shift register
540540 */
drivers/i2c/i2c-core-base.c+4−3
@@ -378,7 +378,7 @@ static int i2c_gpio_init_recovery(struct i2c_adapter *adap) · 377 unmodified lines
378378 static int i2c_init_recovery(struct i2c_adapter *adap)
379379 {
380380 struct i2c_bus_recovery_info *bri = adap->bus_recovery_info;
381− char *err_str;
381+ char *err_str, *err_level = KERN_ERR;
382382
383383 if (!bri)
384384 return 0;
@@ -387,7 +387,8 @@ static int i2c_init_recovery(struct i2c_adapter *adap) · 2 unmodified lines
387387 return -EPROBE_DEFER;
388388
389389 if (!bri->recover_bus) {
390− err_str = "no recover_bus() found";
390+ err_str = "no suitable method provided";
391+ err_level = KERN_DEBUG;
391392 goto err;
392393 }
393394
@@ -414,7 +415,7 @@ static int i2c_init_recovery(struct i2c_adapter *adap) · 20 unmodified lines
414415
415416 return 0;
416417 err:
417− dev_err(&adap->dev, "Not using recovery: %s\n", err_str);
418+ dev_printk(err_level, &adap->dev, "Not using recovery: %s\n", err_str);
418419 adap->bus_recovery_info = NULL;
419420
420421 return -EINVAL;
drivers/iio/adc/Kconfig+3−0
@@ -266,6 +266,8 @@ config ADI_AXI_ADC · 265 unmodified lines
266266 select IIO_BUFFER
267267 select IIO_BUFFER_HW_CONSUMER
268268 select IIO_BUFFER_DMAENGINE
269+ depends on HAS_IOMEM
270+ depends on OF
269271 help
270272 Say yes here to build support for Analog Devices Generic
271273 AXI ADC IP core. The IP core is used for interfacing with
@@ -923,6 +925,7 @@ config STM32_ADC_CORE · 651 unmodified lines
923925 depends on ARCH_STM32 || COMPILE_TEST
924926 depends on OF
925927 depends on REGULATOR
928+ depends on HAS_IOMEM
926929 select IIO_BUFFER
927930 select MFD_STM32_TIMERS
928931 select IIO_STM32_TIMER_TRIGGER
drivers/iio/adc/ab8500-gpadc.c+1−1
@@ -918,7 +918,7 @@ static int ab8500_gpadc_read_raw(struct iio_dev *indio_dev, · 917 unmodified lines
918918 return processed;
919919
920920 /* Return millivolt or milliamps or millicentigrades */
921− *val = processed * 1000;
921+ *val = processed;
922922 return IIO_VAL_INT;
923923 }
924924
drivers/iio/adc/ad7949.c+1−1
@@ -91,7 +91,7 @@ static int ad7949_spi_read_channel(struct ad7949_adc_chip *ad7949_adc, int *val, · 90 unmodified lines
9191 int ret;
9292 int i;
9393 int bits_per_word = ad7949_adc->resolution;
94− int mask = GENMASK(ad7949_adc->resolution, 0);
94+ int mask = GENMASK(ad7949_adc->resolution - 1, 0);
9595 struct spi_message msg;
9696 struct spi_transfer tx[] = {
9797 {
drivers/iio/adc/qcom-spmi-vadc.c+1−1
@@ -597,7 +597,7 @@ static const struct vadc_channels vadc_chans[] = { · 596 unmodified lines
597597 VADC_CHAN_NO_SCALE(P_MUX16_1_3, 1)
598598
599599 VADC_CHAN_NO_SCALE(LR_MUX1_BAT_THERM, 0)
600− VADC_CHAN_NO_SCALE(LR_MUX2_BAT_ID, 0)
600+ VADC_CHAN_VOLT(LR_MUX2_BAT_ID, 0, SCALE_DEFAULT)
601601 VADC_CHAN_NO_SCALE(LR_MUX3_XO_THERM, 0)
602602 VADC_CHAN_NO_SCALE(LR_MUX4_AMUX_THM1, 0)
603603 VADC_CHAN_NO_SCALE(LR_MUX5_AMUX_THM2, 0)
drivers/iio/gyro/mpu3050-core.c+2−0
@@ -551,6 +551,8 @@ static irqreturn_t mpu3050_trigger_handler(int irq, void *p) · 550 unmodified lines
551551 MPU3050_FIFO_R,
552552 &fifo_values[offset],
553553 toread);
554+ if (ret)
555+ goto out_trigger_unlock;
554556
555557 dev_dbg(mpu3050->dev,
556558 "%04x %04x %04x %04x %04x\n",
drivers/iio/humidity/hid-sensor-humidity.c+7−5
@@ -15,7 +15,10 @@ · 14 unmodified lines
1515 struct hid_humidity_state {
1616 struct hid_sensor_common common_attributes;
1717 struct hid_sensor_hub_attribute_info humidity_attr;
18− s32 humidity_data;
18+ struct {
19+ s32 humidity_data;
20+ u64 timestamp __aligned(8);
21+ } scan;
1922 int scale_pre_decml;
2023 int scale_post_decml;
2124 int scale_precision;
@@ -125,9 +128,8 @@ static int humidity_proc_event(struct hid_sensor_hub_device *hsdev, · 103 unmodified lines
125128 struct hid_humidity_state *humid_st = iio_priv(indio_dev);
126129
127130 if (atomic_read(&humid_st->common_attributes.data_ready))
128− iio_push_to_buffers_with_timestamp(indio_dev,
129− &humid_st->humidity_data,
130− iio_get_time_ns(indio_dev));
131+ iio_push_to_buffers_with_timestamp(indio_dev, &humid_st->scan,
132+ iio_get_time_ns(indio_dev));
131133
132134 return 0;
133135 }
@@ -142,7 +144,7 @@ static int humidity_capture_sample(struct hid_sensor_hub_device *hsdev, · 8 unmodified lines
142144
143145 switch (usage_id) {
144146 case HID_USAGE_SENSOR_ATMOSPHERIC_HUMIDITY:
145− humid_st->humidity_data = *(s32 *)raw_data;
147+ humid_st->scan.humidity_data = *(s32 *)raw_data;
146148
147149 return 0;
148150 default:
drivers/iio/imu/adis16400.c+1−2
@@ -462,8 +462,7 @@ static int adis16400_initial_setup(struct iio_dev *indio_dev) · 461 unmodified lines
462462 if (ret)
463463 goto err_ret;
464464
465− ret = sscanf(indio_dev->name, "adis%u\n", &device_id);
466− if (ret != 1) {
465+ if (sscanf(indio_dev->name, "adis%u\n", &device_id) != 1) {
467466 ret = -EINVAL;
468467 goto err_ret;
469468 }
drivers/iio/light/hid-sensor-prox.c+11−2
@@ -23,6 +23,9 @@ struct prox_state { · 22 unmodified lines
2323 struct hid_sensor_common common_attributes;
2424 struct hid_sensor_hub_attribute_info prox_attr;
2525 u32 human_presence;
26+ int scale_pre_decml;
27+ int scale_post_decml;
28+ int scale_precision;
2629 };
2730
2831 /* Channel definitions */
@@ -93,8 +96,9 @@ static int prox_read_raw(struct iio_dev *indio_dev, · 64 unmodified lines
9396 ret_type = IIO_VAL_INT;
9497 break;
9598 case IIO_CHAN_INFO_SCALE:
96− *val = prox_state->prox_attr.units;
97− ret_type = IIO_VAL_INT;
99+ *val = prox_state->scale_pre_decml;
100+ *val2 = prox_state->scale_post_decml;
101+ ret_type = prox_state->scale_precision;
98102 break;
99103 case IIO_CHAN_INFO_OFFSET:
100104 *val = hid_sensor_convert_exponent(
@@ -234,6 +238,11 @@ static int prox_parse_report(struct platform_device *pdev, · 133 unmodified lines
234238 HID_USAGE_SENSOR_HUMAN_PRESENCE,
235239 &st->common_attributes.sensitivity);
236240
241+ st->scale_precision = hid_sensor_format_scale(
242+ hsdev->usage,
243+ &st->prox_attr,
244+ &st->scale_pre_decml, &st->scale_post_decml);
245+
237246 return ret;
238247 }
239248
drivers/iio/temperature/hid-sensor-temperature.c+8−6
@@ -15,7 +15,10 @@ · 14 unmodified lines
1515 struct temperature_state {
1616 struct hid_sensor_common common_attributes;
1717 struct hid_sensor_hub_attribute_info temperature_attr;
18− s32 temperature_data;
18+ struct {
19+ s32 temperature_data;
20+ u64 timestamp __aligned(8);
21+ } scan;
1922 int scale_pre_decml;
2023 int scale_post_decml;
2124 int scale_precision;
@@ -32,7 +35,7 @@ static const struct iio_chan_spec temperature_channels[] = { · 10 unmodified lines
3235 BIT(IIO_CHAN_INFO_SAMP_FREQ) |
3336 BIT(IIO_CHAN_INFO_HYSTERESIS),
3437 },
35− IIO_CHAN_SOFT_TIMESTAMP(3),
38+ IIO_CHAN_SOFT_TIMESTAMP(1),
3639 };
3740
3841 /* Adjust channel real bits based on report descriptor */
@@ -123,9 +126,8 @@ static int temperature_proc_event(struct hid_sensor_hub_device *hsdev, · 84 unmodified lines
123126 struct temperature_state *temp_st = iio_priv(indio_dev);
124127
125128 if (atomic_read(&temp_st->common_attributes.data_ready))
126− iio_push_to_buffers_with_timestamp(indio_dev,
127− &temp_st->temperature_data,
128− iio_get_time_ns(indio_dev));
129+ iio_push_to_buffers_with_timestamp(indio_dev, &temp_st->scan,
130+ iio_get_time_ns(indio_dev));
129131
130132 return 0;
131133 }
@@ -140,7 +142,7 @@ static int temperature_capture_sample(struct hid_sensor_hub_device *hsdev, · 8 unmodified lines
140142
141143 switch (usage_id) {
142144 case HID_USAGE_SENSOR_DATA_ENVIRONMENTAL_TEMPERATURE:
143− temp_st->temperature_data = *(s32 *)raw_data;
145+ temp_st->scan.temperature_data = *(s32 *)raw_data;
144146 return 0;
145147 default:
146148 return -EINVAL;
drivers/infiniband/core/addr.c+3−1
@@ -76,7 +76,9 @@ static struct workqueue_struct *addr_wq; · 75 unmodified lines
7676
7777 static const struct nla_policy ib_nl_addr_policy[LS_NLA_TYPE_MAX] = {
7878 [LS_NLA_TYPE_DGID] = {.type = NLA_BINARY,
79− .len = sizeof(struct rdma_nla_ls_gid)},
79+ .len = sizeof(struct rdma_nla_ls_gid),
80+ .validation_type = NLA_VALIDATE_MIN,
81+ .min = sizeof(struct rdma_nla_ls_gid)},
8082 };
8183
8284 static inline bool ib_nl_is_good_ip_resp(const struct nlmsghdr *nlh)
drivers/infiniband/hw/cxgb4/cm.c+3−2
@@ -3610,13 +3610,14 @@ int c4iw_destroy_listen(struct iw_cm_id *cm_id) · 3609 unmodified lines
36103610 ep->com.local_addr.ss_family == AF_INET) {
36113611 err = cxgb4_remove_server_filter(
36123612 ep->com.dev->rdev.lldi.ports[0], ep->stid,
3613− ep->com.dev->rdev.lldi.rxq_ids[0], 0);
3613+ ep->com.dev->rdev.lldi.rxq_ids[0], false);
36143614 } else {
36153615 struct sockaddr_in6 *sin6;
36163616 c4iw_init_wr_wait(ep->com.wr_waitp);
36173617 err = cxgb4_remove_server(
36183618 ep->com.dev->rdev.lldi.ports[0], ep->stid,
3619− ep->com.dev->rdev.lldi.rxq_ids[0], 0);
3619+ ep->com.dev->rdev.lldi.rxq_ids[0],
3620+ ep->com.local_addr.ss_family == AF_INET6);
36203621 if (err)
36213622 goto done;
36223623 err = c4iw_wait_for_reply(&ep->com.dev->rdev, ep->com.wr_waitp,
drivers/infiniband/hw/hfi1/affinity.c+5−16
@@ -632,22 +632,11 @@ static void _dev_comp_vect_cpu_mask_clean_up(struct hfi1_devdata *dd, · 631 unmodified lines
632632 */
633633 int hfi1_dev_affinity_init(struct hfi1_devdata *dd)
634634 {
635− int node = pcibus_to_node(dd->pcidev->bus);
636635 struct hfi1_affinity_node *entry;
637636 const struct cpumask *local_mask;
638637 int curr_cpu, possible, i, ret;
639638 bool new_entry = false;
640639
641− /*
642− * If the BIOS does not have the NUMA node information set, select
643− * NUMA 0 so we get consistent performance.
644− */
645− if (node < 0) {
646− dd_dev_err(dd, "Invalid PCI NUMA node. Performance may be affected\n");
647− node = 0;
648− }
649− dd->node = node;
650−
651640 local_mask = cpumask_of_node(dd->node);
652641 if (cpumask_first(local_mask) >= nr_cpu_ids)
653642 local_mask = topology_core_cpumask(0);
@@ -660,7 +649,7 @@ int hfi1_dev_affinity_init(struct hfi1_devdata *dd) · 6 unmodified lines
660649 * create an entry in the global affinity structure and initialize it.
661650 */
662651 if (!entry) {
663− entry = node_affinity_allocate(node);
652+ entry = node_affinity_allocate(dd->node);
664653 if (!entry) {
665654 dd_dev_err(dd,
666655 "Unable to allocate global affinity node\n");
@@ -751,6 +740,7 @@ int hfi1_dev_affinity_init(struct hfi1_devdata *dd) · 84 unmodified lines
751740 if (new_entry)
752741 node_affinity_add_tail(entry);
753742
743+ dd->affinity_entry = entry;
754744 mutex_unlock(&node_affinity.lock);
755745
756746 return 0;
@@ -766,10 +756,9 @@ void hfi1_dev_affinity_clean_up(struct hfi1_devdata *dd) · 9 unmodified lines
766756 {
767757 struct hfi1_affinity_node *entry;
768758
769− if (dd->node < 0)
770− return;
771−
772759 mutex_lock(&node_affinity.lock);
760+ if (!dd->affinity_entry)
761+ goto unlock;
773762 entry = node_affinity_lookup(dd->node);
774763 if (!entry)
775764 goto unlock;
@@ -780,8 +769,8 @@ void hfi1_dev_affinity_clean_up(struct hfi1_devdata *dd) · 4 unmodified lines
780769 */
781770 _dev_comp_vect_cpu_mask_clean_up(dd, entry);
782771 unlock:
772+ dd->affinity_entry = NULL;
783773 mutex_unlock(&node_affinity.lock);
784− dd->node = NUMA_NO_NODE;
785774 }
786775
787776 /*
drivers/infiniband/hw/hfi1/hfi.h+1−0
@@ -1409,6 +1409,7 @@ struct hfi1_devdata { · 1408 unmodified lines
14091409 spinlock_t irq_src_lock;
14101410 int vnic_num_vports;
14111411 struct net_device *dummy_netdev;
1412+ struct hfi1_affinity_node *affinity_entry;
14121413
14131414 /* Keeps track of IPoIB RSM rule users */
14141415 atomic_t ipoib_rsm_usr_num;
drivers/infiniband/hw/hfi1/init.c+9−1
@@ -1277,7 +1277,6 @@ static struct hfi1_devdata *hfi1_alloc_devdata(struct pci_dev *pdev, · 1276 unmodified lines
12771277 dd->pport = (struct hfi1_pportdata *)(dd + 1);
12781278 dd->pcidev = pdev;
12791279 pci_set_drvdata(pdev, dd);
1280− dd->node = NUMA_NO_NODE;
12811280
12821281 ret = xa_alloc_irq(&hfi1_dev_table, &dd->unit, dd, xa_limit_32b,
12831282 GFP_KERNEL);
@@ -1287,6 +1286,15 @@ static struct hfi1_devdata *hfi1_alloc_devdata(struct pci_dev *pdev, · 3 unmodified lines
12871286 goto bail;
12881287 }
12891288 rvt_set_ibdev_name(&dd->verbs_dev.rdi, "%s_%d", class_name(), dd->unit);
1289+ /*
1290+ * If the BIOS does not have the NUMA node information set, select
1291+ * NUMA 0 so we get consistent performance.
1292+ */
1293+ dd->node = pcibus_to_node(pdev->bus);
1294+ if (dd->node == NUMA_NO_NODE) {
1295+ dd_dev_err(dd, "Invalid PCI NUMA node. Performance may be affected\n");
1296+ dd->node = 0;
1297+ }
12901298
12911299 /*
12921300 * Initialize all locks for the device. This needs to be as early as
drivers/infiniband/hw/hfi1/netdev_rx.c+1−2
@@ -173,8 +173,7 @@ u32 hfi1_num_netdev_contexts(struct hfi1_devdata *dd, u32 available_contexts, · 172 unmodified lines
173173 return 0;
174174 }
175175
176− cpumask_and(node_cpu_mask, cpu_mask,
177− cpumask_of_node(pcibus_to_node(dd->pcidev->bus)));
176+ cpumask_and(node_cpu_mask, cpu_mask, cpumask_of_node(dd->node));
178177
179178 available_cpus = cpumask_weight(node_cpu_mask);
180179
drivers/infiniband/hw/hns/hns_roce_hw_v2.c+3−1
@@ -1194,8 +1194,10 @@ static void hns_roce_cmq_init_regs(struct hns_roce_dev *hr_dev, bool ring_type) · 1193 unmodified lines
11941194 upper_32_bits(dma));
11951195 roce_write(hr_dev, ROCEE_TX_CMQ_DEPTH_REG,
11961196 (u32)ring->desc_num >> HNS_ROCE_CMQ_DESC_NUM_S);
1197− roce_write(hr_dev, ROCEE_TX_CMQ_HEAD_REG, 0);
1197+
1198+ /* Make sure to write tail first and then head */
11981199 roce_write(hr_dev, ROCEE_TX_CMQ_TAIL_REG, 0);
1200+ roce_write(hr_dev, ROCEE_TX_CMQ_HEAD_REG, 0);
11991201 } else {
12001202 roce_write(hr_dev, ROCEE_RX_CMQ_BASEADDR_L_REG, (u32)dma);
12011203 roce_write(hr_dev, ROCEE_RX_CMQ_BASEADDR_H_REG,
drivers/infiniband/hw/mlx5/devx.c+1−1
@@ -1116,7 +1116,7 @@ static void devx_obj_build_destroy_cmd(void *in, void *out, void *din, · 1115 unmodified lines
11161116 case MLX5_CMD_OP_CREATE_MKEY:
11171117 MLX5_SET(destroy_mkey_in, din, opcode,
11181118 MLX5_CMD_OP_DESTROY_MKEY);
1119− MLX5_SET(destroy_mkey_in, in, mkey_index, *obj_id);
1119+ MLX5_SET(destroy_mkey_in, din, mkey_index, *obj_id);
11201120 break;
11211121 case MLX5_CMD_OP_CREATE_CQ:
11221122 MLX5_SET(destroy_cq_in, din, opcode, MLX5_CMD_OP_DESTROY_CQ);
drivers/infiniband/hw/mlx5/qp.c+14−4
@@ -1078,7 +1078,7 @@ static int _create_kernel_qp(struct mlx5_ib_dev *dev, · 1077 unmodified lines
10781078
10791079 qpc = MLX5_ADDR_OF(create_qp_in, *in, qpc);
10801080 MLX5_SET(qpc, qpc, uar_page, uar_index);
1081− MLX5_SET(qpc, qpc, ts_format, MLX5_QPC_TIMESTAMP_FORMAT_DEFAULT);
1081+ MLX5_SET(qpc, qpc, ts_format, mlx5_get_qp_default_ts(dev->mdev));
10821082 MLX5_SET(qpc, qpc, log_page_size, qp->buf.page_shift - MLX5_ADAPTER_PAGE_SHIFT);
10831083
10841084 /* Set "fast registration enabled" for all kernel QPs */
@@ -1188,7 +1188,8 @@ static int get_rq_ts_format(struct mlx5_ib_dev *dev, struct mlx5_ib_cq *send_cq) · 103 unmodified lines
11881188 }
11891189 return MLX5_RQC_TIMESTAMP_FORMAT_FREE_RUNNING;
11901190 }
1191− return MLX5_RQC_TIMESTAMP_FORMAT_DEFAULT;
1191+ return fr_supported ? MLX5_RQC_TIMESTAMP_FORMAT_FREE_RUNNING :
1192+ MLX5_RQC_TIMESTAMP_FORMAT_DEFAULT;
11921193 }
11931194
11941195 static int get_sq_ts_format(struct mlx5_ib_dev *dev, struct mlx5_ib_cq *send_cq)
@@ -1206,7 +1207,8 @@ static int get_sq_ts_format(struct mlx5_ib_dev *dev, struct mlx5_ib_cq *send_cq) · 11 unmodified lines
12061207 }
12071208 return MLX5_SQC_TIMESTAMP_FORMAT_FREE_RUNNING;
12081209 }
1209− return MLX5_SQC_TIMESTAMP_FORMAT_DEFAULT;
1210+ return fr_supported ? MLX5_SQC_TIMESTAMP_FORMAT_FREE_RUNNING :
1211+ MLX5_SQC_TIMESTAMP_FORMAT_DEFAULT;
12101212 }
12111213
12121214 static int get_qp_ts_format(struct mlx5_ib_dev *dev, struct mlx5_ib_cq *send_cq,
@@ -1217,7 +1219,8 @@ static int get_qp_ts_format(struct mlx5_ib_dev *dev, struct mlx5_ib_cq *send_cq, · 4 unmodified lines
12171219 MLX5_QP_TIMESTAMP_FORMAT_CAP_FREE_RUNNING ||
12181220 MLX5_CAP_ROCE(dev->mdev, qp_ts_format) ==
12191221 MLX5_QP_TIMESTAMP_FORMAT_CAP_FREE_RUNNING_AND_REAL_TIME;
1220− int ts_format = MLX5_QPC_TIMESTAMP_FORMAT_DEFAULT;
1222+ int ts_format = fr_supported ? MLX5_QPC_TIMESTAMP_FORMAT_FREE_RUNNING :
1223+ MLX5_QPC_TIMESTAMP_FORMAT_DEFAULT;
12211224
12221225 if (recv_cq &&
12231226 recv_cq->create_flags & IB_UVERBS_CQ_FLAGS_TIMESTAMP_COMPLETION)
@@ -1930,6 +1933,7 @@ static int create_xrc_tgt_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp, · 706 unmodified lines
19301933 if (qp->flags & IB_QP_CREATE_MANAGED_RECV)
19311934 MLX5_SET(qpc, qpc, cd_slave_receive, 1);
19321935
1936+ MLX5_SET(qpc, qpc, ts_format, mlx5_get_qp_default_ts(dev->mdev));
19331937 MLX5_SET(qpc, qpc, rq_type, MLX5_SRQ_RQ);
19341938 MLX5_SET(qpc, qpc, no_sq, 1);
19351939 MLX5_SET(qpc, qpc, cqn_rcv, to_mcq(devr->c0)->mcq.cqn);
@@ -4873,6 +4877,7 @@ static int create_rq(struct mlx5_ib_rwq *rwq, struct ib_pd *pd, · 2937 unmodified lines
48734877 struct mlx5_ib_dev *dev;
48744878 int has_net_offloads;
48754879 __be64 *rq_pas0;
4880+ int ts_format;
48764881 void *in;
48774882 void *rqc;
48784883 void *wq;
@@ -4881,6 +4886,10 @@ static int create_rq(struct mlx5_ib_rwq *rwq, struct ib_pd *pd, · 2 unmodified lines
48814886
48824887 dev = to_mdev(pd->device);
48834888
4889+ ts_format = get_rq_ts_format(dev, to_mcq(init_attr->cq));
4890+ if (ts_format < 0)
4891+ return ts_format;
4892+
48844893 inlen = MLX5_ST_SZ_BYTES(create_rq_in) + sizeof(u64) * rwq->rq_num_pas;
48854894 in = kvzalloc(inlen, GFP_KERNEL);
48864895 if (!in)
@@ -4890,6 +4899,7 @@ static int create_rq(struct mlx5_ib_rwq *rwq, struct ib_pd *pd, · 3 unmodified lines
48904899 rqc = MLX5_ADDR_OF(create_rq_in, in, ctx);
48914900 MLX5_SET(rqc, rqc, mem_rq_type,
48924901 MLX5_RQC_MEM_RQ_TYPE_MEMORY_RQ_INLINE);
4902+ MLX5_SET(rqc, rqc, ts_format, ts_format);
48934903 MLX5_SET(rqc, rqc, user_index, rwq->user_index);
48944904 MLX5_SET(rqc, rqc, cqn, to_mcq(init_attr->cq)->mcq.cqn);
48954905 MLX5_SET(rqc, rqc, state, MLX5_RQC_STATE_RST);
drivers/infiniband/hw/qedr/verbs.c+2−1
@@ -1244,7 +1244,8 @@ static int qedr_check_qp_attrs(struct ib_pd *ibpd, struct qedr_dev *dev, · 1243 unmodified lines
12441244 * TGT QP isn't associated with RQ/SQ
12451245 */
12461246 if ((attrs->qp_type != IB_QPT_GSI) && (dev->gsi_qp_created) &&
1247− (attrs->qp_type != IB_QPT_XRC_TGT)) {
1247+ (attrs->qp_type != IB_QPT_XRC_TGT) &&
1248+ (attrs->qp_type != IB_QPT_XRC_INI)) {
12481249 struct qedr_cq *send_cq = get_qedr_cq(attrs->send_cq);
12491250 struct qedr_cq *recv_cq = get_qedr_cq(attrs->recv_cq);
12501251
drivers/infiniband/ulp/rtrs/rtrs-clt.c+1−1
@@ -2720,8 +2720,8 @@ void rtrs_clt_close(struct rtrs_clt *clt) · 2719 unmodified lines
27202720
27212721 /* Now it is safe to iterate over all paths without locks */
27222722 list_for_each_entry_safe(sess, tmp, &clt->paths_list, s.entry) {
2723− rtrs_clt_destroy_sess_files(sess, NULL);
27242723 rtrs_clt_close_conns(sess, true);
2724+ rtrs_clt_destroy_sess_files(sess, NULL);
27252725 kobject_put(&sess->kobj);
27262726 }
27272727 free_clt(clt);
drivers/input/joydev.c+0−1
@@ -26,7 +26,6 @@ · 25 unmodified lines
2626
2727 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
2828 MODULE_DESCRIPTION("Joystick device interfaces");
29−MODULE_SUPPORTED_DEVICE("input/js");
3029 MODULE_LICENSE("GPL");
3130
3231 #define JOYDEV_MINOR_BASE 0
drivers/input/joystick/n64joy.c+2−2
@@ -252,8 +252,8 @@ static int __init n64joy_probe(struct platform_device *pdev) · 251 unmodified lines
252252 mutex_init(&priv->n64joy_mutex);
253253
254254 priv->reg_base = devm_platform_ioremap_resource(pdev, 0);
255− if (!priv->reg_base) {
256− err = -EINVAL;
255+ if (IS_ERR(priv->reg_base)) {
256+ err = PTR_ERR(priv->reg_base);
257257 goto fail;
258258 }
259259
drivers/input/keyboard/nspire-keypad.c+31−25
@@ -93,9 +93,15 @@ static irqreturn_t nspire_keypad_irq(int irq, void *dev_id) · 92 unmodified lines
9393 return IRQ_HANDLED;
9494 }
9595
96−static int nspire_keypad_chip_init(struct nspire_keypad *keypad)
96+static int nspire_keypad_open(struct input_dev *input)
9797 {
98+ struct nspire_keypad *keypad = input_get_drvdata(input);
9899 unsigned long val = 0, cycles_per_us, delay_cycles, row_delay_cycles;
100+ int error;
101+
102+ error = clk_prepare_enable(keypad->clk);
103+ if (error)
104+ return error;
99105
100106 cycles_per_us = (clk_get_rate(keypad->clk) / 1000000);
101107 if (cycles_per_us == 0)
@@ -121,30 +127,6 @@ static int nspire_keypad_chip_init(struct nspire_keypad *keypad) · 19 unmodified lines
121127 keypad->int_mask = 1 << 1;
122128 writel(keypad->int_mask, keypad->reg_base + KEYPAD_INTMSK);
123129
124− /* Disable GPIO interrupts to prevent hanging on touchpad */
125− /* Possibly used to detect touchpad events */
126− writel(0, keypad->reg_base + KEYPAD_UNKNOWN_INT);
127− /* Acknowledge existing interrupts */
128− writel(~0, keypad->reg_base + KEYPAD_UNKNOWN_INT_STS);
129−
130− return 0;
131−}
132−
133−static int nspire_keypad_open(struct input_dev *input)
134−{
135− struct nspire_keypad *keypad = input_get_drvdata(input);
136− int error;
137−
138− error = clk_prepare_enable(keypad->clk);
139− if (error)
140− return error;
141−
142− error = nspire_keypad_chip_init(keypad);
143− if (error) {
144− clk_disable_unprepare(keypad->clk);
145− return error;
146− }
147−
148130 return 0;
149131 }
150132
@@ -152,6 +134,11 @@ static void nspire_keypad_close(struct input_dev *input) · 1 unmodified line
152134 {
153135 struct nspire_keypad *keypad = input_get_drvdata(input);
154136
137+ /* Disable interrupts */
138+ writel(0, keypad->reg_base + KEYPAD_INTMSK);
139+ /* Acknowledge existing interrupts */
140+ writel(~0, keypad->reg_base + KEYPAD_INT);
141+
155142 clk_disable_unprepare(keypad->clk);
156143 }
157144
@@ -210,6 +197,25 @@ static int nspire_keypad_probe(struct platform_device *pdev) · 52 unmodified lines
210197 return -ENOMEM;
211198 }
212199
200+ error = clk_prepare_enable(keypad->clk);
201+ if (error) {
202+ dev_err(&pdev->dev, "failed to enable clock\n");
203+ return error;
204+ }
205+
206+ /* Disable interrupts */
207+ writel(0, keypad->reg_base + KEYPAD_INTMSK);
208+ /* Acknowledge existing interrupts */
209+ writel(~0, keypad->reg_base + KEYPAD_INT);
210+
211+ /* Disable GPIO interrupts to prevent hanging on touchpad */
212+ /* Possibly used to detect touchpad events */
213+ writel(0, keypad->reg_base + KEYPAD_UNKNOWN_INT);
214+ /* Acknowledge existing GPIO interrupts */
215+ writel(~0, keypad->reg_base + KEYPAD_UNKNOWN_INT_STS);
216+
217+ clk_disable_unprepare(keypad->clk);
218+
213219 input_set_drvdata(input, keypad);
214220
215221 input->id.bustype = BUS_HOST;
drivers/input/serio/i8042-x86ia64io.h+1−0
@@ -588,6 +588,7 @@ static const struct dmi_system_id i8042_dmi_noselftest_table[] = { · 587 unmodified lines
588588 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
589589 DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /* Notebook */
590590 },
591+ }, {
591592 .matches = {
592593 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
593594 DMI_MATCH(DMI_CHASSIS_TYPE, "31"), /* Convertible Notebook */
drivers/input/touchscreen/elants_i2c.c+2−3
@@ -1441,7 +1441,7 @@ static int elants_i2c_probe(struct i2c_client *client, · 1440 unmodified lines
14411441
14421442 touchscreen_parse_properties(ts->input, true, &ts->prop);
14431443
1444− if (ts->chip_id == EKTF3624) {
1444+ if (ts->chip_id == EKTF3624 && ts->phy_x && ts->phy_y) {
14451445 /* calculate resolution from size */
14461446 ts->x_res = DIV_ROUND_CLOSEST(ts->prop.max_x, ts->phy_x);
14471447 ts->y_res = DIV_ROUND_CLOSEST(ts->prop.max_y, ts->phy_y);
@@ -1449,8 +1449,7 @@ static int elants_i2c_probe(struct i2c_client *client, · 1 unmodified line
14491449
14501450 input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res);
14511451 input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res);
1452− if (ts->major_res > 0)
1453− input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, ts->major_res);
1452+ input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, ts->major_res);
14541453
14551454 error = input_mt_init_slots(ts->input, MAX_CONTACT_NUM,
14561455 INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED);
drivers/input/touchscreen/s6sy761.c+2−2
@@ -145,8 +145,8 @@ static void s6sy761_report_coordinates(struct s6sy761_data *sdata, · 144 unmodified lines
145145 u8 major = event[4];
146146 u8 minor = event[5];
147147 u8 z = event[6] & S6SY761_MASK_Z;
148− u16 x = (event[1] << 3) | ((event[3] & S6SY761_MASK_X) >> 4);
149− u16 y = (event[2] << 3) | (event[3] & S6SY761_MASK_Y);
148+ u16 x = (event[1] << 4) | ((event[3] & S6SY761_MASK_X) >> 4);
149+ u16 y = (event[2] << 4) | (event[3] & S6SY761_MASK_Y);
150150
151151 input_mt_slot(sdata->input, tid);
152152
drivers/interconnect/bulk.c+1−1
@@ -53,7 +53,7 @@ void icc_bulk_put(int num_paths, struct icc_bulk_data *paths) · 52 unmodified lines
5353 EXPORT_SYMBOL_GPL(icc_bulk_put);
5454
5555 /**
56− * icc_bulk_set() - set bandwidth to a set of paths
56+ * icc_bulk_set_bw() - set bandwidth to a set of paths
5757 * @num_paths: the number of icc_bulk_data
5858 * @paths: the icc_bulk_data table containing the paths and bandwidth
5959 *
drivers/interconnect/core.c+2−0
@@ -942,6 +942,8 @@ int icc_link_destroy(struct icc_node *src, struct icc_node *dst) · 941 unmodified lines
942942 GFP_KERNEL);
943943 if (new)
944944 src->links = new;
945+ else
946+ ret = -ENOMEM;
945947
946948 out:
947949 mutex_unlock(&icc_lock);
drivers/interconnect/qcom/msm8939.c+8−8
@@ -131,7 +131,7 @@ DEFINE_QNODE(mas_pcnoc_sdcc_1, MSM8939_MASTER_SDCC_1, 8, -1, -1, MSM8939_PNOC_IN · 130 unmodified lines
131131 DEFINE_QNODE(mas_pcnoc_sdcc_2, MSM8939_MASTER_SDCC_2, 8, -1, -1, MSM8939_PNOC_INT_1);
132132 DEFINE_QNODE(mas_qdss_bam, MSM8939_MASTER_QDSS_BAM, 8, -1, -1, MSM8939_SNOC_QDSS_INT);
133133 DEFINE_QNODE(mas_qdss_etr, MSM8939_MASTER_QDSS_ETR, 8, -1, -1, MSM8939_SNOC_QDSS_INT);
134−DEFINE_QNODE(mas_snoc_cfg, MSM8939_MASTER_SNOC_CFG, 4, 20, -1, MSM8939_SLAVE_SRVC_SNOC);
134+DEFINE_QNODE(mas_snoc_cfg, MSM8939_MASTER_SNOC_CFG, 4, -1, -1, MSM8939_SLAVE_SRVC_SNOC);
135135 DEFINE_QNODE(mas_spdm, MSM8939_MASTER_SPDM, 4, -1, -1, MSM8939_PNOC_MAS_0);
136136 DEFINE_QNODE(mas_tcu0, MSM8939_MASTER_TCU0, 16, -1, -1, MSM8939_SLAVE_EBI_CH0, MSM8939_BIMC_SNOC_MAS, MSM8939_SLAVE_AMPSS_L2);
137137 DEFINE_QNODE(mas_usb_hs1, MSM8939_MASTER_USB_HS1, 4, -1, -1, MSM8939_PNOC_MAS_1);
@@ -156,14 +156,14 @@ DEFINE_QNODE(pcnoc_snoc_mas, MSM8939_PNOC_SNOC_MAS, 8, 29, -1, MSM8939_PNOC_SNOC · 18 unmodified lines
156156 DEFINE_QNODE(pcnoc_snoc_slv, MSM8939_PNOC_SNOC_SLV, 8, -1, 45, MSM8939_SNOC_INT_0, MSM8939_SNOC_INT_BIMC, MSM8939_SNOC_INT_1);
157157 DEFINE_QNODE(qdss_int, MSM8939_SNOC_QDSS_INT, 8, -1, -1, MSM8939_SNOC_INT_0, MSM8939_SNOC_INT_BIMC);
158158 DEFINE_QNODE(slv_apps_l2, MSM8939_SLAVE_AMPSS_L2, 16, -1, -1, 0);
159−DEFINE_QNODE(slv_apss, MSM8939_SLAVE_APSS, 4, -1, 20, 0);
159+DEFINE_QNODE(slv_apss, MSM8939_SLAVE_APSS, 4, -1, -1, 0);
160160 DEFINE_QNODE(slv_audio, MSM8939_SLAVE_LPASS, 4, -1, -1, 0);
161161 DEFINE_QNODE(slv_bimc_cfg, MSM8939_SLAVE_BIMC_CFG, 4, -1, -1, 0);
162162 DEFINE_QNODE(slv_blsp_1, MSM8939_SLAVE_BLSP_1, 4, -1, -1, 0);
163163 DEFINE_QNODE(slv_boot_rom, MSM8939_SLAVE_BOOT_ROM, 4, -1, -1, 0);
164164 DEFINE_QNODE(slv_camera_cfg, MSM8939_SLAVE_CAMERA_CFG, 4, -1, -1, 0);
165−DEFINE_QNODE(slv_cats_0, MSM8939_SLAVE_CATS_128, 16, -1, 106, 0);
166−DEFINE_QNODE(slv_cats_1, MSM8939_SLAVE_OCMEM_64, 8, -1, 107, 0);
165+DEFINE_QNODE(slv_cats_0, MSM8939_SLAVE_CATS_128, 16, -1, -1, 0);
166+DEFINE_QNODE(slv_cats_1, MSM8939_SLAVE_OCMEM_64, 8, -1, -1, 0);
167167 DEFINE_QNODE(slv_clk_ctl, MSM8939_SLAVE_CLK_CTL, 4, -1, -1, 0);
168168 DEFINE_QNODE(slv_crypto_0_cfg, MSM8939_SLAVE_CRYPTO_0_CFG, 4, -1, -1, 0);
169169 DEFINE_QNODE(slv_dehr_cfg, MSM8939_SLAVE_DEHR_CFG, 4, -1, -1, 0);
@@ -187,20 +187,20 @@ DEFINE_QNODE(slv_sdcc_2, MSM8939_SLAVE_SDCC_2, 4, -1, -1, 0); · 17 unmodified lines
187187 DEFINE_QNODE(slv_security, MSM8939_SLAVE_SECURITY, 4, -1, -1, 0);
188188 DEFINE_QNODE(slv_snoc_cfg, MSM8939_SLAVE_SNOC_CFG, 4, -1, -1, 0);
189189 DEFINE_QNODE(slv_spdm, MSM8939_SLAVE_SPDM, 4, -1, -1, 0);
190−DEFINE_QNODE(slv_srvc_snoc, MSM8939_SLAVE_SRVC_SNOC, 8, -1, 29, 0);
190+DEFINE_QNODE(slv_srvc_snoc, MSM8939_SLAVE_SRVC_SNOC, 8, -1, -1, 0);
191191 DEFINE_QNODE(slv_tcsr, MSM8939_SLAVE_TCSR, 4, -1, -1, 0);
192192 DEFINE_QNODE(slv_tlmm, MSM8939_SLAVE_TLMM, 4, -1, -1, 0);
193193 DEFINE_QNODE(slv_usb_hs1, MSM8939_SLAVE_USB_HS1, 4, -1, -1, 0);
194194 DEFINE_QNODE(slv_usb_hs2, MSM8939_SLAVE_USB_HS2, 4, -1, -1, 0);
195195 DEFINE_QNODE(slv_venus_cfg, MSM8939_SLAVE_VENUS_CFG, 4, -1, -1, 0);
196−DEFINE_QNODE(snoc_bimc_0_mas, MSM8939_SNOC_BIMC_0_MAS, 16, 3, -1, MSM8939_SNOC_BIMC_0_SLV);
197−DEFINE_QNODE(snoc_bimc_0_slv, MSM8939_SNOC_BIMC_0_SLV, 16, -1, 24, MSM8939_SLAVE_EBI_CH0);
196+DEFINE_QNODE(snoc_bimc_0_mas, MSM8939_SNOC_BIMC_0_MAS, 16, -1, -1, MSM8939_SNOC_BIMC_0_SLV);
197+DEFINE_QNODE(snoc_bimc_0_slv, MSM8939_SNOC_BIMC_0_SLV, 16, -1, -1, MSM8939_SLAVE_EBI_CH0);
198198 DEFINE_QNODE(snoc_bimc_1_mas, MSM8939_SNOC_BIMC_1_MAS, 16, 76, -1, MSM8939_SNOC_BIMC_1_SLV);
199199 DEFINE_QNODE(snoc_bimc_1_slv, MSM8939_SNOC_BIMC_1_SLV, 16, -1, 104, MSM8939_SLAVE_EBI_CH0);
200200 DEFINE_QNODE(snoc_bimc_2_mas, MSM8939_SNOC_BIMC_2_MAS, 16, -1, -1, MSM8939_SNOC_BIMC_2_SLV);
201201 DEFINE_QNODE(snoc_bimc_2_slv, MSM8939_SNOC_BIMC_2_SLV, 16, -1, -1, MSM8939_SLAVE_EBI_CH0);
202202 DEFINE_QNODE(snoc_int_0, MSM8939_SNOC_INT_0, 8, 99, 130, MSM8939_SLAVE_QDSS_STM, MSM8939_SLAVE_IMEM, MSM8939_SNOC_PNOC_MAS);
203−DEFINE_QNODE(snoc_int_1, MSM8939_SNOC_INT_1, 8, 100, 131, MSM8939_SLAVE_APSS, MSM8939_SLAVE_CATS_128, MSM8939_SLAVE_OCMEM_64);
203+DEFINE_QNODE(snoc_int_1, MSM8939_SNOC_INT_1, 8, -1, -1, MSM8939_SLAVE_APSS, MSM8939_SLAVE_CATS_128, MSM8939_SLAVE_OCMEM_64);
204204 DEFINE_QNODE(snoc_int_bimc, MSM8939_SNOC_INT_BIMC, 8, 101, 132, MSM8939_SNOC_BIMC_1_MAS);
205205 DEFINE_QNODE(snoc_pcnoc_mas, MSM8939_SNOC_PNOC_MAS, 8, -1, -1, MSM8939_SNOC_PNOC_SLV);
206206 DEFINE_QNODE(snoc_pcnoc_slv, MSM8939_SNOC_PNOC_SLV, 8, -1, -1, MSM8939_PNOC_INT_0);
drivers/iommu/amd/init.c+20−16
@@ -2714,7 +2714,6 @@ static int __init early_amd_iommu_init(void) · 2713 unmodified lines
27142714 struct acpi_table_header *ivrs_base;
27152715 int i, remap_cache_sz, ret;
27162716 acpi_status status;
2717− u32 pci_id;
27182717
27192718 if (!amd_iommu_detected)
27202719 return -ENODEV;
@@ -2804,16 +2803,6 @@ static int __init early_amd_iommu_init(void) · 83 unmodified lines
28042803 if (ret)
28052804 goto out;
28062805
2807− /* Disable IOMMU if there's Stoney Ridge graphics */
2808− for (i = 0; i < 32; i++) {
2809− pci_id = read_pci_config(0, i, 0, 0);
2810− if ((pci_id & 0xffff) == 0x1002 && (pci_id >> 16) == 0x98e4) {
2811− pr_info("Disable IOMMU on Stoney Ridge\n");
2812− amd_iommu_disabled = true;
2813− break;
2814− }
2815− }
2816−
28172806 /* Disable any previously enabled IOMMUs */
28182807 if (!is_kdump_kernel() || amd_iommu_disabled)
28192808 disable_iommus();
@@ -2880,6 +2869,7 @@ static bool detect_ivrs(void) · 60 unmodified lines
28802869 {
28812870 struct acpi_table_header *ivrs_base;
28822871 acpi_status status;
2872+ int i;
28832873
28842874 status = acpi_get_table("IVRS", 0, &ivrs_base);
28852875 if (status == AE_NOT_FOUND)
@@ -2892,6 +2882,17 @@ static bool detect_ivrs(void) · 6 unmodified lines
28922882
28932883 acpi_put_table(ivrs_base);
28942884
2885+ /* Don't use IOMMU if there is Stoney Ridge graphics */
2886+ for (i = 0; i < 32; i++) {
2887+ u32 pci_id;
2888+
2889+ pci_id = read_pci_config(0, i, 0, 0);
2890+ if ((pci_id & 0xffff) == 0x1002 && (pci_id >> 16) == 0x98e4) {
2891+ pr_info("Disable IOMMU on Stoney Ridge\n");
2892+ return false;
2893+ }
2894+ }
2895+
28952896 /* Make sure ACS will be enabled during PCI probe */
28962897 pci_request_acs();
28972898
@@ -2918,12 +2919,12 @@ static int __init state_next(void) · 20 unmodified lines
29182919 }
29192920 break;
29202921 case IOMMU_IVRS_DETECTED:
2921− ret = early_amd_iommu_init();
2922− init_state = ret ? IOMMU_INIT_ERROR : IOMMU_ACPI_FINISHED;
2923− if (init_state == IOMMU_ACPI_FINISHED && amd_iommu_disabled) {
2924− pr_info("AMD IOMMU disabled\n");
2922+ if (amd_iommu_disabled) {
29252923 init_state = IOMMU_CMDLINE_DISABLED;
29262924 ret = -EINVAL;
2925+ } else {
2926+ ret = early_amd_iommu_init();
2927+ init_state = ret ? IOMMU_INIT_ERROR : IOMMU_ACPI_FINISHED;
29272928 }
29282929 break;
29292930 case IOMMU_ACPI_FINISHED:
@@ -3001,8 +3002,11 @@ int __init amd_iommu_prepare(void) · 71 unmodified lines
30013002 amd_iommu_irq_remap = true;
30023003
30033004 ret = iommu_go_to_state(IOMMU_ACPI_FINISHED);
3004− if (ret)
3005+ if (ret) {
3006+ amd_iommu_irq_remap = false;
30053007 return ret;
3008+ }
3009+
30063010 return amd_iommu_irq_remap ? 0 : -ENODEV;
30073011 }
30083012
drivers/iommu/tegra-smmu.c+3−4
@@ -849,12 +849,11 @@ static struct iommu_device *tegra_smmu_probe_device(struct device *dev) · 848 unmodified lines
849849 smmu = tegra_smmu_find(args.np);
850850 if (smmu) {
851851 err = tegra_smmu_configure(smmu, dev, &args);
852− of_node_put(args.np);
853852
854− if (err < 0)
853+ if (err < 0) {
854+ of_node_put(args.np);
855855 return ERR_PTR(err);
856−
857− break;
856+ }
858857 }
859858
860859 of_node_put(args.np);
drivers/irqchip/Kconfig+0−9
@@ -8,7 +8,6 @@ config IRQCHIP · 7 unmodified lines
88 config ARM_GIC
99 bool
1010 select IRQ_DOMAIN_HIERARCHY
11− select GENERIC_IRQ_MULTI_HANDLER
1211 select GENERIC_IRQ_EFFECTIVE_AFF_MASK
1312
1413 config ARM_GIC_PM
@@ -33,7 +32,6 @@ config GIC_NON_BANKED · 18 unmodified lines
3332
3433 config ARM_GIC_V3
3534 bool
36− select GENERIC_IRQ_MULTI_HANDLER
3735 select IRQ_DOMAIN_HIERARCHY
3836 select PARTITION_PERCPU
3937 select GENERIC_IRQ_EFFECTIVE_AFF_MASK
@@ -64,7 +62,6 @@ config ARM_NVIC · 24 unmodified lines
6462 config ARM_VIC
6563 bool
6664 select IRQ_DOMAIN
67− select GENERIC_IRQ_MULTI_HANDLER
6865
6966 config ARM_VIC_NR
7067 int
@@ -99,14 +96,12 @@ config ATMEL_AIC_IRQ · 28 unmodified lines
9996 bool
10097 select GENERIC_IRQ_CHIP
10198 select IRQ_DOMAIN
102− select GENERIC_IRQ_MULTI_HANDLER
10399 select SPARSE_IRQ
104100
105101 config ATMEL_AIC5_IRQ
106102 bool
107103 select GENERIC_IRQ_CHIP
108104 select IRQ_DOMAIN
109− select GENERIC_IRQ_MULTI_HANDLER
110105 select SPARSE_IRQ
111106
112107 config I8259
@@ -153,7 +148,6 @@ config DW_APB_ICTL · 40 unmodified lines
153148 config FARADAY_FTINTC010
154149 bool
155150 select IRQ_DOMAIN
156− select GENERIC_IRQ_MULTI_HANDLER
157151 select SPARSE_IRQ
158152
159153 config HISILICON_IRQ_MBIGEN
@@ -169,7 +163,6 @@ config IMGPDC_IRQ · 9 unmodified lines
169163 config IXP4XX_IRQ
170164 bool
171165 select IRQ_DOMAIN
172− select GENERIC_IRQ_MULTI_HANDLER
173166 select SPARSE_IRQ
174167
175168 config MADERA_IRQ
@@ -186,7 +179,6 @@ config CLPS711X_IRQCHIP · 10 unmodified lines
186179 bool
187180 depends on ARCH_CLPS711X
188181 select IRQ_DOMAIN
189− select GENERIC_IRQ_MULTI_HANDLER
190182 select SPARSE_IRQ
191183 default y
192184
@@ -205,7 +197,6 @@ config OMAP_IRQCHIP · 12 unmodified lines
205197 config ORION_IRQCHIP
206198 bool
207199 select IRQ_DOMAIN
208− select GENERIC_IRQ_MULTI_HANDLER
209200
210201 config PIC32_EVIC
211202 bool
drivers/irqchip/irq-ingenic-tcu.c+1−0
@@ -179,5 +179,6 @@ err_free_tcu: · 178 unmodified lines
179179 }
180180 IRQCHIP_DECLARE(jz4740_tcu_irq, "ingenic,jz4740-tcu", ingenic_tcu_irq_init);
181181 IRQCHIP_DECLARE(jz4725b_tcu_irq, "ingenic,jz4725b-tcu", ingenic_tcu_irq_init);
182+IRQCHIP_DECLARE(jz4760_tcu_irq, "ingenic,jz4760-tcu", ingenic_tcu_irq_init);
182183 IRQCHIP_DECLARE(jz4770_tcu_irq, "ingenic,jz4770-tcu", ingenic_tcu_irq_init);
183184 IRQCHIP_DECLARE(x1000_tcu_irq, "ingenic,x1000-tcu", ingenic_tcu_irq_init);
drivers/irqchip/irq-ingenic.c+1−0
@@ -155,6 +155,7 @@ static int __init intc_2chip_of_init(struct device_node *node, · 154 unmodified lines
155155 {
156156 return ingenic_intc_of_init(node, 2);
157157 }
158+IRQCHIP_DECLARE(jz4760_intc, "ingenic,jz4760-intc", intc_2chip_of_init);
158159 IRQCHIP_DECLARE(jz4770_intc, "ingenic,jz4770-intc", intc_2chip_of_init);
159160 IRQCHIP_DECLARE(jz4775_intc, "ingenic,jz4775-intc", intc_2chip_of_init);
160161 IRQCHIP_DECLARE(jz4780_intc, "ingenic,jz4780-intc", intc_2chip_of_init);
drivers/isdn/capi/kcapi.c+2−2
@@ -721,7 +721,7 @@ u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb) · 720 unmodified lines
721721 * Return value: CAPI result code
722722 */
723723
724−u16 capi20_get_manufacturer(u32 contr, u8 *buf)
724+u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN])
725725 {
726726 struct capi_ctr *ctr;
727727 u16 ret;
@@ -787,7 +787,7 @@ u16 capi20_get_version(u32 contr, struct capi_version *verp) · 59 unmodified lines
787787 * Return value: CAPI result code
788788 */
789789
790−u16 capi20_get_serial(u32 contr, u8 *serial)
790+u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN])
791791 {
792792 struct capi_ctr *ctr;
793793 u16 ret;
drivers/isdn/hardware/mISDN/mISDNipac.c+1−1
@@ -694,7 +694,7 @@ isac_release(struct isac_hw *isac) · 693 unmodified lines
694694 {
695695 if (isac->type & IPAC_TYPE_ISACX)
696696 WriteISAC(isac, ISACX_MASK, 0xff);
697− else
697+ else if (isac->type != 0)
698698 WriteISAC(isac, ISAC_MASK, 0xff);
699699 if (isac->dch.timer.function != NULL) {
700700 del_timer(&isac->dch.timer);
drivers/leds/leds-turris-omnia.c+2−2
@@ -2,7 +2,7 @@ · 1 unmodified line
22 /*
33 * CZ.NIC's Turris Omnia LEDs driver
44 *
5− * 2020 by Marek Behun <marek.behun@nic.cz>
5+ * 2020 by Marek Behún <kabel@kernel.org>
66 */
77
88 #include <linux/i2c.h>
@@ -287,6 +287,6 @@ static struct i2c_driver omnia_leds_driver = { · 278 unmodified lines
287287
288288 module_i2c_driver(omnia_leds_driver);
289289
290−MODULE_AUTHOR("Marek Behun <marek.behun@nic.cz>");
290+MODULE_AUTHOR("Marek Behun <kabel@kernel.org>");
291291 MODULE_DESCRIPTION("CZ.NIC's Turris Omnia LEDs");
292292 MODULE_LICENSE("GPL v2");
drivers/leds/trigger/ledtrig-tty.c+4−7
@@ -51,10 +51,8 @@ static ssize_t ttyname_store(struct device *dev, · 50 unmodified lines
5151
5252 if (size) {
5353 ttyname = kmemdup_nul(buf, size, GFP_KERNEL);
54− if (!ttyname) {
55− ret = -ENOMEM;
56− goto out_unlock;
57− }
54+ if (!ttyname)
55+ return -ENOMEM;
5856 } else {
5957 ttyname = NULL;
6058 }
@@ -69,7 +67,6 @@ static ssize_t ttyname_store(struct device *dev, · 8 unmodified lines
6967
7068 trigger_data->ttyname = ttyname;
7169
72−out_unlock:
7370 mutex_unlock(&trigger_data->mutex);
7471
7572 if (ttyname && !running)
@@ -125,12 +122,12 @@ static void ledtrig_tty_work(struct work_struct *work) · 49 unmodified lines
125122
126123 if (icount.rx != trigger_data->rx ||
127124 icount.tx != trigger_data->tx) {
128− led_set_brightness(trigger_data->led_cdev, LED_ON);
125+ led_set_brightness_sync(trigger_data->led_cdev, LED_ON);
129126
130127 trigger_data->rx = icount.rx;
131128 trigger_data->tx = icount.tx;
132129 } else {
133− led_set_brightness(trigger_data->led_cdev, LED_OFF);
130+ led_set_brightness_sync(trigger_data->led_cdev, LED_OFF);
134131 }
135132
136133 out:
drivers/mailbox/armada-37xx-rwtm-mailbox.c+2−2
@@ -2,7 +2,7 @@ · 1 unmodified line
22 /*
33 * rWTM BIU Mailbox driver for Armada 37xx
44 *
5− * Author: Marek Behun <marek.behun@nic.cz>
5+ * Author: Marek Behún <kabel@kernel.org>
66 */
77
88 #include <linux/device.h>
@@ -203,4 +203,4 @@ module_platform_driver(armada_37xx_mbox_driver); · 194 unmodified lines
203203
204204 MODULE_LICENSE("GPL v2");
205205 MODULE_DESCRIPTION("rWTM BIU Mailbox driver for Armada 37xx");
206−MODULE_AUTHOR("Marek Behun <marek.behun@nic.cz>");
206+MODULE_AUTHOR("Marek Behun <kabel@kernel.org>");
drivers/md/bcache/super.c+1−1
@@ -965,7 +965,7 @@ static int bcache_device_init(struct bcache_device *d, unsigned int block_size, · 964 unmodified lines
965965 q->limits.max_hw_sectors = UINT_MAX;
966966 q->limits.max_sectors = UINT_MAX;
967967 q->limits.max_segment_size = UINT_MAX;
968− q->limits.max_segments = BIO_MAX_PAGES;
968+ q->limits.max_segments = BIO_MAX_VECS;
969969 blk_queue_max_discard_sectors(q, UINT_MAX);
970970 q->limits.discard_granularity = 512;
971971 q->limits.io_min = block_size;
drivers/md/dm-crypt.c+4−4
@@ -229,7 +229,7 @@ static DEFINE_SPINLOCK(dm_crypt_clients_lock); · 228 unmodified lines
229229 static unsigned dm_crypt_clients_n = 0;
230230 static volatile unsigned long dm_crypt_pages_per_client;
231231 #define DM_CRYPT_MEMORY_PERCENT 2
232−#define DM_CRYPT_MIN_PAGES_PER_CLIENT (BIO_MAX_PAGES * 16)
232+#define DM_CRYPT_MIN_PAGES_PER_CLIENT (BIO_MAX_VECS * 16)
233233
234234 static void clone_init(struct dm_crypt_io *, struct bio *);
235235 static void kcryptd_queue_crypt(struct dm_crypt_io *io);
@@ -3246,7 +3246,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) · 3010 unmodified lines
32463246 ALIGN(sizeof(struct dm_crypt_io) + cc->dmreq_start + additional_req_size,
32473247 ARCH_KMALLOC_MINALIGN);
32483248
3249− ret = mempool_init(&cc->page_pool, BIO_MAX_PAGES, crypt_page_alloc, crypt_page_free, cc);
3249+ ret = mempool_init(&cc->page_pool, BIO_MAX_VECS, crypt_page_alloc, crypt_page_free, cc);
32503250 if (ret) {
32513251 ti->error = "Cannot allocate page mempool";
32523252 goto bad;
@@ -3373,9 +3373,9 @@ static int crypt_map(struct dm_target *ti, struct bio *bio) · 120 unmodified lines
33733373 /*
33743374 * Check if bio is too large, split as needed.
33753375 */
3376− if (unlikely(bio->bi_iter.bi_size > (BIO_MAX_PAGES << PAGE_SHIFT)) &&
3376+ if (unlikely(bio->bi_iter.bi_size > (BIO_MAX_VECS << PAGE_SHIFT)) &&
33773377 (bio_data_dir(bio) == WRITE || cc->on_disk_tag_size))
3378− dm_accept_partial_bio(bio, ((BIO_MAX_PAGES << PAGE_SHIFT) >> SECTOR_SHIFT));
3378+ dm_accept_partial_bio(bio, ((BIO_MAX_VECS << PAGE_SHIFT) >> SECTOR_SHIFT));
33793379
33803380 /*
33813381 * Ensure that bio is a multiple of internal sector encryption size
drivers/md/dm-ioctl.c+1−1
@@ -529,7 +529,7 @@ static int list_devices(struct file *filp, struct dm_ioctl *param, size_t param_ · 528 unmodified lines
529529 * Grab our output buffer.
530530 */
531531 nl = orig_nl = get_result_buffer(param, param_size, &len);
532− if (len < needed) {
532+ if (len < needed || len < sizeof(nl->dev)) {
533533 param->flags |= DM_BUFFER_FULL_FLAG;
534534 goto out;
535535 }
drivers/md/dm-table.c+25−8
@@ -1594,6 +1594,13 @@ static int device_not_zoned_model(struct dm_target *ti, struct dm_dev *dev, · 1593 unmodified lines
15941594 return blk_queue_zoned_model(q) != *zoned_model;
15951595 }
15961596
1597+/*
1598+ * Check the device zoned model based on the target feature flag. If the target
1599+ * has the DM_TARGET_ZONED_HM feature flag set, host-managed zoned devices are
1600+ * also accepted but all devices must have the same zoned model. If the target
1601+ * has the DM_TARGET_MIXED_ZONED_MODEL feature set, the devices can have any
1602+ * zoned model with all zoned devices having the same zone size.
1603+ */
15971604 static bool dm_table_supports_zoned_model(struct dm_table *t,
15981605 enum blk_zoned_model zoned_model)
15991606 {
@@ -1603,13 +1610,15 @@ static bool dm_table_supports_zoned_model(struct dm_table *t, · 3 unmodified lines
16031610 for (i = 0; i < dm_table_get_num_targets(t); i++) {
16041611 ti = dm_table_get_target(t, i);
16051612
1606− if (zoned_model == BLK_ZONED_HM &&
1607− !dm_target_supports_zoned_hm(ti->type))
1608− return false;
1609−
1610− if (!ti->type->iterate_devices ||
1611− ti->type->iterate_devices(ti, device_not_zoned_model, &zoned_model))
1612− return false;
1613+ if (dm_target_supports_zoned_hm(ti->type)) {
1614+ if (!ti->type->iterate_devices ||
1615+ ti->type->iterate_devices(ti, device_not_zoned_model,
1616+ &zoned_model))
1617+ return false;
1618+ } else if (!dm_target_supports_mixed_zoned_model(ti->type)) {
1619+ if (zoned_model == BLK_ZONED_HM)
1620+ return false;
1621+ }
16131622 }
16141623
16151624 return true;
@@ -1621,9 +1630,17 @@ static int device_not_matches_zone_sectors(struct dm_target *ti, struct dm_dev * · 5 unmodified lines
16211630 struct request_queue *q = bdev_get_queue(dev->bdev);
16221631 unsigned int *zone_sectors = data;
16231632
1633+ if (!blk_queue_is_zoned(q))
1634+ return 0;
1635+
16241636 return blk_queue_zone_sectors(q) != *zone_sectors;
16251637 }
16261638
1639+/*
1640+ * Check consistency of zoned model and zone sectors across all targets. For
1641+ * zone sectors, if the destination device is a zoned block device, it shall
1642+ * have the specified zone_sectors.
1643+ */
16271644 static int validate_hardware_zoned_model(struct dm_table *table,
16281645 enum blk_zoned_model zoned_model,
16291646 unsigned int zone_sectors)
@@ -1642,7 +1659,7 @@ static int validate_hardware_zoned_model(struct dm_table *table, · 12 unmodified lines
16421659 return -EINVAL;
16431660
16441661 if (dm_table_any_dev_attr(table, device_not_matches_zone_sectors, &zone_sectors)) {
1645− DMERR("%s: zone sectors is not consistent across all devices",
1662+ DMERR("%s: zone sectors is not consistent across all zoned devices",
16461663 dm_device_name(table->md));
16471664 return -EINVAL;
16481665 }
drivers/md/dm-verity-fec.c+8−3
@@ -65,7 +65,7 @@ static u8 *fec_read_parity(struct dm_verity *v, u64 rsb, int index, · 64 unmodified lines
6565 u8 *res;
6666
6767 position = (index + rsb) * v->fec->roots;
68− block = div64_u64_rem(position, v->fec->roots << SECTOR_SHIFT, &rem);
68+ block = div64_u64_rem(position, v->fec->io_size, &rem);
6969 *offset = (unsigned)rem;
7070
7171 res = dm_bufio_read(v->fec->bufio, block, buf);
@@ -154,7 +154,7 @@ static int fec_decode_bufs(struct dm_verity *v, struct dm_verity_fec_io *fio, · 82 unmodified lines
154154
155155 /* read the next block when we run out of parity bytes */
156156 offset += v->fec->roots;
157− if (offset >= v->fec->roots << SECTOR_SHIFT) {
157+ if (offset >= v->fec->io_size) {
158158 dm_bufio_release(buf);
159159
160160 par = fec_read_parity(v, rsb, block_offset, &offset, &buf);
@@ -742,8 +742,13 @@ int verity_fec_ctr(struct dm_verity *v) · 581 unmodified lines
742742 return -E2BIG;
743743 }
744744
745+ if ((f->roots << SECTOR_SHIFT) & ((1 << v->data_dev_block_bits) - 1))
746+ f->io_size = 1 << v->data_dev_block_bits;
747+ else
748+ f->io_size = v->fec->roots << SECTOR_SHIFT;
749+
745750 f->bufio = dm_bufio_client_create(f->dev->bdev,
746− f->roots << SECTOR_SHIFT,
751+ f->io_size,
747752 1, 0, NULL, NULL);
748753 if (IS_ERR(f->bufio)) {
749754 ti->error = "Cannot initialize FEC bufio client";
drivers/md/dm-verity-fec.h+1−0
@@ -36,6 +36,7 @@ struct dm_verity_fec { · 35 unmodified lines
3636 struct dm_dev *dev; /* parity data device */
3737 struct dm_bufio_client *data_bufio; /* for data dev access */
3838 struct dm_bufio_client *bufio; /* for parity data access */
39+ size_t io_size; /* IO size for roots */
3940 sector_t start; /* parity data start in blocks */
4041 sector_t blocks; /* number of blocks covered */
4142 sector_t rounds; /* number of interleaving rounds */
drivers/md/dm-verity-target.c+1−1
@@ -34,7 +34,7 @@ · 33 unmodified lines
3434 #define DM_VERITY_OPT_IGN_ZEROES "ignore_zero_blocks"
3535 #define DM_VERITY_OPT_AT_MOST_ONCE "check_at_most_once"
3636
37−#define DM_VERITY_OPTS_MAX (2 + DM_VERITY_OPTS_FEC + \
37+#define DM_VERITY_OPTS_MAX (3 + DM_VERITY_OPTS_FEC + \
3838 DM_VERITY_ROOT_HASH_VERIFICATION_OPTS)
3939
4040 static unsigned dm_verity_prefetch_cluster = DM_VERITY_DEFAULT_PREFETCH_SIZE;
drivers/md/dm-writecache.c+2−2
@@ -1892,10 +1892,10 @@ restart: · 1891 unmodified lines
18921892 list_add(&g->lru, &wbl.list);
18931893 wbl.size++;
18941894 g->write_in_progress = true;
1895− g->wc_list_contiguous = BIO_MAX_PAGES;
1895+ g->wc_list_contiguous = BIO_MAX_VECS;
18961896 f = g;
18971897 e->wc_list_contiguous++;
1898− if (unlikely(e->wc_list_contiguous == BIO_MAX_PAGES)) {
1898+ if (unlikely(e->wc_list_contiguous == BIO_MAX_VECS)) {
18991899 if (unlikely(wc->writeback_all)) {
19001900 next_node = rb_next(&f->rb_node);
19011901 if (likely(next_node))
drivers/md/dm-zoned-target.c+1−1
@@ -1143,7 +1143,7 @@ static int dmz_message(struct dm_target *ti, unsigned int argc, char **argv, · 1142 unmodified lines
11431143 static struct target_type dmz_type = {
11441144 .name = "zoned",
11451145 .version = {2, 0, 0},
1146− .features = DM_TARGET_SINGLETON | DM_TARGET_ZONED_HM,
1146+ .features = DM_TARGET_SINGLETON | DM_TARGET_MIXED_ZONED_MODEL,
11471147 .module = THIS_MODULE,
11481148 .ctr = dmz_ctr,
11491149 .dtr = dmz_dtr,
drivers/md/dm.c+4−1
@@ -2036,7 +2036,10 @@ static struct dm_table *__bind(struct mapped_device *md, struct dm_table *t, · 2035 unmodified lines
20362036 if (size != dm_get_size(md))
20372037 memset(&md->geometry, 0, sizeof(md->geometry));
20382038
2039− set_capacity_and_notify(md->disk, size);
2039+ if (!get_capacity(md->disk))
2040+ set_capacity(md->disk, size);
2041+ else
2042+ set_capacity_and_notify(md->disk, size);
20402043
20412044 dm_table_event_callback(t, event_callback, md);
20422045
drivers/md/raid5-cache.c+2−2
@@ -735,7 +735,7 @@ static void r5l_submit_current_io(struct r5l_log *log) · 734 unmodified lines
735735
736736 static struct bio *r5l_bio_alloc(struct r5l_log *log)
737737 {
738− struct bio *bio = bio_alloc_bioset(GFP_NOIO, BIO_MAX_PAGES, &log->bs);
738+ struct bio *bio = bio_alloc_bioset(GFP_NOIO, BIO_MAX_VECS, &log->bs);
739739
740740 bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
741741 bio_set_dev(bio, log->rdev->bdev);
@@ -1634,7 +1634,7 @@ static int r5l_recovery_allocate_ra_pool(struct r5l_log *log, · 892 unmodified lines
16341634 {
16351635 struct page *page;
16361636
1637− ctx->ra_bio = bio_alloc_bioset(GFP_KERNEL, BIO_MAX_PAGES, &log->bs);
1637+ ctx->ra_bio = bio_alloc_bioset(GFP_KERNEL, BIO_MAX_VECS, &log->bs);
16381638 if (!ctx->ra_bio)
16391639 return -ENOMEM;
16401640
drivers/md/raid5-ppl.c+1−1
@@ -496,7 +496,7 @@ static void ppl_submit_iounit(struct ppl_io_unit *io) · 495 unmodified lines
496496 if (!bio_add_page(bio, sh->ppl_page, PAGE_SIZE, 0)) {
497497 struct bio *prev = bio;
498498
499− bio = bio_alloc_bioset(GFP_NOIO, BIO_MAX_PAGES,
499+ bio = bio_alloc_bioset(GFP_NOIO, BIO_MAX_VECS,
500500 &ppl_conf->bs);
501501 bio->bi_opf = prev->bi_opf;
502502 bio->bi_write_hint = prev->bi_write_hint;
drivers/media/firewire/firedtv-fw.c+0−1
@@ -430,4 +430,3 @@ MODULE_AUTHOR("Andreas Monitzer <andy@monitzer.com>"); · 429 unmodified lines
430430 MODULE_AUTHOR("Ben Backx <ben@bbackx.com>");
431431 MODULE_DESCRIPTION("FireDTV DVB Driver");
432432 MODULE_LICENSE("GPL");
433−MODULE_SUPPORTED_DEVICE("FireDTV DVB");
drivers/media/pci/cx18/cx18-alsa-main.c+0−1
@@ -41,7 +41,6 @@ MODULE_PARM_DESC(debug, · 40 unmodified lines
4141
4242 MODULE_AUTHOR("Andy Walls");
4343 MODULE_DESCRIPTION("CX23418 ALSA Interface");
44−MODULE_SUPPORTED_DEVICE("CX23418 MPEG2 encoder");
4544 MODULE_LICENSE("GPL");
4645
4746 MODULE_VERSION(CX18_VERSION);
drivers/media/pci/cx18/cx18-driver.c+0−1
@@ -232,7 +232,6 @@ MODULE_PARM_DESC(cx18_first_minor, · 231 unmodified lines
232232
233233 MODULE_AUTHOR("Hans Verkuil");
234234 MODULE_DESCRIPTION("CX23418 driver");
235−MODULE_SUPPORTED_DEVICE("CX23418 MPEG2 encoder");
236235 MODULE_LICENSE("GPL");
237236
238237 MODULE_VERSION(CX18_VERSION);
drivers/media/pci/cx25821/cx25821-alsa.c+0−1
@@ -104,7 +104,6 @@ MODULE_PARM_DESC(index, "Index value for cx25821 capture interface(s)."); · 103 unmodified lines
104104 MODULE_DESCRIPTION("ALSA driver module for cx25821 based capture cards");
105105 MODULE_AUTHOR("Hiep Huynh");
106106 MODULE_LICENSE("GPL");
107−MODULE_SUPPORTED_DEVICE("{{Conexant,25821}"); /* "{{Conexant,23881}," */
108107
109108 static unsigned int debug;
110109 module_param(debug, int, 0644);
drivers/media/pci/cx88/cx88-alsa.c+0−1
@@ -98,7 +98,6 @@ MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@kernel.org>"); · 97 unmodified lines
9898 MODULE_LICENSE("GPL v2");
9999 MODULE_VERSION(CX88_VERSION);
100100
101−MODULE_SUPPORTED_DEVICE("{{Conexant,23881},{{Conexant,23882},{{Conexant,23883}");
102101 static unsigned int debug;
103102 module_param(debug, int, 0644);
104103 MODULE_PARM_DESC(debug, "enable debug messages");
drivers/media/pci/ivtv/ivtv-alsa-main.c+0−1
@@ -38,7 +38,6 @@ MODULE_PARM_DESC(index, · 37 unmodified lines
3838
3939 MODULE_AUTHOR("Andy Walls");
4040 MODULE_DESCRIPTION("CX23415/CX23416 ALSA Interface");
41−MODULE_SUPPORTED_DEVICE("CX23415/CX23416 MPEG2 encoder");
4241 MODULE_LICENSE("GPL");
4342
4443 MODULE_VERSION(IVTV_VERSION);
drivers/media/pci/ivtv/ivtv-driver.c+0−3
@@ -275,9 +275,6 @@ MODULE_PARM_DESC(ivtv_first_minor, "Set device node number assigned to first car · 274 unmodified lines
275275
276276 MODULE_AUTHOR("Kevin Thayer, Chris Kennedy, Hans Verkuil");
277277 MODULE_DESCRIPTION("CX23415/CX23416 driver");
278−MODULE_SUPPORTED_DEVICE
279− ("CX23415/CX23416 MPEG2 encoder (WinTV PVR-150/250/350/500,\n"
280− "\t\t\tYuan MPG series and similar)");
281278 MODULE_LICENSE("GPL");
282279
283280 MODULE_VERSION(IVTV_VERSION);
drivers/media/pci/sta2x11/sta2x11_vip.c+0−1
@@ -1269,6 +1269,5 @@ late_initcall_sync(sta2x11_vip_init_module); · 1268 unmodified lines
12691269 MODULE_DESCRIPTION("STA2X11 Video Input Port driver");
12701270 MODULE_AUTHOR("Wind River");
12711271 MODULE_LICENSE("GPL v2");
1272−MODULE_SUPPORTED_DEVICE("sta2x11 video input");
12731272 MODULE_VERSION(DRV_VERSION);
12741273 MODULE_DEVICE_TABLE(pci, sta2x11_vip_pci_tbl);
drivers/media/platform/atmel/atmel-isi.c+0−1
@@ -1363,4 +1363,3 @@ module_platform_driver(atmel_isi_driver); · 1362 unmodified lines
13631363 MODULE_AUTHOR("Josh Wu <josh.wu@atmel.com>");
13641364 MODULE_DESCRIPTION("The V4L2 driver for Atmel Linux");
13651365 MODULE_LICENSE("GPL");
1366−MODULE_SUPPORTED_DEVICE("video");
drivers/media/platform/atmel/atmel-sama5d2-isc.c+0−1
@@ -330,4 +330,3 @@ module_platform_driver(atmel_isc_driver); · 329 unmodified lines
330330 MODULE_AUTHOR("Songjun Wu");
331331 MODULE_DESCRIPTION("The V4L2 driver for Atmel-ISC");
332332 MODULE_LICENSE("GPL v2");
333−MODULE_SUPPORTED_DEVICE("video");
drivers/media/platform/marvell-ccic/cafe-driver.c+0−4
@@ -44,10 +44,6 @@ · 43 unmodified lines
4444 MODULE_AUTHOR("Jonathan Corbet <corbet@lwn.net>");
4545 MODULE_DESCRIPTION("Marvell 88ALP01 CMOS Camera Controller driver");
4646 MODULE_LICENSE("GPL");
47−MODULE_SUPPORTED_DEVICE("Video");
48−
49−
50−
5147
5248 struct cafe_camera {
5349 int registered; /* Fully initialized? */
drivers/media/platform/rockchip/rkisp1/rkisp1-params.c+0−1
@@ -1288,7 +1288,6 @@ static void rkisp1_params_config_parameter(struct rkisp1_params *params) · 1287 unmodified lines
12881288 memset(hst.hist_weight, 0x01, sizeof(hst.hist_weight));
12891289 rkisp1_hst_config(params, &hst);
12901290 rkisp1_param_set_bits(params, RKISP1_CIF_ISP_HIST_PROP,
1291− ~RKISP1_CIF_ISP_HIST_PROP_MODE_MASK |
12921291 rkisp1_hst_params_default_config.mode);
12931292
12941293 /* set the range */
drivers/media/platform/stm32/stm32-dcmi.c+0−1
@@ -2149,4 +2149,3 @@ MODULE_AUTHOR("Yannick Fertre <yannick.fertre@st.com>"); · 2148 unmodified lines
21492149 MODULE_AUTHOR("Hugues Fruchet <hugues.fruchet@st.com>");
21502150 MODULE_DESCRIPTION("STMicroelectronics STM32 Digital Camera Memory Interface driver");
21512151 MODULE_LICENSE("GPL");
2152−MODULE_SUPPORTED_DEVICE("video");
drivers/media/platform/vsp1/vsp1_drm.c+3−3
@@ -245,7 +245,7 @@ static int vsp1_du_pipeline_setup_brx(struct vsp1_device *vsp1, · 244 unmodified lines
245245 brx = &vsp1->bru->entity;
246246 else if (pipe->brx && !drm_pipe->force_brx_release)
247247 brx = pipe->brx;
248− else if (!vsp1->bru->entity.pipe)
248+ else if (vsp1_feature(vsp1, VSP1_HAS_BRU) && !vsp1->bru->entity.pipe)
249249 brx = &vsp1->bru->entity;
250250 else
251251 brx = &vsp1->brs->entity;
@@ -462,9 +462,9 @@ static int vsp1_du_pipeline_setup_inputs(struct vsp1_device *vsp1, · 210 unmodified lines
462462 * make sure it is present in the pipeline's list of entities if it
463463 * wasn't already.
464464 */
465− if (!use_uif) {
465+ if (drm_pipe->uif && !use_uif) {
466466 drm_pipe->uif->pipe = NULL;
467− } else if (!drm_pipe->uif->pipe) {
467+ } else if (drm_pipe->uif && !drm_pipe->uif->pipe) {
468468 drm_pipe->uif->pipe = pipe;
469469 list_add_tail(&drm_pipe->uif->list_pipe, &pipe->entities);
470470 }
drivers/media/rc/Makefile+1−0
@@ -5,6 +5,7 @@ obj-y += keymaps/ · 4 unmodified lines
55 obj-$(CONFIG_RC_CORE) += rc-core.o
66 rc-core-y := rc-main.o rc-ir-raw.o
77 rc-core-$(CONFIG_LIRC) += lirc_dev.o
8+rc-core-$(CONFIG_MEDIA_CEC_RC) += keymaps/rc-cec.o
89 rc-core-$(CONFIG_BPF_LIRC_MODE2) += bpf-lirc.o
910 obj-$(CONFIG_IR_NEC_DECODER) += ir-nec-decoder.o
1011 obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o
drivers/media/rc/keymaps/Makefile+0−1
@@ -21,7 +21,6 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ · 20 unmodified lines
2121 rc-behold.o \
2222 rc-behold-columbus.o \
2323 rc-budget-ci-old.o \
24− rc-cec.o \
2524 rc-cinergy-1400.o \
2625 rc-cinergy.o \
2726 rc-d680-dmb.o \
drivers/media/rc/keymaps/rc-cec.c+11−17
@@ -1,5 +1,15 @@
11 // SPDX-License-Identifier: GPL-2.0-or-later
22 /* Keytable for the CEC remote control
3+ *
4+ * This keymap is unusual in that it can't be built as a module,
5+ * instead it is registered directly in rc-main.c if CONFIG_MEDIA_CEC_RC
6+ * is set. This is because it can be called from drm_dp_cec_set_edid() via
7+ * cec_register_adapter() in an asynchronous context, and it is not
8+ * allowed to use request_module() to load rc-cec.ko in that case.
9+ *
10+ * Since this keymap is only used if CONFIG_MEDIA_CEC_RC is set, we
11+ * just compile this keymap into the rc-core module and never as a
12+ * separate module.
313 *
414 * Copyright (c) 2015 by Kamil Debski
515 */
@@ -152,7 +162,7 @@ static struct rc_map_table cec[] = { · 146 unmodified lines
152162 /* 0x77-0xff: Reserved */
153163 };
154164
155−static struct rc_map_list cec_map = {
165+struct rc_map_list cec_map = {
156166 .map = {
157167 .scan = cec,
158168 .size = ARRAY_SIZE(cec),
@@ -160,19 +170,3 @@ static struct rc_map_list cec_map = { · 1 unmodified line
160170 .name = RC_MAP_CEC,
161171 }
162172 };
163−
164−static int __init init_rc_map_cec(void)
165−{
166− return rc_map_register(&cec_map);
167−}
168−
169−static void __exit exit_rc_map_cec(void)
170−{
171− rc_map_unregister(&cec_map);
172−}
173−
174−module_init(init_rc_map_cec);
175−module_exit(exit_rc_map_cec);
176−
177−MODULE_LICENSE("GPL");
178−MODULE_AUTHOR("Kamil Debski");
drivers/media/rc/rc-main.c+6−0
@@ -2069,6 +2069,9 @@ static int __init rc_core_init(void) · 2068 unmodified lines
20692069
20702070 led_trigger_register_simple("rc-feedback", &led_feedback);
20712071 rc_map_register(&empty_map);
2072+#ifdef CONFIG_MEDIA_CEC_RC
2073+ rc_map_register(&cec_map);
2074+#endif
20722075
20732076 return 0;
20742077 }
@@ -2078,6 +2081,9 @@ static void __exit rc_core_exit(void) · 3 unmodified lines
20782081 lirc_dev_exit();
20792082 class_unregister(&rc_class);
20802083 led_trigger_unregister_simple(led_feedback);
2084+#ifdef CONFIG_MEDIA_CEC_RC
2085+ rc_map_unregister(&cec_map);
2086+#endif
20812087 rc_map_unregister(&empty_map);
20822088 }
20832089
drivers/media/usb/cpia2/cpia2_v4l.c+0−1
@@ -56,7 +56,6 @@ MODULE_PARM_DESC(flicker_mode, "Flicker frequency (0 (disabled), " __stringify(5 · 55 unmodified lines
5656
5757 MODULE_AUTHOR("Steve Miller (STMicroelectronics) <steve.miller@st.com>");
5858 MODULE_DESCRIPTION("V4L-driver for STMicroelectronics CPiA2 based cameras");
59−MODULE_SUPPORTED_DEVICE("video");
6059 MODULE_LICENSE("GPL");
6160 MODULE_VERSION(CPIA_VERSION);
6261
drivers/media/usb/tm6000/tm6000-alsa.c+0−1
@@ -51,7 +51,6 @@ MODULE_PARM_DESC(index, "Index value for tm6000x capture interface(s)."); · 50 unmodified lines
5151 MODULE_DESCRIPTION("ALSA driver module for tm5600/tm6000/tm6010 based TV cards");
5252 MODULE_AUTHOR("Mauro Carvalho Chehab");
5353 MODULE_LICENSE("GPL v2");
54−MODULE_SUPPORTED_DEVICE("{{Trident,tm5600},{{Trident,tm6000},{{Trident,tm6010}");
5554 static unsigned int debug;
5655 module_param(debug, int, 0644);
5756 MODULE_PARM_DESC(debug, "enable debug messages");
drivers/media/usb/tm6000/tm6000-dvb.c+0−2
@@ -23,8 +23,6 @@ MODULE_DESCRIPTION("DVB driver extension module for tm5600/6000/6010 based TV ca · 22 unmodified lines
2323 MODULE_AUTHOR("Mauro Carvalho Chehab");
2424 MODULE_LICENSE("GPL");
2525
26−MODULE_SUPPORTED_DEVICE("{{Trident, tm5600},{{Trident, tm6000},{{Trident, tm6010}");
27−
2826 static int debug;
2927
3028 module_param(debug, int, 0644);
drivers/media/usb/usbtv/usbtv-audio.c+1−1
@@ -371,7 +371,7 @@ void usbtv_audio_free(struct usbtv *usbtv) · 370 unmodified lines
371371 cancel_work_sync(&usbtv->snd_trigger);
372372
373373 if (usbtv->snd && usbtv->udev) {
374− snd_card_free(usbtv->snd);
374+ snd_card_free_when_closed(usbtv->snd);
375375 usbtv->snd = NULL;
376376 }
377377 }
drivers/mfd/intel_quark_i2c_gpio.c+4−2
@@ -72,7 +72,8 @@ static const struct dmi_system_id dmi_platform_info[] = { · 71 unmodified lines
7272 {}
7373 };
7474
75−static const struct resource intel_quark_i2c_res[] = {
75+/* This is used as a place holder and will be modified at run-time */
76+static struct resource intel_quark_i2c_res[] = {
7677 [INTEL_QUARK_IORES_MEM] = {
7778 .flags = IORESOURCE_MEM,
7879 },
@@ -85,7 +86,8 @@ static struct mfd_cell_acpi_match intel_quark_acpi_match_i2c = { · 6 unmodified lines
8586 .adr = MFD_ACPI_MATCH_I2C,
8687 };
8788
88−static const struct resource intel_quark_gpio_res[] = {
89+/* This is used as a place holder and will be modified at run-time */
90+static struct resource intel_quark_gpio_res[] = {
8991 [INTEL_QUARK_IORES_MEM] = {
9092 .flags = IORESOURCE_MEM,
9193 },
drivers/misc/fastrpc.c+5−0
@@ -950,6 +950,11 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel, · 949 unmodified lines
950950 if (!fl->cctx->rpdev)
951951 return -EPIPE;
952952
953+ if (handle == FASTRPC_INIT_HANDLE && !kernel) {
954+ dev_warn_ratelimited(fl->sctx->dev, "user app trying to send a kernel RPC message (%d)\n", handle);
955+ return -EPERM;
956+ }
957+
953958 ctx = fastrpc_context_alloc(fl, kernel, sc, args);
954959 if (IS_ERR(ctx))
955960 return PTR_ERR(ctx);
drivers/misc/habanalabs/common/debugfs.c+1−4
@@ -992,7 +992,6 @@ void hl_debugfs_add_device(struct hl_device *hdev) · 991 unmodified lines
992992 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs;
993993 int count = ARRAY_SIZE(hl_debugfs_list);
994994 struct hl_debugfs_entry *entry;
995− struct dentry *ent;
996995 int i;
997996
998997 dev_entry->hdev = hdev;
@@ -1105,13 +1104,11 @@ void hl_debugfs_add_device(struct hl_device *hdev) · 106 unmodified lines
11051104 &hl_security_violations_fops);
11061105
11071106 for (i = 0, entry = dev_entry->entry_arr ; i < count ; i++, entry++) {
1108−
1109− ent = debugfs_create_file(hl_debugfs_list[i].name,
1107+ debugfs_create_file(hl_debugfs_list[i].name,
11101108 0444,
11111109 dev_entry->root,
11121110 entry,
11131111 &hl_debugfs_fops);
1114− entry->dent = ent;
11151112 entry->info_ent = &hl_debugfs_list[i];
11161113 entry->dev_entry = dev_entry;
11171114 }
drivers/misc/habanalabs/common/device.c+35−5
@@ -93,12 +93,19 @@ void hl_hpriv_put(struct hl_fpriv *hpriv) · 92 unmodified lines
9393 static int hl_device_release(struct inode *inode, struct file *filp)
9494 {
9595 struct hl_fpriv *hpriv = filp->private_data;
96+ struct hl_device *hdev = hpriv->hdev;
97+
98+ filp->private_data = NULL;
99+
100+ if (!hdev) {
101+ pr_crit("Closing FD after device was removed. Memory leak will occur and it is advised to reboot.\n");
102+ put_pid(hpriv->taskpid);
103+ return 0;
104+ }
96105
97106 hl_cb_mgr_fini(hpriv->hdev, &hpriv->cb_mgr);
98107 hl_ctx_mgr_fini(hpriv->hdev, &hpriv->ctx_mgr);
99108
100− filp->private_data = NULL;
101−
102109 hl_hpriv_put(hpriv);
103110
104111 return 0;
@@ -107,15 +114,20 @@ static int hl_device_release(struct inode *inode, struct file *filp) · 2 unmodified lines
107114 static int hl_device_release_ctrl(struct inode *inode, struct file *filp)
108115 {
109116 struct hl_fpriv *hpriv = filp->private_data;
110− struct hl_device *hdev;
117+ struct hl_device *hdev = hpriv->hdev;
111118
112119 filp->private_data = NULL;
113120
114− hdev = hpriv->hdev;
121+ if (!hdev) {
122+ pr_err("Closing FD after device was removed\n");
123+ goto out;
124+ }
115125
116126 mutex_lock(&hdev->fpriv_list_lock);
117127 list_del(&hpriv->dev_node);
118128 mutex_unlock(&hdev->fpriv_list_lock);
129+out:
130+ put_pid(hpriv->taskpid);
119131
120132 kfree(hpriv);
121133
@@ -134,8 +146,14 @@ static int hl_device_release_ctrl(struct inode *inode, struct file *filp) · 12 unmodified lines
134146 static int hl_mmap(struct file *filp, struct vm_area_struct *vma)
135147 {
136148 struct hl_fpriv *hpriv = filp->private_data;
149+ struct hl_device *hdev = hpriv->hdev;
137150 unsigned long vm_pgoff;
138151
152+ if (!hdev) {
153+ pr_err_ratelimited("Trying to mmap after device was removed! Please close FD\n");
154+ return -ENODEV;
155+ }
156+
139157 vm_pgoff = vma->vm_pgoff;
140158 vma->vm_pgoff = HL_MMAP_OFFSET_VALUE_GET(vm_pgoff);
141159
@@ -883,6 +901,16 @@ wait_for_processes: · 741 unmodified lines
883901 return -EBUSY;
884902 }
885903
904+static void device_disable_open_processes(struct hl_device *hdev)
905+{
906+ struct hl_fpriv *hpriv;
907+
908+ mutex_lock(&hdev->fpriv_list_lock);
909+ list_for_each_entry(hpriv, &hdev->fpriv_list, dev_node)
910+ hpriv->hdev = NULL;
911+ mutex_unlock(&hdev->fpriv_list_lock);
912+}
913+
886914 /*
887915 * hl_device_reset - reset the device
888916 *
@@ -1556,8 +1584,10 @@ void hl_device_fini(struct hl_device *hdev) · 667 unmodified lines
15561584 HL_PENDING_RESET_LONG_SEC);
15571585
15581586 rc = device_kill_open_processes(hdev, HL_PENDING_RESET_LONG_SEC);
1559− if (rc)
1587+ if (rc) {
15601588 dev_crit(hdev->dev, "Failed to kill all open processes\n");
1589+ device_disable_open_processes(hdev);
1590+ }
15611591
15621592 hl_cb_pool_fini(hdev);
15631593
drivers/misc/habanalabs/common/habanalabs.h+0−2
@@ -1465,12 +1465,10 @@ struct hl_info_list { · 1464 unmodified lines
14651465
14661466 /**
14671467 * struct hl_debugfs_entry - debugfs dentry wrapper.
1468− * @dent: base debugfs entry structure.
14691468 * @info_ent: dentry realted ops.
14701469 * @dev_entry: ASIC specific debugfs manager.
14711470 */
14721471 struct hl_debugfs_entry {
1473− struct dentry *dent;
14741472 const struct hl_info_list *info_ent;
14751473 struct hl_dbg_device_entry *dev_entry;
14761474 };
drivers/misc/habanalabs/common/habanalabs_ioctl.c+12−0
@@ -5,6 +5,8 @@ · 4 unmodified lines
55 * All Rights Reserved.
66 */
77
8+#define pr_fmt(fmt) "habanalabs: " fmt
9+
810 #include <uapi/misc/habanalabs.h>
911 #include "habanalabs.h"
1012
@@ -682,6 +684,11 @@ long hl_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) · 671 unmodified lines
682684 const struct hl_ioctl_desc *ioctl = NULL;
683685 unsigned int nr = _IOC_NR(cmd);
684686
687+ if (!hdev) {
688+ pr_err_ratelimited("Sending ioctl after device was removed! Please close FD\n");
689+ return -ENODEV;
690+ }
691+
685692 if ((nr >= HL_COMMAND_START) && (nr < HL_COMMAND_END)) {
686693 ioctl = &hl_ioctls[nr];
687694 } else {
@@ -700,6 +707,11 @@ long hl_ioctl_control(struct file *filep, unsigned int cmd, unsigned long arg) · 12 unmodified lines
700707 const struct hl_ioctl_desc *ioctl = NULL;
701708 unsigned int nr = _IOC_NR(cmd);
702709
710+ if (!hdev) {
711+ pr_err_ratelimited("Sending ioctl after device was removed! Please close FD\n");
712+ return -ENODEV;
713+ }
714+
703715 if (nr == _IOC_NR(HL_IOCTL_INFO)) {
704716 ioctl = &hl_ioctls_control[nr];
705717 } else {
drivers/misc/habanalabs/common/irq.c+1−1
@@ -47,7 +47,7 @@ inline u32 hl_cq_inc_ptr(u32 ptr) · 46 unmodified lines
4747 * Increment ptr by 1. If it reaches the number of event queue
4848 * entries, set it to 0
4949 */
50−inline u32 hl_eq_inc_ptr(u32 ptr)
50+static inline u32 hl_eq_inc_ptr(u32 ptr)
5151 {
5252 ptr++;
5353 if (unlikely(ptr == HL_EQ_LENGTH))
drivers/misc/habanalabs/common/mmu/mmu.c+26−12
@@ -499,18 +499,32 @@ static void hl_mmu_pa_page_with_offset(struct hl_ctx *ctx, u64 virt_addr, · 498 unmodified lines
499499 else /* HL_VA_RANGE_TYPE_DRAM */
500500 p = &prop->dmmu;
501501
502− /*
503− * find the correct hop shift field in hl_mmu_properties structure
504− * in order to determine the right maks for the page offset.
505− */
506− hop0_shift_off = offsetof(struct hl_mmu_properties, hop0_shift);
507− p = (char *)p + hop0_shift_off;
508− p = (char *)p + ((hops->used_hops - 1) * sizeof(u64));
509− hop_shift = *(u64 *)p;
510− offset_mask = (1ull << hop_shift) - 1;
511− addr_mask = ~(offset_mask);
512− *phys_addr = (tmp_phys_addr & addr_mask) |
513− (virt_addr & offset_mask);
502+ if ((hops->range_type == HL_VA_RANGE_TYPE_DRAM) &&
503+ !is_power_of_2(prop->dram_page_size)) {
504+ u32 bit;
505+ u64 page_offset_mask;
506+ u64 phys_addr_mask;
507+
508+ bit = __ffs64((u64)prop->dram_page_size);
509+ page_offset_mask = ((1ull << bit) - 1);
510+ phys_addr_mask = ~page_offset_mask;
511+ *phys_addr = (tmp_phys_addr & phys_addr_mask) |
512+ (virt_addr & page_offset_mask);
513+ } else {
514+ /*
515+ * find the correct hop shift field in hl_mmu_properties
516+ * structure in order to determine the right masks
517+ * for the page offset.
518+ */
519+ hop0_shift_off = offsetof(struct hl_mmu_properties, hop0_shift);
520+ p = (char *)p + hop0_shift_off;
521+ p = (char *)p + ((hops->used_hops - 1) * sizeof(u64));
522+ hop_shift = *(u64 *)p;
523+ offset_mask = (1ull << hop_shift) - 1;
524+ addr_mask = ~(offset_mask);
525+ *phys_addr = (tmp_phys_addr & addr_mask) |
526+ (virt_addr & offset_mask);
527+ }
514528 }
515529
516530 int hl_mmu_va_to_pa(struct hl_ctx *ctx, u64 virt_addr, u64 *phys_addr)
drivers/misc/ibmvmc.c+1−3
@@ -2288,15 +2288,13 @@ crq_failed: · 2287 unmodified lines
22882288 return -EPERM;
22892289 }
22902290
2291−static int ibmvmc_remove(struct vio_dev *vdev)
2291+static void ibmvmc_remove(struct vio_dev *vdev)
22922292 {
22932293 struct crq_server_adapter *adapter = dev_get_drvdata(&vdev->dev);
22942294
22952295 dev_info(adapter->dev, "Entering remove for UA 0x%x\n",
22962296 vdev->unit_address);
22972297 ibmvmc_release_crq_queue(adapter);
2298−
2299− return 0;
23002298 }
23012299
23022300 static struct vio_device_id ibmvmc_device_table[] = {
drivers/misc/mei/client.c+7−10
@@ -2286,8 +2286,8 @@ int mei_cl_dma_alloc_and_map(struct mei_cl *cl, const struct file *fp, · 2285 unmodified lines
22862286 if (buffer_id == 0)
22872287 return -EINVAL;
22882288
2289− if (!mei_cl_is_connected(cl))
2290− return -ENODEV;
2289+ if (mei_cl_is_connected(cl))
2290+ return -EPROTO;
22912291
22922292 if (cl->dma_mapped)
22932293 return -EPROTO;
@@ -2327,9 +2327,7 @@ int mei_cl_dma_alloc_and_map(struct mei_cl *cl, const struct file *fp, · 33 unmodified lines
23272327
23282328 mutex_unlock(&dev->device_lock);
23292329 wait_event_timeout(cl->wait,
2330− cl->dma_mapped ||
2331− cl->status ||
2332− !mei_cl_is_connected(cl),
2330+ cl->dma_mapped || cl->status,
23332331 mei_secs_to_jiffies(MEI_CL_CONNECT_TIMEOUT));
23342332 mutex_lock(&dev->device_lock);
23352333
@@ -2376,8 +2374,9 @@ int mei_cl_dma_unmap(struct mei_cl *cl, const struct file *fp) · 40 unmodified lines
23762374 return -EOPNOTSUPP;
23772375 }
23782376
2379− if (!mei_cl_is_connected(cl))
2380− return -ENODEV;
2377+ /* do not allow unmap for connected client */
2378+ if (mei_cl_is_connected(cl))
2379+ return -EPROTO;
23812380
23822381 if (!cl->dma_mapped)
23832382 return -EPROTO;
@@ -2405,9 +2404,7 @@ int mei_cl_dma_unmap(struct mei_cl *cl, const struct file *fp) · 21 unmodified lines
24052404
24062405 mutex_unlock(&dev->device_lock);
24072406 wait_event_timeout(cl->wait,
2408− !cl->dma_mapped ||
2409− cl->status ||
2410− !mei_cl_is_connected(cl),
2407+ !cl->dma_mapped || cl->status,
24112408 mei_secs_to_jiffies(MEI_CL_CONNECT_TIMEOUT));
24122409 mutex_lock(&dev->device_lock);
24132410
drivers/misc/pvpanic.c+1−0
@@ -140,6 +140,7 @@ static const struct of_device_id pvpanic_mmio_match[] = { · 139 unmodified lines
140140 { .compatible = "qemu,pvpanic-mmio", },
141141 {}
142142 };
143+MODULE_DEVICE_TABLE(of, pvpanic_mmio_match);
143144
144145 static const struct acpi_device_id pvpanic_device_ids[] = {
145146 { "QEMU0001", 0 },
drivers/mmc/core/bus.c+5−6
@@ -399,11 +399,6 @@ void mmc_remove_card(struct mmc_card *card) · 398 unmodified lines
399399 mmc_remove_card_debugfs(card);
400400 #endif
401401
402− if (host->cqe_enabled) {
403− host->cqe_ops->cqe_disable(host);
404− host->cqe_enabled = false;
405− }
406−
407402 if (mmc_card_present(card)) {
408403 if (mmc_host_is_spi(card->host)) {
409404 pr_info("%s: SPI card removed\n",
@@ -416,6 +411,10 @@ void mmc_remove_card(struct mmc_card *card) · 6 unmodified lines
416411 of_node_put(card->dev.of_node);
417412 }
418413
414+ if (host->cqe_enabled) {
415+ host->cqe_ops->cqe_disable(host);
416+ host->cqe_enabled = false;
417+ }
418+
419419 put_device(&card->dev);
420420 }
421−
drivers/mmc/core/mmc.c+11−4
@@ -423,10 +423,6 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd) · 422 unmodified lines
423423
424424 /* EXT_CSD value is in units of 10ms, but we store in ms */
425425 card->ext_csd.part_time = 10 * ext_csd[EXT_CSD_PART_SWITCH_TIME];
426− /* Some eMMC set the value too low so set a minimum */
427− if (card->ext_csd.part_time &&
428− card->ext_csd.part_time < MMC_MIN_PART_SWITCH_TIME)
429− card->ext_csd.part_time = MMC_MIN_PART_SWITCH_TIME;
430426
431427 /* Sleep / awake timeout in 100ns units */
432428 if (sa_shift > 0 && sa_shift <= 0x17)
@@ -616,6 +612,17 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd) · 183 unmodified lines
616612 card->ext_csd.data_sector_size = 512;
617613 }
618614
615+ /*
616+ * GENERIC_CMD6_TIME is to be used "unless a specific timeout is defined
617+ * when accessing a specific field", so use it here if there is no
618+ * PARTITION_SWITCH_TIME.
619+ */
620+ if (!card->ext_csd.part_time)
621+ card->ext_csd.part_time = card->ext_csd.generic_cmd6_time;
622+ /* Some eMMC set the value too low so set a minimum */
623+ if (card->ext_csd.part_time < MMC_MIN_PART_SWITCH_TIME)
624+ card->ext_csd.part_time = MMC_MIN_PART_SWITCH_TIME;
625+
619626 /* eMMC v5 or later */
620627 if (card->ext_csd.rev >= 7) {
621628 memcpy(card->ext_csd.fwrev, &ext_csd[EXT_CSD_FIRMWARE_VERSION],
drivers/mmc/host/mmci.c+9−1
@@ -1242,7 +1242,11 @@ mmci_start_command(struct mmci_host *host, struct mmc_command *cmd, u32 c) · 1241 unmodified lines
12421242 if (!cmd->busy_timeout)
12431243 cmd->busy_timeout = 10 * MSEC_PER_SEC;
12441244
1245− clks = (unsigned long long)cmd->busy_timeout * host->cclk;
1245+ if (cmd->busy_timeout > host->mmc->max_busy_timeout)
1246+ clks = (unsigned long long)host->mmc->max_busy_timeout * host->cclk;
1247+ else
1248+ clks = (unsigned long long)cmd->busy_timeout * host->cclk;
1249+
12461250 do_div(clks, MSEC_PER_SEC);
12471251 writel_relaxed(clks, host->base + MMCIDATATIMER);
12481252 }
@@ -2151,6 +2155,10 @@ static int mmci_probe(struct amba_device *dev, · 902 unmodified lines
21512155 mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY;
21522156 }
21532157
2158+ /* Variants with mandatory busy timeout in HW needs R1B responses. */
2159+ if (variant->busy_timeout)
2160+ mmc->caps |= MMC_CAP_NEED_RSP_BUSY;
2161+
21542162 /* Prepare a CMD12 - needed to clear the DPSM on some variants. */
21552163 host->stop_abort.opcode = MMC_STOP_TRANSMISSION;
21562164 host->stop_abort.arg = 0;
drivers/mtd/maps/sun_uflash.c+0−1
@@ -32,7 +32,6 @@ · 31 unmodified lines
3232
3333 MODULE_AUTHOR("Eric Brower <ebrower@usa.net>");
3434 MODULE_DESCRIPTION("User-programmable flash device on Sun Microsystems boardsets");
35−MODULE_SUPPORTED_DEVICE(DRIVER_NAME);
3635 MODULE_LICENSE("GPL");
3736 MODULE_VERSION("2.1");
3837
drivers/mtd/nand/raw/mtk_nand.c+2−2
@@ -488,8 +488,8 @@ static int mtk_nfc_exec_instr(struct nand_chip *chip, · 487 unmodified lines
488488 return 0;
489489 case NAND_OP_WAITRDY_INSTR:
490490 return readl_poll_timeout(nfc->regs + NFI_STA, status,
491− status & STA_BUSY, 20,
492− instr->ctx.waitrdy.timeout_ms);
491+ !(status & STA_BUSY), 20,
492+ instr->ctx.waitrdy.timeout_ms * 1000);
493493 default:
494494 break;
495495 }
drivers/net/Kconfig+1−1
@@ -94,7 +94,7 @@ config WIREGUARD · 93 unmodified lines
9494 select CRYPTO_BLAKE2S_ARM if ARM
9595 select CRYPTO_CURVE25519_NEON if ARM && KERNEL_MODE_NEON
9696 select CRYPTO_CHACHA_MIPS if CPU_MIPS32_R2
97− select CRYPTO_POLY1305_MIPS if CPU_MIPS32 || (CPU_MIPS64 && 64BIT)
97+ select CRYPTO_POLY1305_MIPS if MIPS
9898 help
9999 WireGuard is a secure, fast, and easy to use replacement for IPSec
100100 that uses modern cryptography and clever networking tricks. It's
drivers/net/arcnet/com20020-pci.c+19−15
@@ -127,6 +127,8 @@ static int com20020pci_probe(struct pci_dev *pdev, · 126 unmodified lines
127127 int i, ioaddr, ret;
128128 struct resource *r;
129129
130+ ret = 0;
131+
130132 if (pci_enable_device(pdev))
131133 return -EIO;
132134
@@ -139,6 +141,8 @@ static int com20020pci_probe(struct pci_dev *pdev, · 6 unmodified lines
139141 priv->ci = ci;
140142 mm = &ci->misc_map;
141143
144+ pci_set_drvdata(pdev, priv);
145+
142146 INIT_LIST_HEAD(&priv->list_dev);
143147
144148 if (mm->size) {
@@ -161,7 +165,7 @@ static int com20020pci_probe(struct pci_dev *pdev, · 16 unmodified lines
161165 dev = alloc_arcdev(device);
162166 if (!dev) {
163167 ret = -ENOMEM;
164− goto out_port;
168+ break;
165169 }
166170 dev->dev_port = i;
167171
@@ -178,7 +182,7 @@ static int com20020pci_probe(struct pci_dev *pdev, · 10 unmodified lines
178182 pr_err("IO region %xh-%xh already allocated\n",
179183 ioaddr, ioaddr + cm->size - 1);
180184 ret = -EBUSY;
181− goto out_port;
185+ goto err_free_arcdev;
182186 }
183187
184188 /* Dummy access after Reset
@@ -216,18 +220,18 @@ static int com20020pci_probe(struct pci_dev *pdev, · 31 unmodified lines
216220 if (arcnet_inb(ioaddr, COM20020_REG_R_STATUS) == 0xFF) {
217221 pr_err("IO address %Xh is empty!\n", ioaddr);
218222 ret = -EIO;
219− goto out_port;
223+ goto err_free_arcdev;
220224 }
221225 if (com20020_check(dev)) {
222226 ret = -EIO;
223− goto out_port;
227+ goto err_free_arcdev;
224228 }
225229
226230 card = devm_kzalloc(&pdev->dev, sizeof(struct com20020_dev),
227231 GFP_KERNEL);
228232 if (!card) {
229233 ret = -ENOMEM;
230− goto out_port;
234+ goto err_free_arcdev;
231235 }
232236
233237 card->index = i;
@@ -253,29 +257,29 @@ static int com20020pci_probe(struct pci_dev *pdev, · 19 unmodified lines
253257
254258 ret = devm_led_classdev_register(&pdev->dev, &card->tx_led);
255259 if (ret)
256− goto out_port;
260+ goto err_free_arcdev;
257261
258262 ret = devm_led_classdev_register(&pdev->dev, &card->recon_led);
259263 if (ret)
260− goto out_port;
264+ goto err_free_arcdev;
261265
262266 dev_set_drvdata(&dev->dev, card);
263267
264268 ret = com20020_found(dev, IRQF_SHARED);
265269 if (ret)
266− goto out_port;
270+ goto err_free_arcdev;
267271
268272 devm_arcnet_led_init(dev, dev->dev_id, i);
269273
270274 list_add(&card->list, &priv->list_dev);
271− }
275+ continue;
272276
273− pci_set_drvdata(pdev, priv);
274−
275− return 0;
276−
277−out_port:
278− com20020pci_remove(pdev);
277+err_free_arcdev:
278+ free_arcdev(dev);
279+ break;
280+ }
281+ if (ret)
282+ com20020pci_remove(pdev);
279283 return ret;
280284 }
281285
drivers/net/can/c_can/c_can.c+1−23
@@ -212,18 +212,6 @@ static const struct can_bittiming_const c_can_bittiming_const = { · 211 unmodified lines
212212 .brp_inc = 1,
213213 };
214214
215−static inline void c_can_pm_runtime_enable(const struct c_can_priv *priv)
216−{
217− if (priv->device)
218− pm_runtime_enable(priv->device);
219−}
220−
221−static inline void c_can_pm_runtime_disable(const struct c_can_priv *priv)
222−{
223− if (priv->device)
224− pm_runtime_disable(priv->device);
225−}
226−
227215 static inline void c_can_pm_runtime_get_sync(const struct c_can_priv *priv)
228216 {
229217 if (priv->device)
@@ -1335,7 +1323,6 @@ static const struct net_device_ops c_can_netdev_ops = { · 1105 unmodified lines
13351323
13361324 int register_c_can_dev(struct net_device *dev)
13371325 {
1338− struct c_can_priv *priv = netdev_priv(dev);
13391326 int err;
13401327
13411328 /* Deactivate pins to prevent DRA7 DCAN IP from being
@@ -1345,28 +1332,19 @@ int register_c_can_dev(struct net_device *dev) · 3 unmodified lines
13451332 */
13461333 pinctrl_pm_select_sleep_state(dev->dev.parent);
13471334
1348− c_can_pm_runtime_enable(priv);
1349−
13501335 dev->flags |= IFF_ECHO; /* we support local echo */
13511336 dev->netdev_ops = &c_can_netdev_ops;
13521337
13531338 err = register_candev(dev);
1354− if (err)
1355− c_can_pm_runtime_disable(priv);
1356− else
1339+ if (!err)
13571340 devm_can_led_init(dev);
1358−
13591341 return err;
13601342 }
13611343 EXPORT_SYMBOL_GPL(register_c_can_dev);
13621344
13631345 void unregister_c_can_dev(struct net_device *dev)
13641346 {
1365− struct c_can_priv *priv = netdev_priv(dev);
1366−
13671347 unregister_candev(dev);
1368−
1369− c_can_pm_runtime_disable(priv);
13701348 }
13711349 EXPORT_SYMBOL_GPL(unregister_c_can_dev);
13721350
drivers/net/can/c_can/c_can_pci.c+2−1
@@ -239,12 +239,13 @@ static void c_can_pci_remove(struct pci_dev *pdev) · 238 unmodified lines
239239 {
240240 struct net_device *dev = pci_get_drvdata(pdev);
241241 struct c_can_priv *priv = netdev_priv(dev);
242+ void __iomem *addr = priv->base;
242243
243244 unregister_c_can_dev(dev);
244245
245246 free_c_can_dev(dev);
246247
247− pci_iounmap(pdev, priv->base);
248+ pci_iounmap(pdev, addr);
248249 pci_disable_msi(pdev);
249250 pci_clear_master(pdev);
250251 pci_release_regions(pdev);
drivers/net/can/c_can/c_can_platform.c+5−1
@@ -29,6 +29,7 @@ · 28 unmodified lines
2929 #include <linux/list.h>
3030 #include <linux/io.h>
3131 #include <linux/platform_device.h>
32+#include <linux/pm_runtime.h>
3233 #include <linux/clk.h>
3334 #include <linux/of.h>
3435 #include <linux/of_device.h>
@@ -386,6 +387,7 @@ static int c_can_plat_probe(struct platform_device *pdev) · 351 unmodified lines
386387 platform_set_drvdata(pdev, dev);
387388 SET_NETDEV_DEV(dev, &pdev->dev);
388389
390+ pm_runtime_enable(priv->device);
389391 ret = register_c_can_dev(dev);
390392 if (ret) {
391393 dev_err(&pdev->dev, "registering %s failed (err=%d)\n",
@@ -398,6 +400,7 @@ static int c_can_plat_probe(struct platform_device *pdev) · 6 unmodified lines
398400 return 0;
399401
400402 exit_free_device:
403+ pm_runtime_disable(priv->device);
401404 free_c_can_dev(dev);
402405 exit:
403406 dev_err(&pdev->dev, "probe failed\n");
@@ -408,9 +411,10 @@ exit: · 4 unmodified lines
408411 static int c_can_plat_remove(struct platform_device *pdev)
409412 {
410413 struct net_device *dev = platform_get_drvdata(pdev);
414+ struct c_can_priv *priv = netdev_priv(dev);
411415
412416 unregister_c_can_dev(dev);
413−
417+ pm_runtime_disable(priv->device);
414418 free_c_can_dev(dev);
415419
416420 return 0;
drivers/net/can/dev/netlink.c+1−0
@@ -355,6 +355,7 @@ static void can_dellink(struct net_device *dev, struct list_head *head) · 354 unmodified lines
355355
356356 struct rtnl_link_ops can_link_ops __read_mostly = {
357357 .kind = "can",
358+ .netns_refund = true,
358359 .maxtype = IFLA_CAN_MAX,
359360 .policy = can_policy,
360361 .setup = can_setup,
drivers/net/can/flexcan.c+22−10
@@ -697,11 +697,17 @@ static int flexcan_chip_disable(struct flexcan_priv *priv) · 696 unmodified lines
697697 static int flexcan_chip_freeze(struct flexcan_priv *priv)
698698 {
699699 struct flexcan_regs __iomem *regs = priv->regs;
700− unsigned int timeout = 1000 * 1000 * 10 / priv->can.bittiming.bitrate;
700+ unsigned int timeout;
701+ u32 bitrate = priv->can.bittiming.bitrate;
701702 u32 reg;
702703
704+ if (bitrate)
705+ timeout = 1000 * 1000 * 10 / bitrate;
706+ else
707+ timeout = FLEXCAN_TIMEOUT_US / 10;
708+
703709 reg = priv->read(&regs->mcr);
704− reg |= FLEXCAN_MCR_HALT;
710+ reg |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_HALT;
705711 priv->write(reg, &regs->mcr);
706712
707713 while (timeout-- && !(priv->read(&regs->mcr) & FLEXCAN_MCR_FRZ_ACK))
@@ -1480,10 +1486,13 @@ static int flexcan_chip_start(struct net_device *dev) · 772 unmodified lines
14801486
14811487 flexcan_set_bittiming(dev);
14821488
1489+ /* set freeze, halt */
1490+ err = flexcan_chip_freeze(priv);
1491+ if (err)
1492+ goto out_chip_disable;
1493+
14831494 /* MCR
14841495 *
1485− * enable freeze
1486− * halt now
14871496 * only supervisor access
14881497 * enable warning int
14891498 * enable individual RX masking
@@ -1492,9 +1501,8 @@ static int flexcan_chip_start(struct net_device *dev) · 2 unmodified lines
14921501 */
14931502 reg_mcr = priv->read(&regs->mcr);
14941503 reg_mcr &= ~FLEXCAN_MCR_MAXMB(0xff);
1495− reg_mcr |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_HALT | FLEXCAN_MCR_SUPV |
1496− FLEXCAN_MCR_WRN_EN | FLEXCAN_MCR_IRMQ | FLEXCAN_MCR_IDAM_C |
1497− FLEXCAN_MCR_MAXMB(priv->tx_mb_idx);
1504+ reg_mcr |= FLEXCAN_MCR_SUPV | FLEXCAN_MCR_WRN_EN | FLEXCAN_MCR_IRMQ |
1505+ FLEXCAN_MCR_IDAM_C | FLEXCAN_MCR_MAXMB(priv->tx_mb_idx);
14981506
14991507 /* MCR
15001508 *
@@ -1865,10 +1873,14 @@ static int register_flexcandev(struct net_device *dev) · 364 unmodified lines
18651873 if (err)
18661874 goto out_chip_disable;
18671875
1868− /* set freeze, halt and activate FIFO, restrict register access */
1876+ /* set freeze, halt */
1877+ err = flexcan_chip_freeze(priv);
1878+ if (err)
1879+ goto out_chip_disable;
1880+
1881+ /* activate FIFO, restrict register access */
18691882 reg = priv->read(&regs->mcr);
1870− reg |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_HALT |
1871− FLEXCAN_MCR_FEN | FLEXCAN_MCR_SUPV;
1883+ reg |= FLEXCAN_MCR_FEN | FLEXCAN_MCR_SUPV;
18721884 priv->write(reg, &regs->mcr);
18731885
18741886 /* Currently we only support newer versions of this core
drivers/net/can/kvaser_pciefd.c+4−0
@@ -57,6 +57,7 @@ MODULE_DESCRIPTION("CAN driver for Kvaser CAN/PCIe devices"); · 56 unmodified lines
5757 #define KVASER_PCIEFD_KCAN_STAT_REG 0x418
5858 #define KVASER_PCIEFD_KCAN_MODE_REG 0x41c
5959 #define KVASER_PCIEFD_KCAN_BTRN_REG 0x420
60+#define KVASER_PCIEFD_KCAN_BUS_LOAD_REG 0x424
6061 #define KVASER_PCIEFD_KCAN_BTRD_REG 0x428
6162 #define KVASER_PCIEFD_KCAN_PWM_REG 0x430
6263 /* Loopback control register */
@@ -949,6 +950,9 @@ static int kvaser_pciefd_setup_can_ctrls(struct kvaser_pciefd *pcie) · 886 unmodified lines
949950 timer_setup(&can->bec_poll_timer, kvaser_pciefd_bec_poll_timer,
950951 0);
951952
953+ /* Disable Bus load reporting */
954+ iowrite32(0, can->reg_base + KVASER_PCIEFD_KCAN_BUS_LOAD_REG);
955+
952956 tx_npackets = ioread32(can->reg_base +
953957 KVASER_PCIEFD_KCAN_TX_NPACKETS_REG);
954958 if (((tx_npackets >> KVASER_PCIEFD_KCAN_TX_NPACKETS_MAX_SHIFT) &
drivers/net/can/m_can/m_can.c+1−4
@@ -501,9 +501,6 @@ static int m_can_do_rx_poll(struct net_device *dev, int quota) · 500 unmodified lines
501501 }
502502
503503 while ((rxfs & RXFS_FFL_MASK) && (quota > 0)) {
504− if (rxfs & RXFS_RFL)
505− netdev_warn(dev, "Rx FIFO 0 Message Lost\n");
506−
507504 m_can_read_fifo(dev, rxfs);
508505
509506 quota--;
@@ -876,7 +873,7 @@ static int m_can_rx_peripheral(struct net_device *dev) · 366 unmodified lines
876873 {
877874 struct m_can_classdev *cdev = netdev_priv(dev);
878875
879− m_can_rx_handler(dev, 1);
876+ m_can_rx_handler(dev, M_CAN_NAPI_WEIGHT);
880877
881878 m_can_enable_all_interrupts(cdev);
882879
drivers/net/can/m_can/tcan4x5x-core.c+3−3
@@ -237,14 +237,14 @@ static int tcan4x5x_init(struct m_can_classdev *cdev) · 236 unmodified lines
237237 if (ret)
238238 return ret;
239239
240+ /* Zero out the MCAN buffers */
241+ m_can_init_ram(cdev);
242+
240243 ret = regmap_update_bits(tcan4x5x->regmap, TCAN4X5X_CONFIG,
241244 TCAN4X5X_MODE_SEL_MASK, TCAN4X5X_MODE_NORMAL);
242245 if (ret)
243246 return ret;
244247
245− /* Zero out the MCAN buffers */
246− m_can_init_ram(cdev);
247−
248248 return ret;
249249 }
250250
drivers/net/can/peak_canfd/peak_pciefd_main.c+0−1
@@ -21,7 +21,6 @@ · 20 unmodified lines
2121
2222 MODULE_AUTHOR("Stephane Grosjean <s.grosjean@peak-system.com>");
2323 MODULE_DESCRIPTION("Socket-CAN driver for PEAK PCAN PCIe/M.2 FD family cards");
24−MODULE_SUPPORTED_DEVICE("PEAK PCAN PCIe/M.2 FD CAN cards");
2524 MODULE_LICENSE("GPL v2");
2625
2726 #define PCIEFD_DRV_NAME "peak_pciefd"
drivers/net/can/sja1000/ems_pci.c+0−1
@@ -21,7 +21,6 @@ · 20 unmodified lines
2121
2222 MODULE_AUTHOR("Sebastian Haas <haas@ems-wuenche.com>");
2323 MODULE_DESCRIPTION("Socket-CAN driver for EMS CPC-PCI/PCIe/104P CAN cards");
24−MODULE_SUPPORTED_DEVICE("EMS CPC-PCI/PCIe/104P CAN card");
2524 MODULE_LICENSE("GPL v2");
2625
2726 #define EMS_PCI_V1_MAX_CHAN 2
drivers/net/can/sja1000/ems_pcmcia.c+0−1
@@ -21,7 +21,6 @@ · 20 unmodified lines
2121
2222 MODULE_AUTHOR("Markus Plessing <plessing@ems-wuensche.com>");
2323 MODULE_DESCRIPTION("Socket-CAN driver for EMS CPC-CARD cards");
24−MODULE_SUPPORTED_DEVICE("EMS CPC-CARD CAN card");
2524 MODULE_LICENSE("GPL v2");
2625
2726 #define EMS_PCMCIA_MAX_CHAN 2
drivers/net/can/sja1000/kvaser_pci.c+0−1
@@ -33,7 +33,6 @@ · 32 unmodified lines
3333
3434 MODULE_AUTHOR("Per Dalen <per.dalen@cnw.se>");
3535 MODULE_DESCRIPTION("Socket-CAN driver for KVASER PCAN PCI cards");
36−MODULE_SUPPORTED_DEVICE("KVASER PCAN PCI CAN card");
3736 MODULE_LICENSE("GPL v2");
3837
3938 #define MAX_NO_OF_CHANNELS 4 /* max no of channels on a single card */
drivers/net/can/sja1000/peak_pci.c+0−2
@@ -24,8 +24,6 @@ · 23 unmodified lines
2424
2525 MODULE_AUTHOR("Stephane Grosjean <s.grosjean@peak-system.com>");
2626 MODULE_DESCRIPTION("Socket-CAN driver for PEAK PCAN PCI family cards");
27−MODULE_SUPPORTED_DEVICE("PEAK PCAN PCI/PCIe/PCIeC miniPCI CAN cards");
28−MODULE_SUPPORTED_DEVICE("PEAK PCAN miniPCIe/cPCI PC/104+ PCI/104e CAN Cards");
2927 MODULE_LICENSE("GPL v2");
3028
3129 #define DRV_NAME "peak_pci"
drivers/net/can/sja1000/peak_pcmcia.c+0−1
@@ -22,7 +22,6 @@ · 21 unmodified lines
2222 MODULE_AUTHOR("Stephane Grosjean <s.grosjean@peak-system.com>");
2323 MODULE_DESCRIPTION("CAN driver for PEAK-System PCAN-PC Cards");
2424 MODULE_LICENSE("GPL v2");
25−MODULE_SUPPORTED_DEVICE("PEAK PCAN-PC Card");
2625
2726 /* PEAK-System PCMCIA driver name */
2827 #define PCC_NAME "peak_pcmcia"
drivers/net/can/sja1000/plx_pci.c+0−12
@@ -25,18 +25,6 @@ · 24 unmodified lines
2525 MODULE_AUTHOR("Pavel Cheblakov <P.B.Cheblakov@inp.nsk.su>");
2626 MODULE_DESCRIPTION("Socket-CAN driver for PLX90xx PCI-bridge cards with "
2727 "the SJA1000 chips");
28−MODULE_SUPPORTED_DEVICE("Adlink PCI-7841/cPCI-7841, "
29− "Adlink PCI-7841/cPCI-7841 SE, "
30− "Marathon CAN-bus-PCI, "
31− "Marathon CAN-bus-PCIe, "
32− "TEWS TECHNOLOGIES TPMC810, "
33− "esd CAN-PCI/CPCI/PCI104/200, "
34− "esd CAN-PCI/PMC/266, "
35− "esd CAN-PCIe/2000, "
36− "Connect Tech Inc. CANpro/104-Plus Opto (CRG001), "
37− "IXXAT PC-I 04/PCI, "
38− "ELCUS CAN-200-PCI, "
39− "ASEM DUAL CAN-RAW")
4028 MODULE_LICENSE("GPL v2");
4129
4230 #define PLX_PCI_MAX_CHAN 2
drivers/net/can/spi/mcp251x.c+18−6
@@ -314,6 +314,18 @@ static int mcp251x_spi_trans(struct spi_device *spi, int len) · 313 unmodified lines
314314 return ret;
315315 }
316316
317+static int mcp251x_spi_write(struct spi_device *spi, int len)
318+{
319+ struct mcp251x_priv *priv = spi_get_drvdata(spi);
320+ int ret;
321+
322+ ret = spi_write(spi, priv->spi_tx_buf, len);
323+ if (ret)
324+ dev_err(&spi->dev, "spi write failed: ret = %d\n", ret);
325+
326+ return ret;
327+}
328+
317329 static u8 mcp251x_read_reg(struct spi_device *spi, u8 reg)
318330 {
319331 struct mcp251x_priv *priv = spi_get_drvdata(spi);
@@ -361,7 +373,7 @@ static void mcp251x_write_reg(struct spi_device *spi, u8 reg, u8 val) · 41 unmodified lines
361373 priv->spi_tx_buf[1] = reg;
362374 priv->spi_tx_buf[2] = val;
363375
364− mcp251x_spi_trans(spi, 3);
376+ mcp251x_spi_write(spi, 3);
365377 }
366378
367379 static void mcp251x_write_2regs(struct spi_device *spi, u8 reg, u8 v1, u8 v2)
@@ -373,7 +385,7 @@ static void mcp251x_write_2regs(struct spi_device *spi, u8 reg, u8 v1, u8 v2) · 5 unmodified lines
373385 priv->spi_tx_buf[2] = v1;
374386 priv->spi_tx_buf[3] = v2;
375387
376− mcp251x_spi_trans(spi, 4);
388+ mcp251x_spi_write(spi, 4);
377389 }
378390
379391 static void mcp251x_write_bits(struct spi_device *spi, u8 reg,
@@ -386,7 +398,7 @@ static void mcp251x_write_bits(struct spi_device *spi, u8 reg, · 6 unmodified lines
386398 priv->spi_tx_buf[2] = mask;
387399 priv->spi_tx_buf[3] = val;
388400
389− mcp251x_spi_trans(spi, 4);
401+ mcp251x_spi_write(spi, 4);
390402 }
391403
392404 static u8 mcp251x_read_stat(struct spi_device *spi)
@@ -618,7 +630,7 @@ static void mcp251x_hw_tx_frame(struct spi_device *spi, u8 *buf, · 225 unmodified lines
618630 buf[i]);
619631 } else {
620632 memcpy(priv->spi_tx_buf, buf, TXBDAT_OFF + len);
621− mcp251x_spi_trans(spi, TXBDAT_OFF + len);
633+ mcp251x_spi_write(spi, TXBDAT_OFF + len);
622634 }
623635 }
624636
@@ -650,7 +662,7 @@ static void mcp251x_hw_tx(struct spi_device *spi, struct can_frame *frame, · 25 unmodified lines
650662
651663 /* use INSTRUCTION_RTS, to avoid "repeated frame problem" */
652664 priv->spi_tx_buf[0] = INSTRUCTION_RTS(1 << tx_buf_idx);
653− mcp251x_spi_trans(priv->spi, 1);
665+ mcp251x_spi_write(priv->spi, 1);
654666 }
655667
656668 static void mcp251x_hw_rx_frame(struct spi_device *spi, u8 *buf,
@@ -888,7 +900,7 @@ static int mcp251x_hw_reset(struct spi_device *spi) · 231 unmodified lines
888900 mdelay(MCP251X_OST_DELAY_MS);
889901
890902 priv->spi_tx_buf[0] = INSTRUCTION_RESET;
891− ret = mcp251x_spi_trans(spi, 1);
903+ ret = mcp251x_spi_write(spi, 1);
892904 if (ret)
893905 return ret;
894906
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c+4−17
@@ -335,8 +335,6 @@ static void mcp251xfd_ring_init(struct mcp251xfd_priv *priv) · 334 unmodified lines
335335 u8 len;
336336 int i, j;
337337
338− netdev_reset_queue(priv->ndev);
339−
340338 /* TEF */
341339 tef_ring = priv->tef;
342340 tef_ring->head = 0;
@@ -1249,8 +1247,7 @@ mcp251xfd_handle_tefif_recover(const struct mcp251xfd_priv *priv, const u32 seq) · 906 unmodified lines
12491247
12501248 static int
12511249 mcp251xfd_handle_tefif_one(struct mcp251xfd_priv *priv,
1252− const struct mcp251xfd_hw_tef_obj *hw_tef_obj,
1253− unsigned int *frame_len_ptr)
1250+ const struct mcp251xfd_hw_tef_obj *hw_tef_obj)
12541251 {
12551252 struct net_device_stats *stats = &priv->ndev->stats;
12561253 u32 seq, seq_masked, tef_tail_masked;
@@ -1272,8 +1269,7 @@ mcp251xfd_handle_tefif_one(struct mcp251xfd_priv *priv, · 15 unmodified lines
12721269 stats->tx_bytes +=
12731270 can_rx_offload_get_echo_skb(&priv->offload,
12741271 mcp251xfd_get_tef_tail(priv),
1275− hw_tef_obj->ts,
1276− frame_len_ptr);
1272+ hw_tef_obj->ts, NULL);
12771273 stats->tx_packets++;
12781274 priv->tef->tail++;
12791275
@@ -1331,7 +1327,6 @@ mcp251xfd_tef_obj_read(const struct mcp251xfd_priv *priv, · 51 unmodified lines
13311327 static int mcp251xfd_handle_tefif(struct mcp251xfd_priv *priv)
13321328 {
13331329 struct mcp251xfd_hw_tef_obj hw_tef_obj[MCP251XFD_TX_OBJ_NUM_MAX];
1334− unsigned int total_frame_len = 0;
13351330 u8 tef_tail, len, l;
13361331 int err, i;
13371332
@@ -1353,9 +1348,7 @@ static int mcp251xfd_handle_tefif(struct mcp251xfd_priv *priv) · 15 unmodified lines
13531348 }
13541349
13551350 for (i = 0; i < len; i++) {
1356− unsigned int frame_len;
1357−
1358− err = mcp251xfd_handle_tefif_one(priv, &hw_tef_obj[i], &frame_len);
1351+ err = mcp251xfd_handle_tefif_one(priv, &hw_tef_obj[i]);
13591352 /* -EAGAIN means the Sequence Number in the TEF
13601353 * doesn't match our tef_tail. This can happen if we
13611354 * read the TEF objects too early. Leave loop let the
@@ -1365,8 +1358,6 @@ static int mcp251xfd_handle_tefif(struct mcp251xfd_priv *priv) · 3 unmodified lines
13651358 goto out_netif_wake_queue;
13661359 if (err)
13671360 return err;
1368−
1369− total_frame_len += frame_len;
13701361 }
13711362
13721363 out_netif_wake_queue:
@@ -1397,7 +1388,6 @@ static int mcp251xfd_handle_tefif(struct mcp251xfd_priv *priv) · 24 unmodified lines
13971388 return err;
13981389
13991390 tx_ring->tail += len;
1400− netdev_completed_queue(priv->ndev, len, total_frame_len);
14011391
14021392 err = mcp251xfd_check_tef_tail(priv);
14031393 if (err)
@@ -2443,7 +2433,6 @@ static netdev_tx_t mcp251xfd_start_xmit(struct sk_buff *skb, · 1039 unmodified lines
24432433 struct mcp251xfd_priv *priv = netdev_priv(ndev);
24442434 struct mcp251xfd_tx_ring *tx_ring = priv->tx;
24452435 struct mcp251xfd_tx_obj *tx_obj;
2446− unsigned int frame_len;
24472436 u8 tx_head;
24482437 int err;
24492438
@@ -2462,9 +2451,7 @@ static netdev_tx_t mcp251xfd_start_xmit(struct sk_buff *skb, · 12 unmodified lines
24622451 if (mcp251xfd_get_tx_free(tx_ring) == 0)
24632452 netif_stop_queue(ndev);
24642453
2465− frame_len = can_skb_get_frame_len(skb);
2466− can_put_echo_skb(skb, ndev, tx_head, frame_len);
2467− netdev_sent_queue(priv->ndev, frame_len);
2454+ can_put_echo_skb(skb, ndev, tx_head, 0);
24682455
24692456 err = mcp251xfd_tx_obj_write(priv, tx_obj);
24702457 if (err)
drivers/net/can/usb/Kconfig+1−0
@@ -73,6 +73,7 @@ config CAN_KVASER_USB · 72 unmodified lines
7373 - Kvaser Memorator Pro 5xHS
7474 - Kvaser USBcan Light 4xHS
7575 - Kvaser USBcan Pro 2xHS v2
76+ - Kvaser USBcan Pro 4xHS
7677 - Kvaser USBcan Pro 5xHS
7778 - Kvaser U100
7879 - Kvaser U100P
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c+3−1
@@ -86,8 +86,9 @@ · 85 unmodified lines
8686 #define USB_U100_PRODUCT_ID 273
8787 #define USB_U100P_PRODUCT_ID 274
8888 #define USB_U100S_PRODUCT_ID 275
89+#define USB_USBCAN_PRO_4HS_PRODUCT_ID 276
8990 #define USB_HYDRA_PRODUCT_ID_END \
90− USB_U100S_PRODUCT_ID
91+ USB_USBCAN_PRO_4HS_PRODUCT_ID
9192
9293 static inline bool kvaser_is_leaf(const struct usb_device_id *id)
9394 {
@@ -193,6 +194,7 @@ static const struct usb_device_id kvaser_usb_table[] = { · 99 unmodified lines
193194 { USB_DEVICE(KVASER_VENDOR_ID, USB_U100_PRODUCT_ID) },
194195 { USB_DEVICE(KVASER_VENDOR_ID, USB_U100P_PRODUCT_ID) },
195196 { USB_DEVICE(KVASER_VENDOR_ID, USB_U100S_PRODUCT_ID) },
197+ { USB_DEVICE(KVASER_VENDOR_ID, USB_USBCAN_PRO_4HS_PRODUCT_ID) },
196198 { }
197199 };
198200 MODULE_DEVICE_TABLE(usb, kvaser_usb_table);
drivers/net/can/usb/peak_usb/pcan_usb.c+0−2
@@ -18,8 +18,6 @@ · 17 unmodified lines
1818
1919 #include "pcan_usb_core.h"
2020
21−MODULE_SUPPORTED_DEVICE("PEAK-System PCAN-USB adapter");
22−
2321 /* PCAN-USB Endpoints */
2422 #define PCAN_USB_EP_CMDOUT 1
2523 #define PCAN_USB_EP_CMDIN (PCAN_USB_EP_CMDOUT | USB_DIR_IN)
drivers/net/can/usb/peak_usb/pcan_usb_core.c+5−1
@@ -857,7 +857,7 @@ static int peak_usb_create_dev(const struct peak_usb_adapter *peak_usb_adapter, · 856 unmodified lines
857857 if (dev->adapter->dev_set_bus) {
858858 err = dev->adapter->dev_set_bus(dev, 0);
859859 if (err)
860− goto lbl_unregister_candev;
860+ goto adap_dev_free;
861861 }
862862
863863 /* get device number early */
@@ -869,6 +869,10 @@ static int peak_usb_create_dev(const struct peak_usb_adapter *peak_usb_adapter, · 5 unmodified lines
869869
870870 return 0;
871871
872+adap_dev_free:
873+ if (dev->adapter->dev_free)
874+ dev->adapter->dev_free(dev);
875+
872876 lbl_unregister_candev:
873877 unregister_candev(netdev);
874878
drivers/net/can/usb/peak_usb/pcan_usb_fd.c+0−3
@@ -16,9 +16,6 @@ · 15 unmodified lines
1616 #include "pcan_usb_core.h"
1717 #include "pcan_usb_pro.h"
1818
19−MODULE_SUPPORTED_DEVICE("PEAK-System PCAN-USB FD adapter");
20−MODULE_SUPPORTED_DEVICE("PEAK-System PCAN-USB Pro FD adapter");
21−
2219 #define PCAN_USBPROFD_CHANNEL_COUNT 2
2320 #define PCAN_USBFD_CHANNEL_COUNT 1
2421
drivers/net/can/usb/peak_usb/pcan_usb_pro.c+0−2
@@ -17,8 +17,6 @@ · 16 unmodified lines
1717 #include "pcan_usb_core.h"
1818 #include "pcan_usb_pro.h"
1919
20−MODULE_SUPPORTED_DEVICE("PEAK-System PCAN-USB Pro adapter");
21−
2220 #define PCAN_USBPRO_CHANNEL_COUNT 2
2321
2422 /* PCAN-USB Pro adapter internal clock (MHz) */
drivers/net/dsa/b53/b53_common.c+7−7
@@ -1105,13 +1105,6 @@ static int b53_setup(struct dsa_switch *ds) · 1104 unmodified lines
11051105 b53_disable_port(ds, port);
11061106 }
11071107
1108− /* Let DSA handle the case were multiple bridges span the same switch
1109− * device and different VLAN awareness settings are requested, which
1110− * would be breaking filtering semantics for any of the other bridge
1111− * devices. (not hardware supported)
1112− */
1113− ds->vlan_filtering_is_global = true;
1114−
11151108 return b53_setup_devlink_resources(ds);
11161109 }
11171110
@@ -2664,6 +2657,13 @@ struct b53_device *b53_switch_alloc(struct device *base, · 1546 unmodified lines
26642657 ds->ops = &b53_switch_ops;
26652658 ds->untag_bridge_pvid = true;
26662659 dev->vlan_enabled = true;
2660+ /* Let DSA handle the case were multiple bridges span the same switch
2661+ * device and different VLAN awareness settings are requested, which
2662+ * would be breaking filtering semantics for any of the other bridge
2663+ * devices. (not hardware supported)
2664+ */
2665+ ds->vlan_filtering_is_global = true;
2666+
26672667 mutex_init(&dev->reg_mutex);
26682668 mutex_init(&dev->stats_mutex);
26692669
drivers/net/dsa/bcm_sf2.c+11−6
@@ -114,7 +114,10 @@ static void bcm_sf2_imp_setup(struct dsa_switch *ds, int port) · 113 unmodified lines
114114 /* Force link status for IMP port */
115115 reg = core_readl(priv, offset);
116116 reg |= (MII_SW_OR | LINK_STS);
117− reg &= ~GMII_SPEED_UP_2G;
117+ if (priv->type == BCM4908_DEVICE_ID)
118+ reg |= GMII_SPEED_UP_2G;
119+ else
120+ reg &= ~GMII_SPEED_UP_2G;
118121 core_writel(priv, reg, offset);
119122
120123 /* Enable Broadcast, Multicast, Unicast forwarding to IMP port */
@@ -406,7 +409,7 @@ static int bcm_sf2_sw_rst(struct bcm_sf2_priv *priv) · 285 unmodified lines
406409 /* The watchdog reset does not work on 7278, we need to hit the
407410 * "external" reset line through the reset controller.
408411 */
409− if (priv->type == BCM7278_DEVICE_ID && !IS_ERR(priv->rcdev)) {
412+ if (priv->type == BCM7278_DEVICE_ID) {
410413 ret = reset_control_assert(priv->rcdev);
411414 if (ret)
412415 return ret;
@@ -585,8 +588,10 @@ static u32 bcm_sf2_sw_get_phy_flags(struct dsa_switch *ds, int port) · 172 unmodified lines
585588 * in bits 15:8 and the patch level in bits 7:0 which is exactly what
586589 * the REG_PHY_REVISION register layout is.
587590 */
588−
589− return priv->hw_params.gphy_rev;
591+ if (priv->int_phy_mask & BIT(port))
592+ return priv->hw_params.gphy_rev;
593+ else
594+ return 0;
590595 }
591596
592597 static void bcm_sf2_sw_validate(struct dsa_switch *ds, int port,
@@ -1265,7 +1270,7 @@ static int bcm_sf2_sw_probe(struct platform_device *pdev) · 672 unmodified lines
12651270
12661271 priv->rcdev = devm_reset_control_get_optional_exclusive(&pdev->dev,
12671272 "switch");
1268− if (PTR_ERR(priv->rcdev) == -EPROBE_DEFER)
1273+ if (IS_ERR(priv->rcdev))
12691274 return PTR_ERR(priv->rcdev);
12701275
12711276 /* Auto-detection using standard registers will not work, so
@@ -1426,7 +1431,7 @@ static int bcm_sf2_sw_remove(struct platform_device *pdev) · 154 unmodified lines
14261431 bcm_sf2_mdio_unregister(priv);
14271432 clk_disable_unprepare(priv->clk_mdiv);
14281433 clk_disable_unprepare(priv->clk);
1429− if (priv->type == BCM7278_DEVICE_ID && !IS_ERR(priv->rcdev))
1434+ if (priv->type == BCM7278_DEVICE_ID)
14301435 reset_control_assert(priv->rcdev);
14311436
14321437 return 0;
drivers/net/dsa/lantiq_gswip.c+173−22
@@ -93,8 +93,12 @@ · 92 unmodified lines
9393
9494 /* GSWIP MII Registers */
9595 #define GSWIP_MII_CFGp(p) (0x2 * (p))
96+#define GSWIP_MII_CFG_RESET BIT(15)
9697 #define GSWIP_MII_CFG_EN BIT(14)
98+#define GSWIP_MII_CFG_ISOLATE BIT(13)
9799 #define GSWIP_MII_CFG_LDCLKDIS BIT(12)
100+#define GSWIP_MII_CFG_RGMII_IBS BIT(8)
101+#define GSWIP_MII_CFG_RMII_CLK BIT(7)
98102 #define GSWIP_MII_CFG_MODE_MIIP 0x0
99103 #define GSWIP_MII_CFG_MODE_MIIM 0x1
100104 #define GSWIP_MII_CFG_MODE_RMIIP 0x2
@@ -190,6 +194,23 @@ · 89 unmodified lines
190194 #define GSWIP_PCE_DEFPVID(p) (0x486 + ((p) * 0xA))
191195
192196 #define GSWIP_MAC_FLEN 0x8C5
197+#define GSWIP_MAC_CTRL_0p(p) (0x903 + ((p) * 0xC))
198+#define GSWIP_MAC_CTRL_0_PADEN BIT(8)
199+#define GSWIP_MAC_CTRL_0_FCS_EN BIT(7)
200+#define GSWIP_MAC_CTRL_0_FCON_MASK 0x0070
201+#define GSWIP_MAC_CTRL_0_FCON_AUTO 0x0000
202+#define GSWIP_MAC_CTRL_0_FCON_RX 0x0010
203+#define GSWIP_MAC_CTRL_0_FCON_TX 0x0020
204+#define GSWIP_MAC_CTRL_0_FCON_RXTX 0x0030
205+#define GSWIP_MAC_CTRL_0_FCON_NONE 0x0040
206+#define GSWIP_MAC_CTRL_0_FDUP_MASK 0x000C
207+#define GSWIP_MAC_CTRL_0_FDUP_AUTO 0x0000
208+#define GSWIP_MAC_CTRL_0_FDUP_EN 0x0004
209+#define GSWIP_MAC_CTRL_0_FDUP_DIS 0x000C
210+#define GSWIP_MAC_CTRL_0_GMII_MASK 0x0003
211+#define GSWIP_MAC_CTRL_0_GMII_AUTO 0x0000
212+#define GSWIP_MAC_CTRL_0_GMII_MII 0x0001
213+#define GSWIP_MAC_CTRL_0_GMII_RGMII 0x0002
193214 #define GSWIP_MAC_CTRL_2p(p) (0x905 + ((p) * 0xC))
194215 #define GSWIP_MAC_CTRL_2_MLEN BIT(3) /* Maximum Untagged Frame Lnegth */
195216
@@ -653,16 +674,13 @@ static int gswip_port_enable(struct dsa_switch *ds, int port, · 457 unmodified lines
653674 GSWIP_SDMA_PCTRLp(port));
654675
655676 if (!dsa_is_cpu_port(ds, port)) {
656− u32 macconf = GSWIP_MDIO_PHY_LINK_AUTO |
657− GSWIP_MDIO_PHY_SPEED_AUTO |
658− GSWIP_MDIO_PHY_FDUP_AUTO |
659− GSWIP_MDIO_PHY_FCONTX_AUTO |
660− GSWIP_MDIO_PHY_FCONRX_AUTO |
661− (phydev->mdio.addr & GSWIP_MDIO_PHY_ADDR_MASK);
662−
663− gswip_mdio_w(priv, macconf, GSWIP_MDIO_PHYp(port));
664− /* Activate MDIO auto polling */
665− gswip_mdio_mask(priv, 0, BIT(port), GSWIP_MDIO_MDC_CFG0);
677+ u32 mdio_phy = 0;
678+
679+ if (phydev)
680+ mdio_phy = phydev->mdio.addr & GSWIP_MDIO_PHY_ADDR_MASK;
681+
682+ gswip_mdio_mask(priv, GSWIP_MDIO_PHY_ADDR_MASK, mdio_phy,
683+ GSWIP_MDIO_PHYp(port));
666684 }
667685
668686 return 0;
@@ -675,14 +693,6 @@ static void gswip_port_disable(struct dsa_switch *ds, int port) · 6 unmodified lines
675693 if (!dsa_is_user_port(ds, port))
676694 return;
677695
678− if (!dsa_is_cpu_port(ds, port)) {
679− gswip_mdio_mask(priv, GSWIP_MDIO_PHY_LINK_DOWN,
680− GSWIP_MDIO_PHY_LINK_MASK,
681− GSWIP_MDIO_PHYp(port));
682− /* Deactivate MDIO auto polling */
683− gswip_mdio_mask(priv, BIT(port), 0, GSWIP_MDIO_MDC_CFG0);
684− }
685−
686696 gswip_switch_mask(priv, GSWIP_FDMA_PCTRL_EN, 0,
687697 GSWIP_FDMA_PCTRLp(port));
688698 gswip_switch_mask(priv, GSWIP_SDMA_PCTRL_EN, 0,
@@ -794,14 +804,32 @@ static int gswip_setup(struct dsa_switch *ds) · 105 unmodified lines
794804 gswip_switch_w(priv, BIT(cpu_port), GSWIP_PCE_PMAP2);
795805 gswip_switch_w(priv, BIT(cpu_port), GSWIP_PCE_PMAP3);
796806
797− /* disable PHY auto polling */
807+ /* Deactivate MDIO PHY auto polling. Some PHYs as the AR8030 have an
808+ * interoperability problem with this auto polling mechanism because
809+ * their status registers think that the link is in a different state
810+ * than it actually is. For the AR8030 it has the BMSR_ESTATEN bit set
811+ * as well as ESTATUS_1000_TFULL and ESTATUS_1000_XFULL. This makes the
812+ * auto polling state machine consider the link being negotiated with
813+ * 1Gbit/s. Since the PHY itself is a Fast Ethernet RMII PHY this leads
814+ * to the switch port being completely dead (RX and TX are both not
815+ * working).
816+ * Also with various other PHY / port combinations (PHY11G GPHY, PHY22F
817+ * GPHY, external RGMII PEF7071/7072) any traffic would stop. Sometimes
818+ * it would work fine for a few minutes to hours and then stop, on
819+ * other device it would no traffic could be sent or received at all.
820+ * Testing shows that when PHY auto polling is disabled these problems
821+ * go away.
822+ */
798823 gswip_mdio_w(priv, 0x0, GSWIP_MDIO_MDC_CFG0);
824+
799825 /* Configure the MDIO Clock 2.5 MHz */
800826 gswip_mdio_mask(priv, 0xff, 0x09, GSWIP_MDIO_MDC_CFG1);
801827
802− /* Disable the xMII link */
828+ /* Disable the xMII interface and clear it's isolation bit */
803829 for (i = 0; i < priv->hw_info->max_ports; i++)
804− gswip_mii_mask_cfg(priv, GSWIP_MII_CFG_EN, 0, i);
830+ gswip_mii_mask_cfg(priv,
831+ GSWIP_MII_CFG_EN | GSWIP_MII_CFG_ISOLATE,
832+ 0, i);
805833
806834 /* enable special tag insertion on cpu port */
807835 gswip_switch_mask(priv, 0, GSWIP_FDMA_PCTRL_STEN,
@@ -1450,6 +1478,112 @@ unsupported: · 642 unmodified lines
14501478 return;
14511479 }
14521480
1481+static void gswip_port_set_link(struct gswip_priv *priv, int port, bool link)
1482+{
1483+ u32 mdio_phy;
1484+
1485+ if (link)
1486+ mdio_phy = GSWIP_MDIO_PHY_LINK_UP;
1487+ else
1488+ mdio_phy = GSWIP_MDIO_PHY_LINK_DOWN;
1489+
1490+ gswip_mdio_mask(priv, GSWIP_MDIO_PHY_LINK_MASK, mdio_phy,
1491+ GSWIP_MDIO_PHYp(port));
1492+}
1493+
1494+static void gswip_port_set_speed(struct gswip_priv *priv, int port, int speed,
1495+ phy_interface_t interface)
1496+{
1497+ u32 mdio_phy = 0, mii_cfg = 0, mac_ctrl_0 = 0;
1498+
1499+ switch (speed) {
1500+ case SPEED_10:
1501+ mdio_phy = GSWIP_MDIO_PHY_SPEED_M10;
1502+
1503+ if (interface == PHY_INTERFACE_MODE_RMII)
1504+ mii_cfg = GSWIP_MII_CFG_RATE_M50;
1505+ else
1506+ mii_cfg = GSWIP_MII_CFG_RATE_M2P5;
1507+
1508+ mac_ctrl_0 = GSWIP_MAC_CTRL_0_GMII_MII;
1509+ break;
1510+
1511+ case SPEED_100:
1512+ mdio_phy = GSWIP_MDIO_PHY_SPEED_M100;
1513+
1514+ if (interface == PHY_INTERFACE_MODE_RMII)
1515+ mii_cfg = GSWIP_MII_CFG_RATE_M50;
1516+ else
1517+ mii_cfg = GSWIP_MII_CFG_RATE_M25;
1518+
1519+ mac_ctrl_0 = GSWIP_MAC_CTRL_0_GMII_MII;
1520+ break;
1521+
1522+ case SPEED_1000:
1523+ mdio_phy = GSWIP_MDIO_PHY_SPEED_G1;
1524+
1525+ mii_cfg = GSWIP_MII_CFG_RATE_M125;
1526+
1527+ mac_ctrl_0 = GSWIP_MAC_CTRL_0_GMII_RGMII;
1528+ break;
1529+ }
1530+
1531+ gswip_mdio_mask(priv, GSWIP_MDIO_PHY_SPEED_MASK, mdio_phy,
1532+ GSWIP_MDIO_PHYp(port));
1533+ gswip_mii_mask_cfg(priv, GSWIP_MII_CFG_RATE_MASK, mii_cfg, port);
1534+ gswip_switch_mask(priv, GSWIP_MAC_CTRL_0_GMII_MASK, mac_ctrl_0,
1535+ GSWIP_MAC_CTRL_0p(port));
1536+}
1537+
1538+static void gswip_port_set_duplex(struct gswip_priv *priv, int port, int duplex)
1539+{
1540+ u32 mac_ctrl_0, mdio_phy;
1541+
1542+ if (duplex == DUPLEX_FULL) {
1543+ mac_ctrl_0 = GSWIP_MAC_CTRL_0_FDUP_EN;
1544+ mdio_phy = GSWIP_MDIO_PHY_FDUP_EN;
1545+ } else {
1546+ mac_ctrl_0 = GSWIP_MAC_CTRL_0_FDUP_DIS;
1547+ mdio_phy = GSWIP_MDIO_PHY_FDUP_DIS;
1548+ }
1549+
1550+ gswip_switch_mask(priv, GSWIP_MAC_CTRL_0_FDUP_MASK, mac_ctrl_0,
1551+ GSWIP_MAC_CTRL_0p(port));
1552+ gswip_mdio_mask(priv, GSWIP_MDIO_PHY_FDUP_MASK, mdio_phy,
1553+ GSWIP_MDIO_PHYp(port));
1554+}
1555+
1556+static void gswip_port_set_pause(struct gswip_priv *priv, int port,
1557+ bool tx_pause, bool rx_pause)
1558+{
1559+ u32 mac_ctrl_0, mdio_phy;
1560+
1561+ if (tx_pause && rx_pause) {
1562+ mac_ctrl_0 = GSWIP_MAC_CTRL_0_FCON_RXTX;
1563+ mdio_phy = GSWIP_MDIO_PHY_FCONTX_EN |
1564+ GSWIP_MDIO_PHY_FCONRX_EN;
1565+ } else if (tx_pause) {
1566+ mac_ctrl_0 = GSWIP_MAC_CTRL_0_FCON_TX;
1567+ mdio_phy = GSWIP_MDIO_PHY_FCONTX_EN |
1568+ GSWIP_MDIO_PHY_FCONRX_DIS;
1569+ } else if (rx_pause) {
1570+ mac_ctrl_0 = GSWIP_MAC_CTRL_0_FCON_RX;
1571+ mdio_phy = GSWIP_MDIO_PHY_FCONTX_DIS |
1572+ GSWIP_MDIO_PHY_FCONRX_EN;
1573+ } else {
1574+ mac_ctrl_0 = GSWIP_MAC_CTRL_0_FCON_NONE;
1575+ mdio_phy = GSWIP_MDIO_PHY_FCONTX_DIS |
1576+ GSWIP_MDIO_PHY_FCONRX_DIS;
1577+ }
1578+
1579+ gswip_switch_mask(priv, GSWIP_MAC_CTRL_0_FCON_MASK,
1580+ mac_ctrl_0, GSWIP_MAC_CTRL_0p(port));
1581+ gswip_mdio_mask(priv,
1582+ GSWIP_MDIO_PHY_FCONTX_MASK |
1583+ GSWIP_MDIO_PHY_FCONRX_MASK,
1584+ mdio_phy, GSWIP_MDIO_PHYp(port));
1585+}
1586+
14531587 static void gswip_phylink_mac_config(struct dsa_switch *ds, int port,
14541588 unsigned int mode,
14551589 const struct phylink_link_state *state)
@@ -1469,6 +1603,9 @@ static void gswip_phylink_mac_config(struct dsa_switch *ds, int port, · 13 unmodified lines
14691603 break;
14701604 case PHY_INTERFACE_MODE_RMII:
14711605 miicfg |= GSWIP_MII_CFG_MODE_RMIIM;
1606+
1607+ /* Configure the RMII clock as output: */
1608+ miicfg |= GSWIP_MII_CFG_RMII_CLK;
14721609 break;
14731610 case PHY_INTERFACE_MODE_RGMII:
14741611 case PHY_INTERFACE_MODE_RGMII_ID:
@@ -1481,7 +1618,11 @@ static void gswip_phylink_mac_config(struct dsa_switch *ds, int port, · 6 unmodified lines
14811618 "Unsupported interface: %d\n", state->interface);
14821619 return;
14831620 }
1484− gswip_mii_mask_cfg(priv, GSWIP_MII_CFG_MODE_MASK, miicfg, port);
1621+
1622+ gswip_mii_mask_cfg(priv,
1623+ GSWIP_MII_CFG_MODE_MASK | GSWIP_MII_CFG_RMII_CLK |
1624+ GSWIP_MII_CFG_RGMII_IBS | GSWIP_MII_CFG_LDCLKDIS,
1625+ miicfg, port);
14851626
14861627 switch (state->interface) {
14871628 case PHY_INTERFACE_MODE_RGMII_ID:
@@ -1506,6 +1647,9 @@ static void gswip_phylink_mac_link_down(struct dsa_switch *ds, int port, · 18 unmodified lines
15061647 struct gswip_priv *priv = ds->priv;
15071648
15081649 gswip_mii_mask_cfg(priv, GSWIP_MII_CFG_EN, 0, port);
1650+
1651+ if (!dsa_is_cpu_port(ds, port))
1652+ gswip_port_set_link(priv, port, false);
15091653 }
15101654
15111655 static void gswip_phylink_mac_link_up(struct dsa_switch *ds, int port,
@@ -1517,6 +1661,13 @@ static void gswip_phylink_mac_link_up(struct dsa_switch *ds, int port, · 5 unmodified lines
15171661 {
15181662 struct gswip_priv *priv = ds->priv;
15191663
1664+ if (!dsa_is_cpu_port(ds, port)) {
1665+ gswip_port_set_link(priv, port, true);
1666+ gswip_port_set_speed(priv, port, speed, interface);
1667+ gswip_port_set_duplex(priv, port, duplex);
1668+ gswip_port_set_pause(priv, port, tx_pause, rx_pause);
1669+ }
1670+
15201671 gswip_mii_mask_cfg(priv, 0, GSWIP_MII_CFG_EN, port);
15211672 }
15221673
drivers/net/dsa/mt7530.c+29−27
@@ -436,34 +436,32 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface) · 435 unmodified lines
436436 TD_DM_DRVP(8) | TD_DM_DRVN(8));
437437
438438 /* Setup core clock for MT7530 */
439− if (!trgint) {
440− /* Disable MT7530 core clock */
441− core_clear(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
442−
443− /* Disable PLL, since phy_device has not yet been created
444− * provided for phy_[read,write]_mmd_indirect is called, we
445− * provide our own core_write_mmd_indirect to complete this
446− * function.
447− */
448− core_write_mmd_indirect(priv,
449− CORE_GSWPLL_GRP1,
450− MDIO_MMD_VEND2,
451− 0);
452−
453− /* Set core clock into 500Mhz */
454− core_write(priv, CORE_GSWPLL_GRP2,
455− RG_GSWPLL_POSDIV_500M(1) |
456− RG_GSWPLL_FBKDIV_500M(25));
439+ /* Disable MT7530 core clock */
440+ core_clear(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
457441
458− /* Enable PLL */
459− core_write(priv, CORE_GSWPLL_GRP1,
460− RG_GSWPLL_EN_PRE |
461− RG_GSWPLL_POSDIV_200M(2) |
462− RG_GSWPLL_FBKDIV_200M(32));
463−
464− /* Enable MT7530 core clock */
465− core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
466− }
442+ /* Disable PLL, since phy_device has not yet been created
443+ * provided for phy_[read,write]_mmd_indirect is called, we
444+ * provide our own core_write_mmd_indirect to complete this
445+ * function.
446+ */
447+ core_write_mmd_indirect(priv,
448+ CORE_GSWPLL_GRP1,
449+ MDIO_MMD_VEND2,
450+ 0);
451+
452+ /* Set core clock into 500Mhz */
453+ core_write(priv, CORE_GSWPLL_GRP2,
454+ RG_GSWPLL_POSDIV_500M(1) |
455+ RG_GSWPLL_FBKDIV_500M(25));
456+
457+ /* Enable PLL */
458+ core_write(priv, CORE_GSWPLL_GRP1,
459+ RG_GSWPLL_EN_PRE |
460+ RG_GSWPLL_POSDIV_200M(2) |
461+ RG_GSWPLL_FBKDIV_200M(32));
462+
463+ /* Enable MT7530 core clock */
464+ core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
467465
468466 /* Setup the MT7530 TRGMII Tx Clock */
469467 core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
@@ -1624,6 +1622,7 @@ mtk_get_tag_protocol(struct dsa_switch *ds, int port, · 1154 unmodified lines
16241622 }
16251623 }
16261624
1625+#ifdef CONFIG_GPIOLIB
16271626 static inline u32
16281627 mt7530_gpio_to_bit(unsigned int offset)
16291628 {
@@ -1726,6 +1725,7 @@ mt7530_setup_gpio(struct mt7530_priv *priv) · 96 unmodified lines
17261725
17271726 return devm_gpiochip_add_data(dev, gc, priv);
17281727 }
1728+#endif /* CONFIG_GPIOLIB */
17291729
17301730 static int
17311731 mt7530_setup(struct dsa_switch *ds)
@@ -1868,11 +1868,13 @@ mt7530_setup(struct dsa_switch *ds) · 136 unmodified lines
18681868 }
18691869 }
18701870
1871+#ifdef CONFIG_GPIOLIB
18711872 if (of_property_read_bool(priv->dev->of_node, "gpio-controller")) {
18721873 ret = mt7530_setup_gpio(priv);
18731874 if (ret)
18741875 return ret;
18751876 }
1877+#endif /* CONFIG_GPIOLIB */
18761878
18771879 mt7530_setup_port5(ds, interface);
18781880
drivers/net/dsa/mv88e6xxx/chip.c+13−17
@@ -3026,10 +3026,17 @@ out_resources: · 3025 unmodified lines
30263026 return err;
30273027 }
30283028
3029+/* prod_id for switch families which do not have a PHY model number */
3030+static const u16 family_prod_id_table[] = {
3031+ [MV88E6XXX_FAMILY_6341] = MV88E6XXX_PORT_SWITCH_ID_PROD_6341,
3032+ [MV88E6XXX_FAMILY_6390] = MV88E6XXX_PORT_SWITCH_ID_PROD_6390,
3033+};
3034+
30293035 static int mv88e6xxx_mdio_read(struct mii_bus *bus, int phy, int reg)
30303036 {
30313037 struct mv88e6xxx_mdio_bus *mdio_bus = bus->priv;
30323038 struct mv88e6xxx_chip *chip = mdio_bus->chip;
3039+ u16 prod_id;
30333040 u16 val;
30343041 int err;
30353042
@@ -3040,23 +3047,12 @@ static int mv88e6xxx_mdio_read(struct mii_bus *bus, int phy, int reg) · 4 unmodified lines
30403047 err = chip->info->ops->phy_read(chip, bus, phy, reg, &val);
30413048 mv88e6xxx_reg_unlock(chip);
30423049
3043− if (reg == MII_PHYSID2) {
3044− /* Some internal PHYs don't have a model number. */
3045− if (chip->info->family != MV88E6XXX_FAMILY_6165)
3046− /* Then there is the 6165 family. It gets is
3047− * PHYs correct. But it can also have two
3048− * SERDES interfaces in the PHY address
3049− * space. And these don't have a model
3050− * number. But they are not PHYs, so we don't
3051− * want to give them something a PHY driver
3052− * will recognise.
3053− *
3054− * Use the mv88e6390 family model number
3055− * instead, for anything which really could be
3056− * a PHY,
3057− */
3058− if (!(val & 0x3f0))
3059− val |= MV88E6XXX_PORT_SWITCH_ID_PROD_6390 >> 4;
3050+ /* Some internal PHYs don't have a model number. */
3051+ if (reg == MII_PHYSID2 && !(val & 0x3f0) &&
3052+ chip->info->family < ARRAY_SIZE(family_prod_id_table)) {
3053+ prod_id = family_prod_id_table[chip->info->family];
3054+ if (prod_id)
3055+ val |= prod_id >> 4;
30603056 }
30613057
30623058 return err ? err : val;
drivers/net/dsa/sja1105/sja1105_main.c+3−3
@@ -1922,7 +1922,7 @@ out_unlock_ptp: · 1921 unmodified lines
19221922 speed = SPEED_1000;
19231923 else if (bmcr & BMCR_SPEED100)
19241924 speed = SPEED_100;
1925− else if (bmcr & BMCR_SPEED10)
1925+ else
19261926 speed = SPEED_10;
19271927
19281928 sja1105_sgmii_pcs_force_speed(priv, speed);
@@ -3369,14 +3369,14 @@ static int sja1105_port_ucast_bcast_flood(struct sja1105_private *priv, int to, · 1440 unmodified lines
33693369 if (flags.val & BR_FLOOD)
33703370 priv->ucast_egress_floods |= BIT(to);
33713371 else
3372− priv->ucast_egress_floods |= BIT(to);
3372+ priv->ucast_egress_floods &= ~BIT(to);
33733373 }
33743374
33753375 if (flags.mask & BR_BCAST_FLOOD) {
33763376 if (flags.val & BR_BCAST_FLOOD)
33773377 priv->bcast_egress_floods |= BIT(to);
33783378 else
3379− priv->bcast_egress_floods |= BIT(to);
3379+ priv->bcast_egress_floods &= ~BIT(to);
33803380 }
33813381
33823382 return sja1105_manage_flood_domains(priv);
drivers/net/dsa/xrs700x/xrs700x.c+8−2
@@ -528,7 +528,10 @@ static int xrs700x_hsr_join(struct dsa_switch *ds, int port, · 527 unmodified lines
528528 return -EOPNOTSUPP;
529529
530530 dsa_hsr_foreach_port(dp, ds, hsr) {
531− partner = dp;
531+ if (dp->index != port) {
532+ partner = dp;
533+ break;
534+ }
532535 }
533536
534537 /* We can't enable redundancy on the switch until both
@@ -582,7 +585,10 @@ static int xrs700x_hsr_leave(struct dsa_switch *ds, int port, · 47 unmodified lines
582585 unsigned int val;
583586
584587 dsa_hsr_foreach_port(dp, ds, hsr) {
585− partner = dp;
588+ if (dp->index != port) {
589+ partner = dp;
590+ break;
591+ }
586592 }
587593
588594 if (!partner)
drivers/net/ethernet/amd/pcnet32.c+3−2
@@ -1534,8 +1534,7 @@ pcnet32_probe_pci(struct pci_dev *pdev, const struct pci_device_id *ent) · 1533 unmodified lines
15341534 }
15351535 pci_set_master(pdev);
15361536
1537− ioaddr = pci_resource_start(pdev, 0);
1538− if (!ioaddr) {
1537+ if (!pci_resource_len(pdev, 0)) {
15391538 if (pcnet32_debug & NETIF_MSG_PROBE)
15401539 pr_err("card has no PCI IO resources, aborting\n");
15411540 err = -ENODEV;
@@ -1548,6 +1547,8 @@ pcnet32_probe_pci(struct pci_dev *pdev, const struct pci_device_id *ent) · 6 unmodified lines
15481547 pr_err("architecture does not support 32bit PCI busmaster DMA\n");
15491548 goto err_disable_dev;
15501549 }
1550+
1551+ ioaddr = pci_resource_start(pdev, 0);
15511552 if (!request_region(ioaddr, PCNET32_TOTAL_SIZE, "pcnet32_probe_pci")) {
15521553 if (pcnet32_debug & NETIF_MSG_PROBE)
15531554 pr_err("io address range already allocated\n");
drivers/net/ethernet/amd/xgbe/xgbe.h+3−3
@@ -180,9 +180,9 @@ · 179 unmodified lines
180180 #define XGBE_DMA_SYS_AWCR 0x30303030
181181
182182 /* DMA cache settings - PCI device */
183−#define XGBE_DMA_PCI_ARCR 0x00000003
184−#define XGBE_DMA_PCI_AWCR 0x13131313
185−#define XGBE_DMA_PCI_AWARCR 0x00000313
183+#define XGBE_DMA_PCI_ARCR 0x000f0f0f
184+#define XGBE_DMA_PCI_AWCR 0x0f0f0f0f
185+#define XGBE_DMA_PCI_AWARCR 0x00000f0f
186186
187187 /* DMA channel interrupt modes */
188188 #define XGBE_IRQ_MODE_EDGE 0
drivers/net/ethernet/atheros/alx/main.c+5−2
@@ -1894,13 +1894,16 @@ static int alx_resume(struct device *dev) · 1893 unmodified lines
18941894
18951895 if (!netif_running(alx->dev))
18961896 return 0;
1897− netif_device_attach(alx->dev);
18981897
18991898 rtnl_lock();
19001899 err = __alx_open(alx, true);
19011900 rtnl_unlock();
1901+ if (err)
1902+ return err;
19021903
1903− return err;
1904+ netif_device_attach(alx->dev);
1905+
1906+ return 0;
19041907 }
19051908
19061909 static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);
drivers/net/ethernet/broadcom/Kconfig+1−1
@@ -54,7 +54,7 @@ config B44_PCI · 53 unmodified lines
5454 config BCM4908_ENET
5555 tristate "Broadcom BCM4908 internal mac support"
5656 depends on ARCH_BCM4908 || COMPILE_TEST
57− default y
57+ default y if ARCH_BCM4908
5858 help
5959 This driver supports Ethernet controller integrated into Broadcom
6060 BCM4908 family SoCs.
drivers/net/ethernet/broadcom/bcm4908_enet.c+4−0
@@ -172,6 +172,7 @@ static int bcm4908_dma_alloc_buf_descs(struct bcm4908_enet *enet, · 171 unmodified lines
172172
173173 err_free_buf_descs:
174174 dma_free_coherent(dev, size, ring->cpu_addr, ring->dma_addr);
175+ ring->cpu_addr = NULL;
175176 return -ENOMEM;
176177 }
177178
@@ -592,6 +593,9 @@ static int bcm4908_enet_poll(struct napi_struct *napi, int weight) · 414 unmodified lines
592593 bcm4908_enet_intrs_on(enet);
593594 }
594595
596+ /* Hardware could disable ring if it run out of descriptors */
597+ bcm4908_enet_dma_rx_ring_enable(enet, &enet->rx_ring);
598+
595599 return handled;
596600 }
597601
drivers/net/ethernet/broadcom/bnxt/bnxt.c+15−2
@@ -8556,10 +8556,18 @@ static void bnxt_setup_inta(struct bnxt *bp) · 8555 unmodified lines
85568556 bp->irq_tbl[0].handler = bnxt_inta;
85578557 }
85588558
8559+static int bnxt_init_int_mode(struct bnxt *bp);
8560+
85598561 static int bnxt_setup_int_mode(struct bnxt *bp)
85608562 {
85618563 int rc;
85628564
8565+ if (!bp->irq_tbl) {
8566+ rc = bnxt_init_int_mode(bp);
8567+ if (rc || !bp->irq_tbl)
8568+ return rc ?: -ENODEV;
8569+ }
8570+
85638571 if (bp->flags & BNXT_FLAG_USING_MSIX)
85648572 bnxt_setup_msix(bp);
85658573 else
@@ -8744,7 +8752,7 @@ static int bnxt_init_inta(struct bnxt *bp) · 178 unmodified lines
87448752
87458753 static int bnxt_init_int_mode(struct bnxt *bp)
87468754 {
8747− int rc = 0;
8755+ int rc = -ENODEV;
87488756
87498757 if (bp->flags & BNXT_FLAG_MSIX_CAP)
87508758 rc = bnxt_init_msix(bp);
@@ -9514,7 +9522,8 @@ static int bnxt_hwrm_if_change(struct bnxt *bp, bool up) · 763 unmodified lines
95149522 {
95159523 struct hwrm_func_drv_if_change_output *resp = bp->hwrm_cmd_resp_addr;
95169524 struct hwrm_func_drv_if_change_input req = {0};
9517− bool resc_reinit = false, fw_reset = false;
9525+ bool fw_reset = !bp->irq_tbl;
9526+ bool resc_reinit = false;
95189527 int rc, retry = 0;
95199528 u32 flags = 0;
95209529
@@ -9557,6 +9566,7 @@ static int bnxt_hwrm_if_change(struct bnxt *bp, bool up) · 36 unmodified lines
95579566
95589567 if (test_bit(BNXT_STATE_IN_FW_RESET, &bp->state) && !fw_reset) {
95599568 netdev_err(bp->dev, "RESET_DONE not set during FW reset.\n");
9569+ set_bit(BNXT_STATE_ABORT_ERR, &bp->state);
95609570 return -ENODEV;
95619571 }
95629572 if (resc_reinit || fw_reset) {
@@ -9890,6 +9900,9 @@ static int bnxt_reinit_after_abort(struct bnxt *bp) · 327 unmodified lines
98909900 if (test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
98919901 return -EBUSY;
98929902
9903+ if (bp->dev->reg_state == NETREG_UNREGISTERED)
9904+ return -ENODEV;
9905+
98939906 rc = bnxt_fw_init_one(bp);
98949907 if (!rc) {
98959908 bnxt_clear_int_mode(bp);
drivers/net/ethernet/cadence/macb_main.c+16−8
@@ -3239,6 +3239,9 @@ static void gem_prog_cmp_regs(struct macb *bp, struct ethtool_rx_flow_spec *fs) · 3238 unmodified lines
32393239 bool cmp_b = false;
32403240 bool cmp_c = false;
32413241
3242+ if (!macb_is_gem(bp))
3243+ return;
3244+
32423245 tp4sp_v = &(fs->h_u.tcp_ip4_spec);
32433246 tp4sp_m = &(fs->m_u.tcp_ip4_spec);
32443247
@@ -3607,6 +3610,7 @@ static void macb_restore_features(struct macb *bp) · 362 unmodified lines
36073610 {
36083611 struct net_device *netdev = bp->dev;
36093612 netdev_features_t features = netdev->features;
3613+ struct ethtool_rx_fs_item *item;
36103614
36113615 /* TX checksum offload */
36123616 macb_set_txcsum_feature(bp, features);
@@ -3615,6 +3619,9 @@ static void macb_restore_features(struct macb *bp) · 2 unmodified lines
36153619 macb_set_rxcsum_feature(bp, features);
36163620
36173621 /* RX Flow Filters */
3622+ list_for_each_entry(item, &bp->rx_fs_list.list, list)
3623+ gem_prog_cmp_regs(bp, &item->fs);
3624+
36183625 macb_set_rxflow_feature(bp, features);
36193626 }
36203627
@@ -3911,6 +3918,7 @@ static int macb_init(struct platform_device *pdev) · 290 unmodified lines
39113918 reg = gem_readl(bp, DCFG8);
39123919 bp->max_tuples = min((GEM_BFEXT(SCR2CMP, reg) / 3),
39133920 GEM_BFEXT(T2SCR, reg));
3921+ INIT_LIST_HEAD(&bp->rx_fs_list.list);
39143922 if (bp->max_tuples > 0) {
39153923 /* also needs one ethtype match to check IPv4 */
39163924 if (GEM_BFEXT(SCR2ETH, reg) > 0) {
@@ -3921,7 +3929,6 @@ static int macb_init(struct platform_device *pdev) · 4 unmodified lines
39213929 /* Filtering is supported in hw but don't enable it in kernel now */
39223930 dev->hw_features |= NETIF_F_NTUPLE;
39233931 /* init Rx flow definitions */
3924− INIT_LIST_HEAD(&bp->rx_fs_list.list);
39253932 bp->rx_fs_list.count = 0;
39263933 spin_lock_init(&bp->rx_fs_lock);
39273934 } else
@@ -3954,6 +3961,13 @@ static int macb_init(struct platform_device *pdev) · 26 unmodified lines
39543961 return 0;
39553962 }
39563963
3964+static const struct macb_usrio_config macb_default_usrio = {
3965+ .mii = MACB_BIT(MII),
3966+ .rmii = MACB_BIT(RMII),
3967+ .rgmii = GEM_BIT(RGMII),
3968+ .refclk = MACB_BIT(CLKEN),
3969+};
3970+
39573971 #if defined(CONFIG_OF)
39583972 /* 1518 rounded up */
39593973 #define AT91ETHER_MAX_RBUFF_SZ 0x600
@@ -4439,13 +4453,6 @@ static int fu540_c000_init(struct platform_device *pdev) · 479 unmodified lines
44394453 return macb_init(pdev);
44404454 }
44414455
4442−static const struct macb_usrio_config macb_default_usrio = {
4443− .mii = MACB_BIT(MII),
4444− .rmii = MACB_BIT(RMII),
4445− .rgmii = GEM_BIT(RGMII),
4446− .refclk = MACB_BIT(CLKEN),
4447−};
4448−
44494456 static const struct macb_usrio_config sama7g5_usrio = {
44504457 .mii = 0,
44514458 .rmii = 1,
@@ -4594,6 +4601,7 @@ static const struct macb_config default_gem_config = { · 142 unmodified lines
45944601 .dma_burst_length = 16,
45954602 .clk_init = macb_clk_init,
45964603 .init = macb_init,
4604+ .usrio = &macb_default_usrio,
45974605 .jumbo_max_len = 10240,
45984606 };
45994607
drivers/net/ethernet/cavium/liquidio/cn66xx_regs.h+1−1
@@ -412,7 +412,7 @@ · 411 unmodified lines
412412 | CN6XXX_INTR_M0UNWI_ERR \
413413 | CN6XXX_INTR_M1UPB0_ERR \
414414 | CN6XXX_INTR_M1UPWI_ERR \
415− | CN6XXX_INTR_M1UPB0_ERR \
415+ | CN6XXX_INTR_M1UNB0_ERR \
416416 | CN6XXX_INTR_M1UNWI_ERR \
417417 | CN6XXX_INTR_INSTR_DB_OF_ERR \
418418 | CN6XXX_INTR_SLIST_DB_OF_ERR \
drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c+19−4
@@ -1794,11 +1794,25 @@ int cudbg_collect_sge_indirect(struct cudbg_init *pdbg_init, · 1793 unmodified lines
17941794 struct cudbg_buffer temp_buff = { 0 };
17951795 struct sge_qbase_reg_field *sge_qbase;
17961796 struct ireg_buf *ch_sge_dbg;
1797+ u8 padap_running = 0;
17971798 int i, rc;
1799+ u32 size;
17981800
1799− rc = cudbg_get_buff(pdbg_init, dbg_buff,
1800− sizeof(*ch_sge_dbg) * 2 + sizeof(*sge_qbase),
1801− &temp_buff);
1801+ /* Accessing SGE_QBASE_MAP[0-3] and SGE_QBASE_INDEX regs can
1802+ * lead to SGE missing doorbells under heavy traffic. So, only
1803+ * collect them when adapter is idle.
1804+ */
1805+ for_each_port(padap, i) {
1806+ padap_running = netif_running(padap->port[i]);
1807+ if (padap_running)
1808+ break;
1809+ }
1810+
1811+ size = sizeof(*ch_sge_dbg) * 2;
1812+ if (!padap_running)
1813+ size += sizeof(*sge_qbase);
1814+
1815+ rc = cudbg_get_buff(pdbg_init, dbg_buff, size, &temp_buff);
18021816 if (rc)
18031817 return rc;
18041818
@@ -1820,7 +1834,8 @@ int cudbg_collect_sge_indirect(struct cudbg_init *pdbg_init, · 15 unmodified lines
18201834 ch_sge_dbg++;
18211835 }
18221836
1823− if (CHELSIO_CHIP_VERSION(padap->params.chip) > CHELSIO_T5) {
1837+ if (CHELSIO_CHIP_VERSION(padap->params.chip) > CHELSIO_T5 &&
1838+ !padap_running) {
18241839 sge_qbase = (struct sge_qbase_reg_field *)ch_sge_dbg;
18251840 /* 1 addr reg SGE_QBASE_INDEX and 4 data reg
18261841 * SGE_QBASE_MAP[0-3]
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c+2−1
@@ -2090,7 +2090,8 @@ void t4_get_regs(struct adapter *adap, void *buf, size_t buf_size) · 2089 unmodified lines
20902090 0x1190, 0x1194,
20912091 0x11a0, 0x11a4,
20922092 0x11b0, 0x11b4,
2093− 0x11fc, 0x1274,
2093+ 0x11fc, 0x123c,
2094+ 0x1254, 0x1274,
20942095 0x1280, 0x133c,
20952096 0x1800, 0x18fc,
20962097 0x3000, 0x302c,
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c+15−95
@@ -349,18 +349,6 @@ static int chcr_set_tcb_field(struct chcr_ktls_info *tx_info, u16 word, · 348 unmodified lines
349349 return cxgb4_ofld_send(tx_info->netdev, skb);
350350 }
351351
352−/*
353− * chcr_ktls_mark_tcb_close: mark tcb state to CLOSE
354− * @tx_info - driver specific tls info.
355− * return: NET_TX_OK/NET_XMIT_DROP.
356− */
357−static int chcr_ktls_mark_tcb_close(struct chcr_ktls_info *tx_info)
358−{
359− return chcr_set_tcb_field(tx_info, TCB_T_STATE_W,
360− TCB_T_STATE_V(TCB_T_STATE_M),
361− CHCR_TCB_STATE_CLOSED, 1);
362−}
363−
364352 /*
365353 * chcr_ktls_dev_del: call back for tls_dev_del.
366354 * Remove the tid and l2t entry and close the connection.
@@ -395,8 +383,6 @@ static void chcr_ktls_dev_del(struct net_device *netdev, · 28 unmodified lines
395383
396384 /* clear tid */
397385 if (tx_info->tid != -1) {
398− /* clear tcb state and then release tid */
399− chcr_ktls_mark_tcb_close(tx_info);
400386 cxgb4_remove_tid(&tx_info->adap->tids, tx_info->tx_chan,
401387 tx_info->tid, tx_info->ip_family);
402388 }
@@ -574,7 +560,6 @@ static int chcr_ktls_dev_add(struct net_device *netdev, struct sock *sk, · 171 unmodified lines
574560 return 0;
575561
576562 free_tid:
577− chcr_ktls_mark_tcb_close(tx_info);
578563 #if IS_ENABLED(CONFIG_IPV6)
579564 /* clear clip entry */
580565 if (tx_info->ip_family == AF_INET6)
@@ -672,10 +657,6 @@ static int chcr_ktls_cpl_act_open_rpl(struct adapter *adap, · 91 unmodified lines
672657 if (tx_info->pending_close) {
673658 spin_unlock(&tx_info->lock);
674659 if (!status) {
675− /* it's a late success, tcb status is establised,
676− * mark it close.
677− */
678− chcr_ktls_mark_tcb_close(tx_info);
679660 cxgb4_remove_tid(&tx_info->adap->tids, tx_info->tx_chan,
680661 tid, tx_info->ip_family);
681662 }
@@ -722,7 +703,7 @@ static int chcr_ktls_cpl_set_tcb_rpl(struct adapter *adap, unsigned char *input) · 40 unmodified lines
722703 kvfree(tx_info);
723704 return 0;
724705 }
725− tx_info->open_state = false;
706+ tx_info->open_state = CH_KTLS_OPEN_SUCCESS;
726707 spin_unlock(&tx_info->lock);
727708
728709 complete(&tx_info->completion);
@@ -930,7 +911,7 @@ chcr_ktls_get_tx_flits(u32 nr_frags, unsigned int key_ctx_len) · 201 unmodified lines
930911 }
931912
932913 /*
933− * chcr_ktls_check_tcp_options: To check if there is any TCP option availbale
914+ * chcr_ktls_check_tcp_options: To check if there is any TCP option available
934915 * other than timestamp.
935916 * @skb - skb contains partial record..
936917 * return: 1 / 0
@@ -1115,7 +1096,7 @@ static int chcr_ktls_xmit_wr_complete(struct sk_buff *skb, · 178 unmodified lines
11151096 }
11161097
11171098 if (unlikely(credits < ETHTXQ_STOP_THRES)) {
1118− /* Credits are below the threshold vaues, stop the queue after
1099+ /* Credits are below the threshold values, stop the queue after
11191100 * injecting the Work Request for this packet.
11201101 */
11211102 chcr_eth_txq_stop(q);
@@ -1663,54 +1644,6 @@ static void chcr_ktls_copy_record_in_skb(struct sk_buff *nskb, · 541 unmodified lines
16631644 refcount_add(nskb->truesize, &nskb->sk->sk_wmem_alloc);
16641645 }
16651646
1666−/*
1667− * chcr_ktls_update_snd_una: Reset the SEND_UNA. It will be done to avoid
1668− * sending the same segment again. It will discard the segment which is before
1669− * the current tx max.
1670− * @tx_info - driver specific tls info.
1671− * @q - TX queue.
1672− * return: NET_TX_OK/NET_XMIT_DROP.
1673− */
1674−static int chcr_ktls_update_snd_una(struct chcr_ktls_info *tx_info,
1675− struct sge_eth_txq *q)
1676−{
1677− struct fw_ulptx_wr *wr;
1678− unsigned int ndesc;
1679− int credits;
1680− void *pos;
1681− u32 len;
1682−
1683− len = sizeof(*wr) + roundup(CHCR_SET_TCB_FIELD_LEN, 16);
1684− ndesc = DIV_ROUND_UP(len, 64);
1685−
1686− credits = chcr_txq_avail(&q->q) - ndesc;
1687− if (unlikely(credits < 0)) {
1688− chcr_eth_txq_stop(q);
1689− return NETDEV_TX_BUSY;
1690− }
1691−
1692− pos = &q->q.desc[q->q.pidx];
1693−
1694− wr = pos;
1695− /* ULPTX wr */
1696− wr->op_to_compl = htonl(FW_WR_OP_V(FW_ULPTX_WR));
1697− wr->cookie = 0;
1698− /* fill len in wr field */
1699− wr->flowid_len16 = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(len, 16)));
1700−
1701− pos += sizeof(*wr);
1702−
1703− pos = chcr_write_cpl_set_tcb_ulp(tx_info, q, tx_info->tid, pos,
1704− TCB_SND_UNA_RAW_W,
1705− TCB_SND_UNA_RAW_V(TCB_SND_UNA_RAW_M),
1706− TCB_SND_UNA_RAW_V(0), 0);
1707−
1708− chcr_txq_advance(&q->q, ndesc);
1709− cxgb4_ring_tx_db(tx_info->adap, &q->q, ndesc);
1710−
1711− return 0;
1712−}
1713−
17141647 /*
17151648 * chcr_end_part_handler: This handler will handle the record which
17161649 * is complete or if record's end part is received. T6 adapter has a issue that
@@ -1735,7 +1668,9 @@ static int chcr_end_part_handler(struct chcr_ktls_info *tx_info, · 18 unmodified lines
17351668 struct sge_eth_txq *q, u32 skb_offset,
17361669 u32 tls_end_offset, bool last_wr)
17371670 {
1671+ bool free_skb_if_tx_fails = false;
17381672 struct sk_buff *nskb = NULL;
1673+
17391674 /* check if it is a complete record */
17401675 if (tls_end_offset == record->len) {
17411676 nskb = skb;
@@ -1758,6 +1693,8 @@ static int chcr_end_part_handler(struct chcr_ktls_info *tx_info, · 16 unmodified lines
17581693
17591694 if (last_wr)
17601695 dev_kfree_skb_any(skb);
1696+ else
1697+ free_skb_if_tx_fails = true;
17611698
17621699 last_wr = true;
17631700
@@ -1769,6 +1706,8 @@ static int chcr_end_part_handler(struct chcr_ktls_info *tx_info, · 5 unmodified lines
17691706 record->num_frags,
17701707 (last_wr && tcp_push_no_fin),
17711708 mss)) {
1709+ if (free_skb_if_tx_fails)
1710+ dev_kfree_skb_any(skb);
17721711 goto out;
17731712 }
17741713 tx_info->prev_seq = record->end_seq;
@@ -1905,11 +1844,6 @@ static int chcr_short_record_handler(struct chcr_ktls_info *tx_info, · 130 unmodified lines
19051844 /* reset tcp_seq as per the prior_data_required len */
19061845 tcp_seq -= prior_data_len;
19071846 }
1908− /* reset snd una, so the middle record won't send the already
1909− * sent part.
1910− */
1911− if (chcr_ktls_update_snd_una(tx_info, q))
1912− goto out;
19131847 atomic64_inc(&tx_info->adap->ch_ktls_stats.ktls_tx_middle_pkts);
19141848 } else {
19151849 atomic64_inc(&tx_info->adap->ch_ktls_stats.ktls_tx_start_pkts);
@@ -2006,16 +1940,15 @@ static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev) · 90 unmodified lines
20061940
20071941 /* TCP segments can be in received either complete or partial.
20081942 * chcr_end_part_handler will handle cases if complete record or end
2009− * part of the record is received. Incase of partial end part of record,
1943+ * part of the record is received. In case of partial end part of record,
20101944 * we will send the complete record again.
20111945 */
20121946
1947+ spin_lock_irqsave(&tx_ctx->base.lock, flags);
1948+
20131949 do {
2014− int i;
20151950
20161951 cxgb4_reclaim_completed_tx(adap, &q->q, true);
2017− /* lock taken */
2018− spin_lock_irqsave(&tx_ctx->base.lock, flags);
20191952 /* fetch the tls record */
20201953 record = tls_get_record(&tx_ctx->base, tcp_seq,
20211954 &tx_info->record_no);
@@ -2074,11 +2007,11 @@ static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev) · 52 unmodified lines
20742007 tls_end_offset, skb_offset,
20752008 0);
20762009
2077− spin_unlock_irqrestore(&tx_ctx->base.lock, flags);
20782010 if (ret) {
20792011 /* free the refcount taken earlier */
20802012 if (tls_end_offset < data_len)
20812013 dev_kfree_skb_any(skb);
2014+ spin_unlock_irqrestore(&tx_ctx->base.lock, flags);
20822015 goto out;
20832016 }
20842017
@@ -2088,16 +2021,6 @@ static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev) · 3 unmodified lines
20882021 continue;
20892022 }
20902023
2091− /* increase page reference count of the record, so that there
2092− * won't be any chance of page free in middle if in case stack
2093− * receives ACK and try to delete the record.
2094− */
2095− for (i = 0; i < record->num_frags; i++)
2096− __skb_frag_ref(&record->frags[i]);
2097− /* lock cleared */
2098− spin_unlock_irqrestore(&tx_ctx->base.lock, flags);
2099−
2100−
21012024 /* if a tls record is finishing in this SKB */
21022025 if (tls_end_offset <= data_len) {
21032026 ret = chcr_end_part_handler(tx_info, skb, record,
@@ -2122,13 +2045,9 @@ static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev) · 18 unmodified lines
21222045 data_len = 0;
21232046 }
21242047
2125− /* clear the frag ref count which increased locally before */
2126− for (i = 0; i < record->num_frags; i++) {
2127− /* clear the frag ref count */
2128− __skb_frag_unref(&record->frags[i]);
2129− }
21302048 /* if any failure, come out from the loop. */
21312049 if (ret) {
2050+ spin_unlock_irqrestore(&tx_ctx->base.lock, flags);
21322051 if (th->fin)
21332052 dev_kfree_skb_any(skb);
21342053
@@ -2143,6 +2062,7 @@ static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev) · 8 unmodified lines
21432062
21442063 } while (data_len > 0);
21452064
2065+ spin_unlock_irqrestore(&tx_ctx->base.lock, flags);
21462066 atomic64_inc(&port_stats->ktls_tx_encrypted_packets);
21472067 atomic64_add(skb_data_len, &port_stats->ktls_tx_encrypted_bytes);
21482068
drivers/net/ethernet/davicom/dm9000.c+22−7
@@ -133,6 +133,8 @@ struct board_info { · 132 unmodified lines
133133 u32 wake_state;
134134
135135 int ip_summed;
136+
137+ struct regulator *power_supply;
136138 };
137139
138140 /* debug code */
@@ -1449,7 +1451,7 @@ dm9000_probe(struct platform_device *pdev) · 1310 unmodified lines
14491451 if (ret) {
14501452 dev_err(dev, "failed to request reset gpio %d: %d\n",
14511453 reset_gpios, ret);
1452− return -ENODEV;
1454+ goto out_regulator_disable;
14531455 }
14541456
14551457 /* According to manual PWRST# Low Period Min 1ms */
@@ -1461,14 +1463,18 @@ dm9000_probe(struct platform_device *pdev) · 5 unmodified lines
14611463
14621464 if (!pdata) {
14631465 pdata = dm9000_parse_dt(&pdev->dev);
1464− if (IS_ERR(pdata))
1465− return PTR_ERR(pdata);
1466+ if (IS_ERR(pdata)) {
1467+ ret = PTR_ERR(pdata);
1468+ goto out_regulator_disable;
1469+ }
14661470 }
14671471
14681472 /* Init network device */
14691473 ndev = alloc_etherdev(sizeof(struct board_info));
1470− if (!ndev)
1471− return -ENOMEM;
1474+ if (!ndev) {
1475+ ret = -ENOMEM;
1476+ goto out_regulator_disable;
1477+ }
14721478
14731479 SET_NETDEV_DEV(ndev, &pdev->dev);
14741480
@@ -1479,6 +1485,8 @@ dm9000_probe(struct platform_device *pdev) · 4 unmodified lines
14791485
14801486 db->dev = &pdev->dev;
14811487 db->ndev = ndev;
1488+ if (!IS_ERR(power))
1489+ db->power_supply = power;
14821490
14831491 spin_lock_init(&db->lock);
14841492 mutex_init(&db->addr_lock);
@@ -1501,7 +1509,7 @@ dm9000_probe(struct platform_device *pdev) · 16 unmodified lines
15011509 goto out;
15021510 }
15031511
1504− db->irq_wake = platform_get_irq(pdev, 1);
1512+ db->irq_wake = platform_get_irq_optional(pdev, 1);
15051513 if (db->irq_wake >= 0) {
15061514 dev_dbg(db->dev, "wakeup irq %d\n", db->irq_wake);
15071515
@@ -1703,6 +1711,10 @@ out: · 195 unmodified lines
17031711 dm9000_release_board(pdev, db);
17041712 free_netdev(ndev);
17051713
1714+out_regulator_disable:
1715+ if (!IS_ERR(power))
1716+ regulator_disable(power);
1717+
17061718 return ret;
17071719 }
17081720
@@ -1760,10 +1772,13 @@ static int · 51 unmodified lines
17601772 dm9000_drv_remove(struct platform_device *pdev)
17611773 {
17621774 struct net_device *ndev = platform_get_drvdata(pdev);
1775+ struct board_info *dm = to_dm9000_board(ndev);
17631776
17641777 unregister_netdev(ndev);
1765− dm9000_release_board(pdev, netdev_priv(ndev));
1778+ dm9000_release_board(pdev, dm);
17661779 free_netdev(ndev); /* free device structure */
1780+ if (dm->power_supply)
1781+ regulator_disable(dm->power_supply);
17671782
17681783 dev_dbg(&pdev->dev, "released and freed device\n");
17691784 return 0;
drivers/net/ethernet/faraday/ftgmac100.c+1−0
@@ -1337,6 +1337,7 @@ static int ftgmac100_poll(struct napi_struct *napi, int budget) · 1336 unmodified lines
13371337 */
13381338 if (unlikely(priv->need_mac_restart)) {
13391339 ftgmac100_start_hw(priv);
1340+ priv->need_mac_restart = false;
13401341
13411342 /* Re-enable "bad" interrupts */
13421343 iowrite32(FTGMAC100_INT_BAD,
drivers/net/ethernet/freescale/enetc/enetc.c+50−43
@@ -281,6 +281,8 @@ static int enetc_poll(struct napi_struct *napi, int budget) · 280 unmodified lines
281281 int work_done;
282282 int i;
283283
284+ enetc_lock_mdio();
285+
284286 for (i = 0; i < v->count_tx_rings; i++)
285287 if (!enetc_clean_tx_ring(&v->tx_ring[i], budget))
286288 complete = false;
@@ -291,8 +293,10 @@ static int enetc_poll(struct napi_struct *napi, int budget) · 4 unmodified lines
291293 if (work_done)
292294 v->rx_napi_work = true;
293295
294− if (!complete)
296+ if (!complete) {
297+ enetc_unlock_mdio();
295298 return budget;
299+ }
296300
297301 napi_complete_done(napi, work_done);
298302
@@ -301,8 +305,6 @@ static int enetc_poll(struct napi_struct *napi, int budget) · 2 unmodified lines
301305
302306 v->rx_napi_work = false;
303307
304− enetc_lock_mdio();
305−
306308 /* enable interrupts */
307309 enetc_wr_reg_hot(v->rbier, ENETC_RBIER_RXTIE);
308310
@@ -327,8 +329,8 @@ static void enetc_get_tx_tstamp(struct enetc_hw *hw, union enetc_tx_bd *txbd, · 18 unmodified lines
327329 {
328330 u32 lo, hi, tstamp_lo;
329331
330− lo = enetc_rd(hw, ENETC_SICTR0);
331− hi = enetc_rd(hw, ENETC_SICTR1);
332+ lo = enetc_rd_hot(hw, ENETC_SICTR0);
333+ hi = enetc_rd_hot(hw, ENETC_SICTR1);
332334 tstamp_lo = le32_to_cpu(txbd->wb.tstamp);
333335 if (lo <= tstamp_lo)
334336 hi -= 1;
@@ -342,6 +344,12 @@ static void enetc_tstamp_tx(struct sk_buff *skb, u64 tstamp) · 7 unmodified lines
342344 if (skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS) {
343345 memset(&shhwtstamps, 0, sizeof(shhwtstamps));
344346 shhwtstamps.hwtstamp = ns_to_ktime(tstamp);
347+ /* Ensure skb_mstamp_ns, which might have been populated with
348+ * the txtime, is not mistaken for a software timestamp,
349+ * because this will prevent the dispatch of our hardware
350+ * timestamp to the socket.
351+ */
352+ skb->tstamp = ktime_set(0, 0);
345353 skb_tstamp_tx(skb, &shhwtstamps);
346354 }
347355 }
@@ -358,9 +366,7 @@ static bool enetc_clean_tx_ring(struct enetc_bdr *tx_ring, int napi_budget) · 10 unmodified lines
358366 i = tx_ring->next_to_clean;
359367 tx_swbd = &tx_ring->tx_swbd[i];
360368
361− enetc_lock_mdio();
362369 bds_to_clean = enetc_bd_ready_count(tx_ring, i);
363− enetc_unlock_mdio();
364370
365371 do_tstamp = false;
366372
@@ -403,8 +409,6 @@ static bool enetc_clean_tx_ring(struct enetc_bdr *tx_ring, int napi_budget) · 36 unmodified lines
403409 tx_swbd = tx_ring->tx_swbd;
404410 }
405411
406− enetc_lock_mdio();
407−
408412 /* BD iteration loop end */
409413 if (is_eof) {
410414 tx_frm_cnt++;
@@ -415,8 +419,6 @@ static bool enetc_clean_tx_ring(struct enetc_bdr *tx_ring, int napi_budget) · 4 unmodified lines
415419

189 more lines aren’t shown here.

drivers/net/ethernet/freescale/enetc/enetc.h+5−0

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

drivers/net/ethernet/freescale/enetc/enetc_hw.h+17−3

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

drivers/net/ethernet/freescale/enetc/enetc_pf.c+87−17

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

drivers/net/ethernet/freescale/enetc/enetc_vf.c+7−0

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

drivers/net/ethernet/freescale/fec_ptp.c+7−0

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

drivers/net/ethernet/freescale/gianfar.c+20−1

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

drivers/net/ethernet/hisilicon/hns/hns_enet.c+3−1

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

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h+3−3

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

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c+7−9

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

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

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

drivers/net/ethernet/ibm/ibmveth.c+1−3

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

drivers/net/ethernet/ibm/ibmvnic.c+17−30

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

drivers/net/ethernet/intel/e1000e/82571.c+2−0

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

drivers/net/ethernet/intel/e1000e/hw.h+3−3

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

drivers/net/ethernet/intel/e1000e/netdev.c+5−1

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

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

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

drivers/net/ethernet/intel/i40e/i40e_debugfs.c+3−0

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

drivers/net/ethernet/intel/i40e/i40e_ethtool.c+48−7

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

drivers/net/ethernet/intel/i40e/i40e_main.c+35−14

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

drivers/net/ethernet/intel/i40e/i40e_txrx.c+5−19

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

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c+9−0

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

drivers/net/ethernet/intel/i40e/i40e_xsk.c+2−2

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

drivers/net/ethernet/intel/iavf/iavf_main.c+2−1

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

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

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

drivers/net/ethernet/intel/ice/ice_base.c+22−2

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

drivers/net/ethernet/intel/ice/ice_common.c+1−1

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

drivers/net/ethernet/intel/ice/ice_controlq.h+2−2

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

drivers/net/ethernet/intel/ice/ice_dcb.c+30−10

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

drivers/net/ethernet/intel/ice/ice_dcb_nl.c+0−2

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

drivers/net/ethernet/intel/ice/ice_ethtool.c+2−2

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

drivers/net/ethernet/intel/ice/ice_lib.c+2−3

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

drivers/net/ethernet/intel/ice/ice_main.c+39−14

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

drivers/net/ethernet/intel/ice/ice_switch.c+9−6

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

drivers/net/ethernet/intel/ice/ice_txrx.c+0−17

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

drivers/net/ethernet/intel/ice/ice_type.h+1−0

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

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

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

drivers/net/ethernet/intel/igb/e1000_hw.h+3−3

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

drivers/net/ethernet/intel/igb/igb.h+2−2

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

drivers/net/ethernet/intel/igb/igb_main.c+21−12

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

drivers/net/ethernet/intel/igb/igb_ptp.c+24−7

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

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

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

drivers/net/ethernet/intel/igc/igc_ethtool.c+4−3

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

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

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

drivers/net/ethernet/intel/igc/igc_ptp.c+40−32

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

drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c+5−0

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

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c+19−4

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

drivers/net/ethernet/intel/ixgbevf/ipsec.c+5−0

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

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

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

drivers/net/ethernet/marvell/mv643xx_eth.c+1−1

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

drivers/net/ethernet/marvell/octeontx2/af/cgx.c+3−1

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

drivers/net/ethernet/marvell/octeontx2/af/npc_profile.h+0−2

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

drivers/net/ethernet/marvell/octeontx2/af/rvu.c+4−2

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

drivers/net/ethernet/marvell/octeontx2/af/rvu.h+1−0

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

drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c+16−2

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

drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c+36−21

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

drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c+1−1

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

drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c+1−1

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

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

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

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

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

drivers/net/ethernet/marvell/pxa168_eth.c+1−1

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

drivers/net/ethernet/mediatek/mtk_star_emac.c+3−2

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

drivers/net/ethernet/mellanox/mlx4/en_ethtool.c+1−1

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

drivers/net/ethernet/mellanox/mlx4/en_netdev.c+2−0

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

drivers/net/ethernet/mellanox/mlx4/mlx4_en.h+1−0

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

drivers/net/ethernet/mellanox/mlx5/core/dev.c+2−2

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

drivers/net/ethernet/mellanox/mlx5/core/devlink.c+5−0

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

drivers/net/ethernet/mellanox/mlx5/core/en.h+5−3

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

drivers/net/ethernet/mellanox/mlx5/core/en/port.c+4−19

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

drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c+31−8

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

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

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

drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h+10−0

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

drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c+11−15

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

drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_geneve.c+33−0

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

drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_gre.c+1−0

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

drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_mplsoudp.c+1−0

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

drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c+1−0

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

drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h+6−0

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

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c+19−21

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

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

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

drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h+3−0

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

drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_stats.c+30−19

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

drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c+21−12

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

drivers/net/ethernet/mellanox/mlx5/core/en_main.c+77−25

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

drivers/net/ethernet/mellanox/mlx5/core/en_rep.c+3−2

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

drivers/net/ethernet/mellanox/mlx5/core/en_rx.c+2−2

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

drivers/net/ethernet/mellanox/mlx5/core/en_stats.c+0−10

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

drivers/net/ethernet/mellanox/mlx5/core/en_stats.h+0−6

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

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c+48−12

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

drivers/net/ethernet/mellanox/mlx5/core/en_tc.h+1−0

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

drivers/net/ethernet/mellanox/mlx5/core/eq.c+12−1

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

drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.c+5−5

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

drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c+39−28

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

drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c+1−0

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

drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c+3−1

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

drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c+4−4

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

drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.c+1−3

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

drivers/net/ethernet/mellanox/mlx5/core/sf/hw_table.c+4−6

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

drivers/net/ethernet/mellanox/mlx5/core/sf/mlx5_ifc_vhca_event.h+1−1

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

drivers/net/ethernet/mellanox/mlx5/core/sf/vhca_event.c+11−12

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

drivers/net/ethernet/mellanox/mlx5/core/sf/vhca_event.h+3−4

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

drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c+1−0

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

drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v1.c+2−2

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

drivers/net/ethernet/mellanox/mlxsw/reg.h+1−0

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

drivers/net/ethernet/mellanox/mlxsw/spectrum.h+15−0

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

drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c+19−5

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

drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c+3−4

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

drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c+3−4

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

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

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

drivers/net/ethernet/mellanox/mlxsw/switchx2.c+2−1

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

drivers/net/ethernet/microchip/lan743x_main.c+4−4

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

drivers/net/ethernet/mscc/Kconfig+1−0

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

drivers/net/ethernet/mscc/ocelot_flower.c+2−1

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

drivers/net/ethernet/myricom/myri10ge/myri10ge.c+1−1

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

drivers/net/ethernet/netronome/nfp/bpf/cmsg.c+1−0

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

drivers/net/ethernet/netronome/nfp/flower/main.h+8−0

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

drivers/net/ethernet/netronome/nfp/flower/metadata.c+32−8

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

drivers/net/ethernet/netronome/nfp/flower/offload.c+64−2

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

drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c+13−2

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

drivers/net/ethernet/pensando/ionic/ionic_txrx.c+7−6

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

drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c+3−0

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

drivers/net/ethernet/realtek/r8169_main.c+12−5

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

drivers/net/ethernet/renesas/sh_eth.c+7−0

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

drivers/net/ethernet/socionext/netsec.c+6−3

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

drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c+45−14

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

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

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

drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c+49−10

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

drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c+18−1

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

drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c+0−4

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

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

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

drivers/net/ethernet/stmicro/stmmac/enh_desc.c+6−3

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

drivers/net/ethernet/stmicro/stmmac/hwif.h+3−2

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

drivers/net/ethernet/stmicro/stmmac/norm_desc.c+6−3

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

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c+52−24

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

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

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

drivers/net/ethernet/tehuti/tehuti.c+1−0

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

drivers/net/ethernet/xilinx/xilinx_axienet.h+12−0

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

drivers/net/ethernet/xilinx/xilinx_axienet_main.c+31−18

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

drivers/net/geneve.c+26−4

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

drivers/net/hamradio/6pack.c+0−5

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

drivers/net/hamradio/scc.c+0−1

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

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

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

drivers/net/hyperv/netvsc_drv.c+9−4

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

drivers/net/hyperv/rndis_filter.c+1−1

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

drivers/net/ieee802154/atusb.c+1−0

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

drivers/net/ipa/ipa_cmd.c+33−17

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

drivers/net/ipa/ipa_qmi.c+2−0

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

drivers/net/netdevsim/netdev.c+1−0

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

drivers/net/phy/bcm-phy-lib.c+10−3

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

drivers/net/phy/broadcom.c+9−0

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

drivers/net/phy/dp83822.c+5−4

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

drivers/net/phy/dp83tc811.c+6−5

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

drivers/net/phy/marvell.c+29−3

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

drivers/net/phy/phy.c+4−2

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

drivers/net/phy/phy_device.c+2−4

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

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

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

drivers/net/tun.c+48−0

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

drivers/net/usb/cdc-phonet.c+2−0

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

drivers/net/usb/cdc_ncm.c+5−5

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

drivers/net/usb/hso.c+12−21

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

drivers/net/usb/qmi_wwan.c+0−14

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

drivers/net/usb/r8152.c+10−30

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

drivers/net/usb/usbnet.c+1−1

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

drivers/net/veth.c+1−2

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

drivers/net/virtio_net.c+7−3

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

drivers/net/vrf.c+4−6

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

drivers/net/vxlan.c+14−4

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

drivers/net/wan/fsl_ucc_hdlc.c+6−2

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

drivers/net/wan/hdlc_fr.c+3−2

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

drivers/net/wan/hdlc_x25.c+41−1

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

drivers/net/wan/lapbether.c+0−3

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

drivers/net/wireless/admtek/adm8211.c+0−1

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

drivers/net/wireless/ath/ath11k/mac.c+2−2

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

drivers/net/wireless/ath/ath11k/qmi.c+2−2

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

drivers/net/wireless/ath/ath5k/base.c+0−1

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

drivers/net/wireless/ath/ath9k/ath9k.h+2−1

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

drivers/net/wireless/ath/ath9k/hw.c+0−1

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

drivers/net/wireless/ath/ath9k/init.c+0−1

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

drivers/net/wireless/ath/ath9k/xmit.c+6−0

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

drivers/net/wireless/atmel/atmel.c+0−1

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

drivers/net/wireless/atmel/atmel_cs.c+0−1

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

drivers/net/wireless/atmel/atmel_pci.c+0−1

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

drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c+1−1

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

drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c+0−1

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

drivers/net/wireless/broadcom/brcm80211/brcmutil/utils.c+0−1

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

drivers/net/wireless/cisco/airo.c+0−1

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

drivers/net/wireless/cisco/airo_cs.c+0−1

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

drivers/net/wireless/intel/iwlwifi/fw/notif-wait.c+5−5

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

drivers/net/wireless/intel/iwlwifi/fw/pnvm.c+2−2

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

drivers/net/wireless/intel/iwlwifi/iwl-config.h+1−0

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

drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c+1−1

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

drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h+2−0

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

drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c+5−2

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

drivers/net/wireless/intel/iwlwifi/mvm/fw.c+1−0

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

drivers/net/wireless/intel/iwlwifi/mvm/rfi.c+3−3

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

drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c+12−5

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

drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c+1−30

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

drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c+1−2

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

drivers/net/wireless/intel/iwlwifi/pcie/drv.c+28−2

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

drivers/net/wireless/intel/iwlwifi/pcie/rx.c+2−1

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

drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c+35−0

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

drivers/net/wireless/intel/iwlwifi/pcie/tx.c+4−3

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

drivers/net/wireless/intersil/hostap/hostap_cs.c+0−1

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

drivers/net/wireless/intersil/hostap/hostap_pci.c+0−1

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

drivers/net/wireless/intersil/hostap/hostap_plx.c+0−1

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

drivers/net/wireless/mediatek/mt76/dma.c+13−13

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

drivers/net/wireless/mediatek/mt76/mt7915/mac.c+5−5

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

drivers/net/wireless/mediatek/mt76/mt7915/testmode.c+2−2

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

drivers/net/wireless/mediatek/mt76/mt7921/mcu.c+1−3

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

drivers/net/wireless/mediatek/mt76/mt7921/regs.h+2−2

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

drivers/net/wireless/ralink/rt2x00/rt2400pci.c+0−1

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

drivers/net/wireless/ralink/rt2x00/rt2500pci.c+0−1

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

drivers/net/wireless/ralink/rt2x00/rt2500usb.c+0−1

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

drivers/net/wireless/ralink/rt2x00/rt2800pci.c+0−1

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

drivers/net/wireless/ralink/rt2x00/rt2800usb.c+0−1

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

drivers/net/wireless/ralink/rt2x00/rt61pci.c+0−2

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

drivers/net/wireless/ralink/rt2x00/rt73usb.c+0−1

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

drivers/net/wireless/rsi/rsi_91x_main.c+0−1

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

drivers/net/wireless/rsi/rsi_91x_sdio.c+0−1

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

drivers/net/wireless/rsi/rsi_91x_usb.c+0−1

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

drivers/net/wireless/virt_wifi.c+3−2

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

drivers/net/xen-netback/netback.c+2−2

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

drivers/net/xen-netback/xenbus.c+8−4

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

drivers/nvdimm/bus.c+6−8

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

drivers/nvdimm/pmem.c+33−4

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

drivers/nvdimm/region_devs.c+14−2

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

drivers/nvme/host/core.c+32−47

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

drivers/nvme/host/fabrics.h+7−0

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

drivers/nvme/host/fc.c+5−4

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

drivers/nvme/host/pci.c+1−0

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

drivers/nvme/host/rdma.c+7−4

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

drivers/nvme/host/tcp.c+15−5

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

drivers/nvme/host/zns.c+7−2

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

drivers/nvme/target/core.c+14−3

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

drivers/nvme/target/loop.c+2−2

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

drivers/nvme/target/passthru.c+3−3

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

drivers/nvme/target/rdma.c+2−3

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

drivers/nvme/target/tcp.c+1−1

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

drivers/of/fdt.c+23−13

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

drivers/of/of_private.h+2−0

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

drivers/of/overlay.c+15−9

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

drivers/of/property.c+10−1

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

drivers/of/unittest.c+16−6

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

drivers/opp/core.c+25−23

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

drivers/opp/opp.h+2−0

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

drivers/parport/parport_amiga.c+0−1

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

drivers/parport/parport_atari.c+0−1

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

drivers/parport/parport_gsc.c+0−1

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

drivers/parport/parport_mfc3.c+0−1

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

drivers/parport/parport_sunbpp.c+0−1

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

drivers/pci/hotplug/rpadlpar_sysfs.c+6−8

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

drivers/pci/hotplug/s390_pci_hpc.c+2−1

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

drivers/pci/xen-pcifront.c+2−2

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

drivers/perf/arm_dmc620_pmu.c+1−0

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

drivers/pinctrl/intel/pinctrl-intel.c+8−1

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

drivers/pinctrl/pinctrl-microchip-sgpio.c+1−1

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

drivers/pinctrl/pinctrl-rockchip.c+8−5

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

drivers/pinctrl/qcom/pinctrl-lpass-lpi.c+1−1

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

drivers/pinctrl/qcom/pinctrl-sc7280.c+8−8

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

drivers/pinctrl/qcom/pinctrl-sdx55.c+1−1

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

drivers/platform/x86/Kconfig+8−3

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

drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c+3−0

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

drivers/platform/x86/dell/dell-wmi-sysman/int-attributes.c+3−0

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

drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c+3−0

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

drivers/platform/x86/dell/dell-wmi-sysman/string-attributes.c+3−0

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

drivers/platform/x86/dell/dell-wmi-sysman/sysman.c+32−52

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

drivers/platform/x86/intel-hid.c+16−7

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

drivers/platform/x86/intel-vbtn.c+10−2

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

drivers/platform/x86/intel_pmc_core.c+35−15

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

drivers/platform/x86/intel_pmt_class.c+1−1

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

drivers/platform/x86/intel_pmt_crashlog.c+6−7

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

drivers/platform/x86/thinkpad_acpi.c+79−29

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

drivers/ptp/ptp_qoriq.c+7−6

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

drivers/ras/cec.c+12−3

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

drivers/regulator/bd9571mwv-regulator.c+4−4

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

drivers/regulator/mt6315-regulator.c+2−2

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

drivers/regulator/pca9450-regulator.c+9−1

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

drivers/regulator/qcom-rpmh-regulator.c+3−3

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

drivers/regulator/rt4831-regulator.c+2−2

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

drivers/remoteproc/pru_rproc.c+19−1

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

drivers/remoteproc/qcom_pil_info.c+1−1

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

drivers/s390/block/dasd.c+3−4

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

drivers/s390/char/tty3270.c+4−2

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

drivers/s390/char/zcore.c+27−17

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

drivers/s390/cio/device_fsm.c+1−1

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

drivers/s390/cio/vfio_ccw_ops.c+3−3

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

drivers/s390/crypto/vfio_ap_ops.c+1−1

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

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

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

drivers/s390/net/qeth_core_main.c+60−68

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

drivers/sbus/char/display7seg.c+0−1

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

drivers/scsi/hpsa.c+0−1

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

drivers/scsi/hpsa_cmd.h+45−33

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

drivers/scsi/ibmvscsi/ibmvfc.c+93−41

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

drivers/scsi/ibmvscsi/ibmvscsi.c+1−3

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

drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c+1−3

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

drivers/scsi/libiscsi.c+3−23

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

drivers/scsi/libsas/sas_ata.c+4−5

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

drivers/scsi/lpfc/lpfc_debugfs.c+2−2

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

drivers/scsi/mpt3sas/mpt3sas_base.c+6−2

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

drivers/scsi/mpt3sas/mpt3sas_scsih.c+1−1

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

drivers/scsi/myrs.c+1−1

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

drivers/scsi/pcmcia/nsp_cs.c+0−1

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

drivers/scsi/pm8001/pm8001_hwi.c+4−4

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

drivers/scsi/qedi/qedi_main.c+1−0

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

drivers/scsi/qla2xxx/qla_target.c+5−8

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

drivers/scsi/qla2xxx/qla_target.h+1−1

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

drivers/scsi/qla2xxx/tcm_qla2xxx.c+0−4

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

drivers/scsi/scsi_transport_iscsi.c+26−2

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

drivers/scsi/scsi_transport_srp.c+1−1

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

drivers/scsi/sd_zbc.c+11−8

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

drivers/scsi/smartpqi/smartpqi_init.c+0−1

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

drivers/scsi/st.c+1−1

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

drivers/scsi/ufs/ufs-mediatek.c+1−1

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

drivers/scsi/ufs/ufs-qcom.c+10−0

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

drivers/scsi/ufs/ufshcd.c+27−45

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

drivers/scsi/vmw_pvscsi.c+0−2

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

drivers/scsi/vmw_pvscsi.h+0−2

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

drivers/sh/maple/maple.c+0−1

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

drivers/soc/fsl/qbman/qman.c+1−1

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

drivers/soc/litex/litex_soc_ctrl.c+0−1

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

drivers/soc/qcom/qcom-geni-se.c+3−74

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

drivers/soc/ti/omap_prm.c+6−2

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

drivers/spi/spi-cadence-quadspi.c+1−0

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

drivers/staging/comedi/drivers/addi_apci_1032.c+3−1

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

drivers/staging/comedi/drivers/addi_apci_1500.c+9−9

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

drivers/staging/comedi/drivers/adv_pci1710.c+5−5

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

drivers/staging/comedi/drivers/amplc_pc236_common.c+3−1

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

drivers/staging/comedi/drivers/cb_pcidas.c+1−1

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

drivers/staging/comedi/drivers/cb_pcidas64.c+1−1

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

drivers/staging/comedi/drivers/comedi_parport.c+2−1

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

drivers/staging/comedi/drivers/das6402.c+1−1

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

drivers/staging/comedi/drivers/das800.c+1−1

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

drivers/staging/comedi/drivers/dmm32at.c+1−1

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

drivers/staging/comedi/drivers/me4000.c+1−1

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

drivers/staging/comedi/drivers/ni_6527.c+3−1

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

drivers/staging/comedi/drivers/ni_65xx.c+2−1

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

drivers/staging/comedi/drivers/pcl711.c+1−1

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

drivers/staging/comedi/drivers/pcl726.c+3−1

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

drivers/staging/comedi/drivers/pcl818.c+1−1

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

drivers/staging/comedi/drivers/vmk80xx.c+0−1

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

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

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

drivers/staging/rtl8188eu/core/rtw_ap.c+5−0

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

drivers/staging/rtl8188eu/os_dep/ioctl_linux.c+4−2

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

drivers/staging/rtl8192e/Kconfig+1−0

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

drivers/staging/rtl8192e/rtl8192e/rtl_wx.c+4−3

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

drivers/staging/rtl8192e/rtllib.h+1−1

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

drivers/staging/rtl8192e/rtllib_rx.c+1−1

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

drivers/staging/rtl8192u/r8192U_wx.c+4−2

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

drivers/staging/rtl8712/rtl871x_cmd.c+4−2

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

drivers/staging/rtl8712/rtl871x_ioctl_linux.c+1−1

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

drivers/staging/vt6655/rxtx.h+2−2

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

drivers/staging/wfx/bh.c+1−0

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

drivers/staging/wfx/bh.h+4−0

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

drivers/staging/wfx/bus.h+3−0

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

drivers/staging/wfx/bus_sdio.c+6−0

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

drivers/staging/wfx/bus_spi.c+7−0

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

drivers/staging/wfx/data_rx.c+5−0

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

drivers/staging/wfx/data_tx.c+5−0

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

drivers/staging/wfx/data_tx.h+3−0

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

drivers/staging/wfx/debug.c+6−0

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

drivers/staging/wfx/fwio.c+2−0

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

drivers/staging/wfx/hif_api_cmd.h+4−0

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

drivers/staging/wfx/hif_api_general.h+9−0

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

drivers/staging/wfx/hif_tx.c+4−0

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

drivers/staging/wfx/hif_tx_mib.c+5−0

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

drivers/staging/wfx/hwio.c+3−0

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

drivers/staging/wfx/hwio.h+2−0

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

drivers/staging/wfx/key.c+2−0

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

drivers/staging/wfx/key.h+2−0

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

drivers/staging/wfx/main.c+7−0

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

drivers/staging/wfx/main.h+3−0

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

drivers/staging/wfx/queue.c+4−0

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

drivers/staging/wfx/queue.h+3−0

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

drivers/staging/wfx/scan.h+2−0

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

drivers/staging/wfx/sta.c+6−0

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

drivers/staging/wfx/sta.h+2−0

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

drivers/staging/wfx/traces.h+3−0

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

drivers/staging/wfx/wfx.h+3−0

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

drivers/target/iscsi/iscsi_target.c+1−2

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

drivers/target/target_core_pscsi.c+8−1

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

drivers/tee/optee/core.c+0−1

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

drivers/thermal/thermal_sysfs.c+3−0

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

drivers/thunderbolt/retimer.c+2−2

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

drivers/thunderbolt/switch.c+8−10

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

drivers/thunderbolt/tb.c+4−0

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

drivers/tty/hvc/hvcs.c+1−3

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

drivers/tty/pty.c+2−13

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

drivers/tty/serial/icom.c+0−2

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

drivers/tty/serial/jsm/jsm_driver.c+0−1

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

drivers/tty/serial/max310x.c+5−24

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

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

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

drivers/tty/tty_io.c+2−3

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

drivers/usb/cdns3/cdnsp-gadget.c+4−0

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

drivers/usb/cdns3/cdnsp-ring.c+4−1

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

drivers/usb/class/cdc-acm.c+75−50

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

drivers/usb/class/usblp.c+12−4

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

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

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

drivers/usb/core/usb.c+32−0

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

drivers/usb/dwc2/hcd.c+3−2

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

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

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

drivers/usb/dwc3/dwc3-qcom.c+16−5

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

drivers/usb/dwc3/gadget.c+11−11

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

drivers/usb/gadget/configfs.c+10−4

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

drivers/usb/gadget/function/f_uac1.c+1−0

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

drivers/usb/gadget/function/f_uac2.c+1−1

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

drivers/usb/gadget/function/u_ether_configfs.h+2−3

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

drivers/usb/gadget/udc/amd5536udc_pci.c+5−5

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

drivers/usb/gadget/udc/s3c2410_udc.c+2−2

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

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

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

drivers/usb/host/xhci-pci.c+11−2

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

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

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

drivers/usb/host/xhci.c+43−35

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

drivers/usb/host/xhci.h+1−0

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

drivers/usb/misc/ldusb.c+0−1

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

drivers/usb/musb/musb_core.c+8−4

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

drivers/usb/renesas_usbhs/pipe.c+2−0

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

drivers/usb/serial/ch341.c+1−0

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

drivers/usb/serial/cp210x.c+3−0

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

drivers/usb/serial/io_edgeport.c+16−10

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

drivers/usb/serial/xr_serial.c+0−25

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

drivers/usb/storage/transport.c+7−0

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

drivers/usb/storage/unusual_devs.h+12−0

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

drivers/usb/typec/tcpm/tcpm.c+9−2

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

drivers/usb/typec/tps6598x.c+0−1

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

drivers/usb/usbip/stub_dev.c+42−7

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

drivers/usb/usbip/usbip_common.h+3−0

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

drivers/usb/usbip/usbip_event.c+2−0

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

drivers/usb/usbip/vhci_hcd.c+3−0

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

drivers/usb/usbip/vhci_sysfs.c+56−7

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

drivers/usb/usbip/vudc_dev.c+1−0

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

drivers/usb/usbip/vudc_sysfs.c+47−7

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

drivers/vdpa/ifcvf/ifcvf_main.c+2−3

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

drivers/vdpa/mlx5/core/mlx5_vdpa.h+4−0

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

drivers/vdpa/mlx5/core/mr.c+7−2

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

drivers/vdpa/mlx5/core/resources.c+2−1

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

drivers/vdpa/mlx5/net/mlx5_vnet.c+26−18

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

drivers/vdpa/vdpa.c+10−8

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

drivers/vdpa/vdpa_sim/vdpa_sim.c+1−1

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

drivers/vdpa/vdpa_sim/vdpa_sim_net.c+2−3

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

drivers/vfio/Kconfig+2−2

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

drivers/vfio/pci/Kconfig+1−1

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

drivers/vfio/pci/vfio_pci.c+3−1

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

drivers/vfio/platform/Kconfig+2−2

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

drivers/vfio/vfio_iommu_type1.c+18−8

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

drivers/vhost/vdpa.c+11−9

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

drivers/vhost/vhost.c+1−1

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

drivers/video/fbdev/aty/atyfb.h+0−3

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

drivers/video/fbdev/aty/atyfb_base.c+5−4

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

drivers/video/fbdev/core/fbcon.c+3−0

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

drivers/video/fbdev/hyperv_fb.c+0−3

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

drivers/virt/acrn/hsm.c+10−1

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

drivers/virt/acrn/irqfd.c+3−3

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

drivers/virtio/virtio.c+2−4

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

drivers/virtio/virtio_mmio.c+1−2

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

drivers/watchdog/armada_37xx_wdt.c+2−2

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

drivers/watchdog/cpu5wdt.c+0−1

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

drivers/watchdog/cpwd.c+0−1

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

drivers/watchdog/riowd.c+0−1

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

drivers/xen/Kconfig+2−2

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

drivers/xen/events/events_2l.c+15−7

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

drivers/xen/events/events_base.c+100−30

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

drivers/xen/events/events_fifo.c+0−7

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

drivers/xen/events/events_internal.h+8−6

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

drivers/xen/gntdev.c+33−21

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

fs/Kconfig+1−1

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

fs/afs/dir.c+0−1

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

fs/afs/file.c+0−1

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

fs/afs/fs_operation.c+5−2

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

fs/afs/inode.c+0−1

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

fs/afs/internal.h+0−1

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

fs/afs/mntpt.c+0−1

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

fs/afs/write.c+1−2

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

fs/afs/xattr.c+7−24

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

fs/binfmt_misc.c+14−15

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

fs/block_dev.c+19−6

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

fs/btrfs/Makefile+6−4

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

fs/btrfs/ctree.c+2−0

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

fs/btrfs/dev-replace.c+3−0

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

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

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

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

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

fs/btrfs/extent_io.c+32−3

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

fs/btrfs/inode.c+35−20

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

fs/btrfs/qgroup.c+10−2

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

fs/btrfs/reada.c+18−17

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

fs/btrfs/scrub.c+1−1

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

fs/btrfs/tree-log.c+4−4

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

fs/btrfs/volumes.c+3−0

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

fs/btrfs/zoned.c+42−11

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

fs/cachefiles/bind.c+6−0

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

fs/cachefiles/rdwr.c+3−4

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

fs/cifs/Kconfig+1−2

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

fs/cifs/Makefile+3−2

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

fs/cifs/cifs_debug.c+1−1

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

fs/cifs/cifs_swn.c+1−1

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

fs/cifs/cifsacl.c+5−3

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

fs/cifs/cifsfs.c+3−2

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

fs/cifs/cifsglob.h+12−13

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

fs/cifs/cifspdu.h+5−0

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

fs/cifs/connect.c+23−8

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

fs/cifs/file.c+1−0

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

fs/cifs/fs_context.c+4−2

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

fs/cifs/inode.c+9−1

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

fs/cifs/sess.c+1−0

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

fs/cifs/smb2glob.h+1−0

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

fs/cifs/smb2inode.c+1−0

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

fs/cifs/smb2misc.c+7−7

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

fs/cifs/smb2ops.c+25−12

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

fs/cifs/smb2pdu.c+2−4

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

fs/cifs/smb2proto.h+1−2

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

fs/cifs/smb2transport.c+28−9

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

fs/cifs/transport.c+8−3

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

fs/configfs/file.c+2−4

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

fs/crypto/bio.c+3−3

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

fs/direct-io.c+3−2

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

fs/erofs/data.c+11−17

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

fs/erofs/zdata.c+1−1

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

fs/ext4/balloc.c+26−12

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

fs/ext4/ext4.h+3−0

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

fs/ext4/extents.c+1−1

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

fs/ext4/fast_commit.c+7−2

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

fs/ext4/inode.c+10−8

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

fs/ext4/mballoc.c+9−2

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

fs/ext4/namei.c+39−11

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

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

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

fs/ext4/super.c+6−1

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

fs/ext4/sysfs.c+7−0

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

fs/ext4/verity.c+55−34

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

fs/ext4/xattr.c+5−1

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

fs/f2fs/checkpoint.c+1−1

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

fs/f2fs/data.c+2−2

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

fs/f2fs/segment.c+1−1

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

fs/f2fs/segment.h+2−2

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

fs/f2fs/super.c+2−2

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

fs/file.c+17−4

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

fs/fuse/dev.c+16−10

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

fs/fuse/fuse_i.h+1−0

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

fs/fuse/virtio_fs.c+8−1

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

fs/gfs2/log.c+5−1

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

fs/gfs2/lops.c+1−1

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

fs/gfs2/ops_fstype.c+1−3

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

fs/gfs2/super.c+11−13

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

fs/gfs2/super.h+1−1

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

fs/gfs2/trans.c+2−0

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

fs/gfs2/util.c+11−6

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

fs/hostfs/hostfs_kern.c+3−4

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

fs/io-wq.c+47−26

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

fs/io-wq.h+10−2

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

fs/io_uring.c+636−484

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

fs/iomap/buffered-io.c+2−2

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

fs/iomap/direct-io.c+2−2

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

fs/iomap/swapfile.c+10−0

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

fs/locks.c+0−3

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

fs/mpage.c+1−1

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

fs/namei.c+8−6

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

fs/nfs/Kconfig+1−1

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

fs/nfs/dir.c+33−25

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

fs/nfs/inode.c+4−3

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

fs/nfs/internal.h+2−1

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

fs/nfs/nfs3xdr.c+2−1

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

fs/nfs/nfs42proc.c+7−5

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

fs/nfs/nfs4proc.c+16−17

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

fs/nfs/unlink.c+3−3

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

fs/nfs/write.c+4−4

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

fs/nfsd/Kconfig+1−0

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

fs/nfsd/filecache.c+2−0

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

fs/nfsd/nfs4callback.c+1−0

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

fs/nfsd/nfs4proc.c+1−1

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

fs/nfsd/nfs4state.c+15−40

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

fs/nilfs2/segbuf.c+1−1

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

fs/ocfs2/aops.c+1−10

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

fs/ocfs2/file.c+6−2

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

fs/pnode.h+1−1

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

fs/proc/task_mmu.c+0−2

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

fs/readdir.c+6−0

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

fs/reiserfs/xattr.h+1−1

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

fs/select.c+4−6

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

fs/squashfs/block.c+1−1

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

fs/squashfs/export.c+6−2

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

fs/squashfs/id.c+4−2

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

fs/squashfs/squashfs_fs.h+1−0

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

fs/squashfs/xattr_id.c+4−2

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

fs/xfs/xfs_inode.c+8−6

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

fs/xfs/xfs_itable.c+6−0

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

fs/xfs/xfs_mount.c+44−46

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

fs/xfs/xfs_symlink.c+2−1

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

fs/zonefs/super.c+88−15

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

include/acpi/acpi_bus.h+1−0

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

include/drm/ttm/ttm_bo_api.h+4−2

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

include/dt-bindings/bus/moxtet.h+1−1

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

include/kvm/arm_pmu.h+7−2

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

include/linux/acpi.h+16−3

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

include/linux/amba/bus.h+11−0

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

include/linux/armada-37xx-rwtm-mailbox.h+1−1

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

include/linux/atmdev.h+1−1

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

include/linux/avf/virtchnl.h+0−2

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

include/linux/bio.h+2−2

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

include/linux/blkdev.h+0−2

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

include/linux/bpf.h+27−8

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

include/linux/can/skb.h+6−2

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

include/linux/compiler-clang.h+6−0

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

include/linux/compiler-version.h+14−0

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

include/linux/cpu.h+3−0

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

include/linux/device-mapper.h+14−1

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

include/linux/efi.h+4−2

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

include/linux/ethtool.h+16−6

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

include/linux/extcon.h+23−0

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

include/linux/firmware/intel/stratix10-svc-client.h+1−1

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

include/linux/gpio/consumer.h+2−0

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

include/linux/host1x.h+8−1

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

include/linux/hugetlb_cgroup.h+13−2

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

include/linux/if_macvlan.h+2−1

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

include/linux/io_uring.h+0−25

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

include/linux/irqdomain.h+0−4

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

include/linux/kasan.h+1−1

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

include/linux/kconfig.h+0−2

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

include/linux/marvell_phy.h+3−2

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

include/linux/memblock.h+2−2

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

include/linux/memcontrol.h+2−4

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

include/linux/mlx5/mlx5_ifc.h+6−4

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

include/linux/mlx5/qp.h+7−0

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

include/linux/mm.h+36−3

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

include/linux/mm_types.h+1−0

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

include/linux/mmu_notifier.h+5−5

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

include/linux/module.h+0−3

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

include/linux/moxtet.h+1−1

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

include/linux/mutex.h+1−1

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

include/linux/nd.h+1−0

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

include/linux/netdevice.h+2−2

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

include/linux/netfilter/x_tables.h+2−5

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

include/linux/netfilter_arp/arp_tables.h+3−2

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

include/linux/netfilter_bridge/ebtables.h+3−2

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

include/linux/pagemap.h+1−1

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

include/linux/perf_event.h+2−0

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

include/linux/pgtable.h+4−0

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

include/linux/property.h+1−1

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

include/linux/qcom-geni-se.h+0−2

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

include/linux/regulator/pca9450.h+3−0

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

include/linux/restart_block.h+1−0

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

include/linux/sched/mm.h+2−1

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

include/linux/seqlock.h+1−4

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

include/linux/skbuff.h+1−0

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

include/linux/skmsg.h+6−1

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

include/linux/stop_machine.h+6−5

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

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

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

include/linux/textsearch.h+1−1

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

include/linux/thread_info.h+13−0

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

include/linux/u64_stats_sync.h+4−3

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

include/linux/usb.h+2−0

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

include/linux/usb_usual.h+2−0

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

include/linux/usermode_driver.h+1−0

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

include/linux/vdpa.h+5−5

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

include/linux/virtio.h+0−2

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

include/linux/virtio_net.h+17−6

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

include/linux/ww_mutex.h+3−2

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

include/linux/xarray.h+3−1

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

include/media/rc-map.h+7−0

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

include/net/act_api.h+4−8

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

include/net/dst.h+11−0

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

include/net/inet_connection_sock.h+1−1

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

include/net/netfilter/nf_tables.h+3−0

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

include/net/netns/xfrm.h+3−1

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

include/net/nexthop.h+24−0

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

include/net/red.h+12−4

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

include/net/rtnetlink.h+4−2

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

include/net/sock.h+13−0

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

include/net/xfrm.h+2−2

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

include/scsi/scsi_transport_iscsi.h+1−0

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

include/trace/events/workqueue.h+3−3

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

include/uapi/linux/blkpg.h+2−26

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

include/uapi/linux/bpf.h+11−6

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

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

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

include/uapi/linux/ethtool.h+33−21

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

include/uapi/linux/fuse.h+2−1

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

include/uapi/linux/idxd.h+2−2

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

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

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

include/uapi/linux/netfilter/nfnetlink_cthelper.h+1−1

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

include/uapi/linux/psample.h+1−4

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

include/uapi/linux/rfkill.h+68−12

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

include/xen/grant_table.h+7−0

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

include/xen/xenbus.h+0−1

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

init/Kconfig+5−6

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

kernel/bpf/bpf_inode_storage.c+1−1

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

kernel/bpf/bpf_struct_ops.c+1−1

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

kernel/bpf/btf.c+0−2

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

kernel/bpf/core.c+8−2

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

kernel/bpf/disasm.c+1−1

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

kernel/bpf/inode.c+2−2

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

kernel/bpf/preload/bpf_preload_kern.c+15−4

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

kernel/bpf/stackmap.c+10−2

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

kernel/bpf/syscall.c+5−0

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

kernel/bpf/trampoline.c+198−50

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

kernel/bpf/verifier.c+233−108

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

kernel/events/core.c+38−4

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

kernel/fork.c+16−8

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

kernel/futex.c+1−2

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

kernel/gcov/clang.c+83−5

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

kernel/irq/irq_sim.c+2−2

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

kernel/irq/irqdomain.c+4−5

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

kernel/irq/manage.c+4−0

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

kernel/jump_label.c+8−0

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

kernel/locking/lockdep.c+3−2

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

kernel/locking/mutex.c+14−11

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

kernel/power/energy_model.c+1−1

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

kernel/ptrace.c+1−1

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

kernel/reboot.c+0−2

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

kernel/signal.c+11−3

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

kernel/static_call.c+27−20

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

kernel/sys.c+1−1

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

kernel/time/alarmtimer.c+1−1

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

kernel/time/hrtimer.c+40−22

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

kernel/time/posix-cpu-timers.c+1−1

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

kernel/trace/ftrace.c+44−8

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

kernel/trace/trace.c+2−1

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

kernel/trace/trace_dynevent.c+4−2

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

kernel/usermode_driver.c+15−6

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

kernel/watchdog.c+3−2

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

kernel/workqueue.c+7−12

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

lib/Kconfig.debug+3−3

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

lib/Kconfig.kasan+2−6

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

lib/earlycpio.c+2−2

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

lib/extable.c+0−5

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

lib/lru_cache.c+2−1

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

lib/math/div64.c+1−0

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

lib/parman.c+2−2

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

lib/radix-tree.c+6−5

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

lib/test_kasan_module.c+1−1

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

lib/test_xarray.c+14−12

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

lib/xarray.c+6−5

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

mm/gup.c+4−0

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

mm/highmem.c+14−7

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

mm/huge_memory.c+3−7

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

mm/hugetlb.c+128−36

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

mm/hugetlb_cgroup.c+8−2

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

mm/internal.h+20−5

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

mm/kasan/common.c+1−1

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

mm/kasan/kasan.h+1−1

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

mm/kasan/report_generic.c+1−1

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

mm/kfence/core.c+9−0

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

mm/kfence/report.c+18−12

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

mm/kmemleak.c+2−1

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

mm/madvise.c+12−1

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

mm/mapping_dirty_helpers.c+2−0

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

mm/memcontrol.c+6−9

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

mm/memory.c+10−8

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

mm/memory_hotplug.c+1−1

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

mm/mmu_gather.c+19−10

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

mm/mmu_notifier.c+23−0

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

mm/oom_kill.c+1−1

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

mm/page-writeback.c+16−0

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

mm/page_alloc.c+82−85

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

mm/page_poison.c+3−1

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

mm/percpu-internal.h+1−1

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

mm/percpu-stats.c+7−2

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

mm/percpu.c+7−7

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

mm/ptdump.c+1−1

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

mm/shuffle.c+2−2

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

mm/slab.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/z3fold.c+15−1

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

net/9p/client.c+0−4

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

net/batman-adv/main.c+0−1

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

net/batman-adv/translation-table.c+2−0

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

net/bridge/br_switchdev.c+2−0

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

net/bridge/netfilter/ebtable_broute.c+7−1

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

net/bridge/netfilter/ebtable_filter.c+7−1

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

net/bridge/netfilter/ebtable_nat.c+7−1

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

net/bridge/netfilter/ebtables.c+27−3

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

net/can/bcm.c+6−4

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

net/can/isotp.c+15−14

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

net/can/raw.c+8−6

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

net/core/dev.c+35−4

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

net/core/drop_monitor.c+23−0

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

net/core/dst.c+42−17

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

net/core/filter.c+10−2

This diff is large: its 33 lines aren’t shown here.

net/core/flow_dissector.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/core/neighbour.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/core/rtnetlink.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/core/skbuff.c+2−0

This diff is large: its 9 lines aren’t shown here.

net/core/skmsg.c+5−7

This diff is large: its 57 lines aren’t shown here.

net/core/sock.c+31−25

This diff is large: its 78 lines aren’t shown here.

net/core/xdp.c+2−1

This diff is large: its 10 lines aren’t shown here.

net/dccp/ipv6.c+5−0

This diff is large: its 12 lines aren’t shown here.

net/dsa/Kconfig+2−0

This diff is large: its 9 lines aren’t shown here.

net/dsa/dsa2.c+14−5

This diff is large: its 45 lines aren’t shown here.

net/dsa/dsa_priv.h+14−11

This diff is large: its 51 lines aren’t shown here.

net/dsa/slave.c+43−16

This diff is large: its 156 lines aren’t shown here.

net/dsa/switch.c+9−6

This diff is large: its 31 lines aren’t shown here.

net/dsa/tag_mtk.c+13−6

This diff is large: its 57 lines aren’t shown here.

net/dsa/tag_rtl4_a.c+5−7

This diff is large: its 34 lines aren’t shown here.

net/ethtool/channels.c+13−13

This diff is large: its 59 lines aren’t shown here.

net/ethtool/common.c+17−0

This diff is large: its 28 lines aren’t shown here.

net/ethtool/eee.c+2−2

This diff is large: its 11 lines aren’t shown here.

net/ethtool/ioctl.c+1−17

This diff is large: its 31 lines aren’t shown here.

net/ethtool/netlink.h+3−3

This diff is large: its 13 lines aren’t shown here.

net/ethtool/pause.c+4−4

This diff is large: its 21 lines aren’t shown here.

net/hsr/hsr_device.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/hsr/hsr_forward.c+0−6

This diff is large: its 13 lines aren’t shown here.

net/ieee802154/nl-mac.c+4−3

This diff is large: its 21 lines aren’t shown here.

net/ieee802154/nl802154.c+60−8

This diff is large: its 176 lines aren’t shown here.

net/ipv4/ah4.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ipv4/cipso_ipv4.c+2−11

This diff is large: its 37 lines aren’t shown here.

net/ipv4/devinet.c+2−1

This diff is large: its 10 lines aren’t shown here.

net/ipv4/esp4.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ipv4/esp4_offload.c+14−3

This diff is large: its 34 lines aren’t shown here.

net/ipv4/inet_connection_sock.c+5−2

This diff is large: its 18 lines aren’t shown here.

net/ipv4/inetpeer.c+7−14

This diff is large: its 36 lines aren’t shown here.

net/ipv4/ip_tunnel.c+2−3

This diff is large: its 19 lines aren’t shown here.

net/ipv4/ip_vti.c+7−5

This diff is large: its 36 lines aren’t shown here.

net/ipv4/ipconfig.c+8−6

This diff is large: its 33 lines aren’t shown here.

net/ipv4/netfilter/arp_tables.c+17−10

This diff is large: its 99 lines aren’t shown here.

net/ipv4/netfilter/arptable_filter.c+9−1

This diff is large: its 26 lines aren’t shown here.

net/ipv4/netfilter/ip_tables.c+10−8

This diff is large: its 81 lines aren’t shown here.

net/ipv4/nexthop.c+7−3

This diff is large: its 34 lines aren’t shown here.

net/ipv4/route.c+8−37

This diff is large: its 53 lines aren’t shown here.

net/ipv4/sysctl_net_ipv4.c+13−3

This diff is large: its 23 lines aren’t shown here.

net/ipv4/tcp.c+17−9

This diff is large: its 42 lines aren’t shown here.

net/ipv4/tcp_minisocks.c+5−2

This diff is large: its 14 lines aren’t shown here.

net/ipv4/udp.c+4−0

This diff is large: its 11 lines aren’t shown here.

net/ipv4/udp_offload.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ipv6/addrconf.c+26−6

This diff is large: its 63 lines aren’t shown here.

net/ipv6/ah6.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ipv6/calipso.c+5−9

This diff is large: its 39 lines aren’t shown here.

net/ipv6/esp6.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ipv6/esp6_offload.c+14−3

This diff is large: its 33 lines aren’t shown here.

net/ipv6/ip6_fib.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ipv6/ip6_gre.c+8−8

This diff is large: its 45 lines aren’t shown here.

net/ipv6/ip6_input.c+0−10

This diff is large: its 17 lines aren’t shown here.

net/ipv6/ip6_tunnel.c+15−5

This diff is large: its 43 lines aren’t shown here.

net/ipv6/ip6_vti.c+7−5

This diff is large: its 33 lines aren’t shown here.

net/ipv6/netfilter/ip6_tables.c+10−8

This diff is large: its 81 lines aren’t shown here.

net/ipv6/raw.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ipv6/route.c+14−30

This diff is large: its 59 lines aren’t shown here.

net/ipv6/sit.c+3−3

This diff is large: its 21 lines aren’t shown here.

net/ipv6/tcp_ipv6.c+5−0

This diff is large: its 12 lines aren’t shown here.

net/l2tp/l2tp_core.c+22−19

This diff is large: its 100 lines aren’t shown here.

net/l2tp/l2tp_core.h+1−0

This diff is large: its 8 lines aren’t shown here.

net/l2tp/l2tp_netlink.c+6−0

This diff is large: its 20 lines aren’t shown here.

net/mac80211/aead_api.c+3−2

This diff is large: its 21 lines aren’t shown here.

net/mac80211/aes_gmac.c+3−2

This diff is large: its 21 lines aren’t shown here.

net/mac80211/cfg.c+5−3

This diff is large: its 29 lines aren’t shown here.

net/mac80211/ibss.c+2−0

This diff is large: its 9 lines aren’t shown here.

net/mac80211/main.c+12−1

This diff is large: its 21 lines aren’t shown here.

net/mac80211/mlme.c+5−2

This diff is large: its 21 lines aren’t shown here.

net/mac80211/rc80211_minstrel_ht.c+0−2

This diff is large: its 16 lines aren’t shown here.

net/mac80211/tx.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/mac80211/util.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/mac802154/llsec.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/mpls/mpls_gso.c+3−0

This diff is large: its 17 lines aren’t shown here.

net/mptcp/options.c+14−10

This diff is large: its 75 lines aren’t shown here.

net/mptcp/protocol.c+151−114

This diff is large: its 426 lines aren’t shown here.

net/mptcp/protocol.h+8−6

This diff is large: its 32 lines aren’t shown here.

net/mptcp/subflow.c+13−6

This diff is large: its 50 lines aren’t shown here.

net/ncsi/ncsi-manage.c+13−7

This diff is large: its 38 lines aren’t shown here.

net/netfilter/nf_conntrack_helper.c+1−2

This diff is large: its 17 lines aren’t shown here.

net/netfilter/nf_conntrack_netlink.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/netfilter/nf_conntrack_proto_gre.c+0−3

This diff is large: its 10 lines aren’t shown here.

net/netfilter/nf_conntrack_proto_tcp.c+4−2

This diff is large: its 13 lines aren’t shown here.

net/netfilter/nf_conntrack_standalone.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/netfilter/nf_flow_table_core.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/netfilter/nf_flow_table_offload.c+3−3

This diff is large: its 16 lines aren’t shown here.

net/netfilter/nf_nat_proto.c+21−4

This diff is large: its 53 lines aren’t shown here.

net/netfilter/nf_tables_api.c+69−18

This diff is large: its 189 lines aren’t shown here.

net/netfilter/nft_limit.c+2−2

This diff is large: its 16 lines aren’t shown here.

net/netfilter/x_tables.c+40−25

This diff is large: its 182 lines aren’t shown here.

net/netlabel/netlabel_cipso_v4.c+3−0

This diff is large: its 23 lines aren’t shown here.

net/netlink/af_netlink.c+2−2

This diff is large: its 24 lines aren’t shown here.

net/nfc/llcp_sock.c+10−0

This diff is large: its 46 lines aren’t shown here.

net/openvswitch/conntrack.c+9−7

This diff is large: its 38 lines aren’t shown here.

net/openvswitch/conntrack.h+4−2

This diff is large: its 20 lines aren’t shown here.

net/openvswitch/flow.c+3−1

This diff is large: its 25 lines aren’t shown here.

net/qrtr/qrtr.c+13−3

This diff is large: its 45 lines aren’t shown here.

net/rds/message.c+3−1

This diff is large: its 19 lines aren’t shown here.

net/rds/send.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/rfkill/core.c+4−3

This diff is large: its 28 lines aren’t shown here.

net/sched/act_api.c+31−17

This diff is large: its 129 lines aren’t shown here.

net/sched/act_ct.c+4−2

This diff is large: its 27 lines aren’t shown here.

net/sched/cls_api.c+9−8

This diff is large: its 53 lines aren’t shown here.

net/sched/cls_flower.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/sched/sch_api.c+4−4

This diff is large: its 34 lines aren’t shown here.

net/sched/sch_choke.c+4−3

This diff is large: its 28 lines aren’t shown here.

net/sched/sch_gred.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/sched/sch_htb.c+16−8

This diff is large: its 73 lines aren’t shown here.

net/sched/sch_red.c+5−2

This diff is large: its 28 lines aren’t shown here.

net/sched/sch_sfq.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/sched/sch_teql.c+3−0

This diff is large: its 10 lines aren’t shown here.

net/sctp/ipv6.c+3−4

This diff is large: its 21 lines aren’t shown here.

net/sctp/output.c+0−7

This diff is large: its 14 lines aren’t shown here.

net/sctp/outqueue.c+7−0

This diff is large: its 21 lines aren’t shown here.

net/sctp/socket.c+5−8

This diff is large: its 43 lines aren’t shown here.

net/sctp/tsnmap.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/sunrpc/auth_gss/svcauth_gss.c+7−4

This diff is large: its 30 lines aren’t shown here.

net/sunrpc/sched.c+4−1

This diff is large: its 13 lines aren’t shown here.

net/sunrpc/svc.c+4−2

This diff is large: its 27 lines aren’t shown here.

net/sunrpc/svc_xprt.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/sunrpc/xprtrdma/svc_rdma_backchannel.c+3−3

This diff is large: its 13 lines aren’t shown here.

net/sunrpc/xprtrdma/svc_rdma_recvfrom.c+39−43

This diff is large: its 136 lines aren’t shown here.

net/tipc/bearer.h+3−3

This diff is large: its 13 lines aren’t shown here.

net/tipc/crypto.c+2−1

This diff is large: its 15 lines aren’t shown here.

net/tipc/net.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/tipc/node.c+9−4

This diff is large: its 35 lines aren’t shown here.

net/tipc/socket.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/vmw_vsock/af_vsock.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/wireless/nl80211.c+15−7

This diff is large: its 80 lines aren’t shown here.

net/wireless/scan.c+8−6

This diff is large: its 23 lines aren’t shown here.

net/wireless/sme.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/xfrm/xfrm_compat.c+9−3

This diff is large: its 41 lines aren’t shown here.

net/xfrm/xfrm_device.c+0−2

This diff is large: its 9 lines aren’t shown here.

net/xfrm/xfrm_interface.c+3−0

This diff is large: its 17 lines aren’t shown here.

net/xfrm/xfrm_output.c+18−5

This diff is large: its 65 lines aren’t shown here.

net/xfrm/xfrm_state.c+6−5

This diff is large: its 53 lines aren’t shown here.

samples/bpf/xdpsock_user.c+2−0

This diff is large: its 8 lines aren’t shown here.

scripts/Makefile.kasan+13−7

This diff is large: its 52 lines aren’t shown here.

scripts/Makefile.lib+2−2

This diff is large: its 18 lines aren’t shown here.

scripts/dummy-tools/gcc+16−2

This diff is large: its 37 lines aren’t shown here.

scripts/gcc-plugins/Makefile+1−0

This diff is large: its 8 lines aren’t shown here.

scripts/ld-version.sh+14−8

This diff is large: its 37 lines aren’t shown here.

scripts/module.lds.S+2−0

This diff is large: its 16 lines aren’t shown here.

security/Kconfig.hardening+2−2

This diff is large: its 18 lines aren’t shown here.

security/commoncap.c+1−11

This diff is large: its 26 lines aren’t shown here.

security/integrity/iint.c+8−0

This diff is large: its 15 lines aren’t shown here.

security/selinux/include/security.h+11−4

This diff is large: its 26 lines aren’t shown here.

security/selinux/selinuxfs.c+9−13

This diff is large: its 59 lines aren’t shown here.

security/selinux/ss/avtab.c+33−68

This diff is large: its 161 lines aren’t shown here.

security/selinux/ss/avtab.h+1−1

This diff is large: its 9 lines aren’t shown here.

security/selinux/ss/conditional.c+6−6

This diff is large: its 33 lines aren’t shown here.

security/selinux/ss/services.c+159−61

This diff is large: its 581 lines aren’t shown here.

security/selinux/ss/sidtab.c+21−0

This diff is large: its 42 lines aren’t shown here.

security/selinux/ss/sidtab.h+4−0

This diff is large: its 18 lines aren’t shown here.

security/tomoyo/network.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/drivers/aloop.c+8−4

This diff is large: its 33 lines aren’t shown here.

sound/drivers/dummy.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/drivers/mtpav.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/drivers/mts64.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/drivers/pcsp/pcsp.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/drivers/portman2x4.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/drivers/serial-u16550.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/drivers/virmidi.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/firewire/dice/dice-stream.c+2−3

This diff is large: its 14 lines aren’t shown here.

sound/hda/intel-nhlt.c+5−0

This diff is large: its 12 lines aren’t shown here.

sound/isa/ad1816a/ad1816a.c+0−7

This diff is large: its 14 lines aren’t shown here.

sound/isa/ad1848/ad1848.c+0−3

This diff is large: its 10 lines aren’t shown here.

sound/isa/als100.c+0−11

This diff is large: its 18 lines aren’t shown here.

sound/isa/azt2320.c+0−5

This diff is large: its 12 lines aren’t shown here.

sound/isa/cmi8330.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/isa/cs423x/cs4231.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/isa/cs423x/cs4236.c+0−34

This diff is large: its 41 lines aren’t shown here.

sound/isa/es1688/es1688.c+0−5

This diff is large: its 12 lines aren’t shown here.

sound/isa/es18xx.c+1−9

This diff is large: its 19 lines aren’t shown here.

sound/isa/gus/gusclassic.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/isa/gus/gusextreme.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/isa/gus/gusmax.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/isa/gus/interwave.c+0−6

This diff is large: its 15 lines aren’t shown here.

sound/isa/opl3sa2.c+0−5

This diff is large: its 12 lines aren’t shown here.

sound/isa/opti9xx/miro.c+0−3

This diff is large: its 10 lines aren’t shown here.

sound/isa/opti9xx/opti92x-ad1848.c+0−6

This diff is large: its 18 lines aren’t shown here.

sound/isa/sb/jazz16.c+0−3

This diff is large: its 10 lines aren’t shown here.

sound/isa/sb/sb16.c+0−8

This diff is large: its 17 lines aren’t shown here.

sound/isa/sb/sb8.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/isa/sc6000.c+0−3

This diff is large: its 10 lines aren’t shown here.

sound/isa/wavefront/wavefront.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/mips/sgio2audio.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/ad1889.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/ali5451/ali5451.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/als300.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/als4000.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/atiixp.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/atiixp_modem.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/au88x0/au88x0.c+0−2

This diff is large: its 9 lines aren’t shown here.

sound/pci/azt3328.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/bt87x.c+0−2

This diff is large: its 9 lines aren’t shown here.

sound/pci/ca0106/ca0106_main.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/cmipci.c+0−4

This diff is large: its 11 lines aren’t shown here.

sound/pci/cs4281.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/cs46xx/cs46xx.c+0−7

This diff is large: its 14 lines aren’t shown here.

sound/pci/cs5535audio/cs5535audio.c+0−1

This diff is large: its 5 lines aren’t shown here.

sound/pci/ctxfi/xfi.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/echoaudio/echoaudio.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/emu10k1/emu10k1.c+0−2

This diff is large: its 9 lines aren’t shown here.

sound/pci/emu10k1/emu10k1x.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/ens1370.c+0−8

This diff is large: its 18 lines aren’t shown here.

sound/pci/es1938.c+0−4

This diff is large: its 11 lines aren’t shown here.

sound/pci/es1968.c+0−4

This diff is large: its 11 lines aren’t shown here.

sound/pci/fm801.c+0−2

This diff is large: its 9 lines aren’t shown here.

sound/pci/hda/hda_bind.c+4−0

This diff is large: its 11 lines aren’t shown here.

sound/pci/hda/hda_controller.c+0−7

This diff is large: its 14 lines aren’t shown here.

sound/pci/hda/hda_generic.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/pci/hda/hda_intel.c+10−34

This diff is large: its 68 lines aren’t shown here.

sound/pci/hda/patch_ca0132.c+1−0

This diff is large: its 8 lines aren’t shown here.

sound/pci/hda/patch_conexant.c+46−17

This diff is large: its 120 lines aren’t shown here.

sound/pci/hda/patch_hdmi.c+13−0

This diff is large: its 27 lines aren’t shown here.

sound/pci/hda/patch_realtek.c+35−1

This diff is large: its 124 lines aren’t shown here.

sound/pci/ice1712/ice1712.c+0−6

This diff is large: its 13 lines aren’t shown here.

sound/pci/ice1712/ice1724.c+0−19

This diff is large: its 26 lines aren’t shown here.

sound/pci/intel8x0.c+0−23

This diff is large: its 30 lines aren’t shown here.

sound/pci/intel8x0m.c+0−15

This diff is large: its 22 lines aren’t shown here.

sound/pci/korg1212/korg1212.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/lola/lola.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/lx6464es/lx6464es.c+0−2

This diff is large: its 9 lines aren’t shown here.

sound/pci/maestro3.c+0−5

This diff is large: its 12 lines aren’t shown here.

sound/pci/mixart/mixart.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/nm256/nm256.c+0−2

This diff is large: its 9 lines aren’t shown here.

sound/pci/oxygen/oxygen.c+0−3

This diff is large: its 10 lines aren’t shown here.

sound/pci/oxygen/se6x.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/oxygen/virtuoso.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/pcxhr/pcxhr.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/riptide/riptide.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/rme32.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/rme96.c+0−5

This diff is large: its 12 lines aren’t shown here.

sound/pci/rme9652/hdsp.c+0−3

This diff is large: its 10 lines aren’t shown here.

sound/pci/rme9652/hdspm.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/rme9652/rme9652.c+0−2

This diff is large: its 9 lines aren’t shown here.

sound/pci/sis7019.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/sonicvibes.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/trident/trident.c+0−12

This diff is large: its 19 lines aren’t shown here.

sound/pci/via82xx.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/via82xx_modem.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/vx222/vx222.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pci/ymfpci/ymfpci.c+0−6

This diff is large: its 13 lines aren’t shown here.

sound/pcmcia/pdaudiocf/pdaudiocf.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/pcmcia/vx/vxpocket.c+0−4

This diff is large: its 14 lines aren’t shown here.

sound/ppc/powermac.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/sh/aica.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/sh/sh_dac_audio.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/soc/bcm/cygnus-ssp.c+3−1

This diff is large: its 12 lines aren’t shown here.

sound/soc/codecs/Kconfig+0−5

This diff is large: its 19 lines aren’t shown here.

sound/soc/codecs/ak4458.c+1−0

This diff is large: its 8 lines aren’t shown here.

sound/soc/codecs/ak5558.c+1−0

This diff is large: its 8 lines aren’t shown here.

sound/soc/codecs/cs42l42.c+34−78

This diff is large: its 195 lines aren’t shown here.

sound/soc/codecs/cs42l42.h+7−6

This diff is large: its 34 lines aren’t shown here.

sound/soc/codecs/es8316.c+2−7

This diff is large: its 16 lines aren’t shown here.

sound/soc/codecs/lpass-rx-macro.c+2−2

This diff is large: its 18 lines aren’t shown here.

sound/soc/codecs/lpass-tx-macro.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/codecs/lpass-va-macro.c+13−15

This diff is large: its 52 lines aren’t shown here.

sound/soc/codecs/lpass-wsa-macro.c+11−9

This diff is large: its 49 lines aren’t shown here.

sound/soc/codecs/max98373-i2c.c+1−0

This diff is large: its 8 lines aren’t shown here.

sound/soc/codecs/max98373-sdw.c+1−0

This diff is large: its 8 lines aren’t shown here.

sound/soc/codecs/max98373.c+2−0

This diff is large: its 14 lines aren’t shown here.

sound/soc/codecs/rt1015.c+2−0

This diff is large: its 16 lines aren’t shown here.

sound/soc/codecs/rt5640.c+2−2

This diff is large: its 12 lines aren’t shown here.

sound/soc/codecs/rt5651.c+2−2

This diff is large: its 12 lines aren’t shown here.

sound/soc/codecs/rt5659.c+5−0

This diff is large: its 18 lines aren’t shown here.

sound/soc/codecs/rt5670.c+96−14

This diff is large: its 157 lines aren’t shown here.

sound/soc/codecs/rt5670.h+5−4

This diff is large: its 25 lines aren’t shown here.

sound/soc/codecs/rt711.c+8−0

This diff is large: its 22 lines aren’t shown here.

sound/soc/codecs/sgtl5000.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/codecs/sirf-audio-codec.h+0−124

This diff is large: its 125 lines aren’t shown here.

sound/soc/codecs/wcd934x.c+6−0

This diff is large: its 13 lines aren’t shown here.

sound/soc/codecs/wm8960.c+7−1

This diff is large: its 15 lines aren’t shown here.

sound/soc/fsl/fsl_esai.c+5−3

This diff is large: its 17 lines aren’t shown here.

sound/soc/fsl/fsl_ssi.c+4−2

This diff is large: its 22 lines aren’t shown here.

sound/soc/generic/simple-card-utils.c+7−6

This diff is large: its 23 lines aren’t shown here.

sound/soc/intel/atom/sst-mfld-platform-pcm.c+6−6

This diff is large: its 31 lines aren’t shown here.

sound/soc/intel/boards/bytcr_rt5640.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/mediatek/mt8192/mt8192-dai-tdm.c+3−1

This diff is large: its 11 lines aren’t shown here.

sound/soc/mediatek/mt8192/mt8192-reg.h+5−3

This diff is large: its 22 lines aren’t shown here.

sound/soc/qcom/lpass-cpu.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/qcom/sdm845.c+3−3

This diff is large: its 22 lines aren’t shown here.

sound/soc/soc-core.c+4−0

This diff is large: its 18 lines aren’t shown here.

sound/soc/sof/core.c+7−1

This diff is large: its 15 lines aren’t shown here.

sound/soc/sof/intel/apl.c+2−1

This diff is large: its 12 lines aren’t shown here.

sound/soc/sof/intel/cnl.c+2−17

This diff is large: its 35 lines aren’t shown here.

sound/soc/sof/intel/hda-dsp.c+18−5

This diff is large: its 44 lines aren’t shown here.

sound/soc/sof/intel/hda.c+1−0

This diff is large: its 8 lines aren’t shown here.

sound/soc/sof/intel/hda.h+1−0

This diff is large: its 8 lines aren’t shown here.

sound/soc/sof/intel/icl.c+2−1

This diff is large: its 12 lines aren’t shown here.

sound/soc/sof/intel/pci-tgl.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/sof/intel/tgl.c+17−1

This diff is large: its 32 lines aren’t shown here.

sound/soc/sunxi/sun4i-codec.c+5−0

This diff is large: its 40 lines aren’t shown here.

sound/sparc/amd7930.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/sparc/cs4231.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/sparc/dbri.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/usb/6fire/chip.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/usb/caiaq/device.c+0−14

This diff is large: its 21 lines aren’t shown here.

sound/usb/card.c+6−2

This diff is large: its 29 lines aren’t shown here.

sound/usb/hiface/chip.c+0−17

This diff is large: its 24 lines aren’t shown here.

sound/usb/misc/ua101.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/usb/mixer_quirks.c+2−2

This diff is large: its 18 lines aren’t shown here.

sound/usb/quirks.c+11−1

This diff is large: its 33 lines aren’t shown here.

sound/usb/usbaudio.h+1−0

This diff is large: its 8 lines aren’t shown here.

sound/usb/usx2y/usbusx2y.c+0−1

This diff is large: its 8 lines aren’t shown here.

sound/x86/intel_hdmi_audio.c+0−1

This diff is large: its 5 lines aren’t shown here.

sound/xen/xen_snd_front.c+0−1

This diff is large: its 5 lines aren’t shown here.

tools/arch/ia64/include/asm/barrier.h+0−3

This diff is large: its 10 lines aren’t shown here.

tools/arch/s390/include/uapi/asm/ptrace.h+3−2

This diff is large: its 12 lines aren’t shown here.

tools/arch/x86/include/asm/cpufeatures.h+13−6

This diff is large: its 75 lines aren’t shown here.

tools/arch/x86/include/uapi/asm/kvm.h+1−0

This diff is large: its 8 lines aren’t shown here.

tools/arch/x86/include/uapi/asm/vmx.h+3−1

This diff is large: its 18 lines aren’t shown here.

tools/bpf/resolve_btfids/main.c+5−0

This diff is large: its 12 lines aren’t shown here.

tools/build/Makefile+7−1

This diff is large: its 20 lines aren’t shown here.

tools/include/linux/coresight-pmu.h+15−5

This diff is large: its 33 lines aren’t shown here.

tools/include/uapi/asm/errno.h+0−2

This diff is large: its 9 lines aren’t shown here.

tools/include/uapi/drm/drm.h+49−48

This diff is large: its 402 lines aren’t shown here.

tools/include/uapi/drm/i915_drm.h+2−1

This diff is large: its 11 lines aren’t shown here.

tools/include/uapi/linux/bpf.h+0−1

This diff is large: its 8 lines aren’t shown here.

tools/include/uapi/linux/kvm.h+86−0

This diff is large: its 147 lines aren’t shown here.

tools/include/uapi/linux/mount.h+16−0

This diff is large: its 29 lines aren’t shown here.

tools/include/uapi/linux/openat2.h+4−0

This diff is large: its 10 lines aren’t shown here.

tools/kvm/kvm_stat/kvm_stat.service+1−0

This diff is large: its 8 lines aren’t shown here.

tools/lib/bpf/Makefile+1−1

This diff is large: its 9 lines aren’t shown here.

tools/lib/bpf/btf_dump.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/lib/bpf/libbpf.c+2−1

This diff is large: its 10 lines aren’t shown here.

tools/lib/bpf/netlink.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/lib/bpf/ringbuf.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/lib/bpf/xsk.c+41−22

This diff is large: its 175 lines aren’t shown here.

tools/lib/perf/evlist.c+9−4

This diff is large: its 30 lines aren’t shown here.

tools/lib/perf/include/internal/evlist.h+2−0

This diff is large: its 7 lines aren’t shown here.

tools/objtool/check.c+3−0

This diff is large: its 10 lines aren’t shown here.

tools/perf/Documentation/perf-evlist.txt+1−1

This diff is large: its 9 lines aren’t shown here.

tools/perf/Documentation/perf-ftrace.txt+2−2

This diff is large: its 11 lines aren’t shown here.

tools/perf/Documentation/perf-kallsyms.txt+1−1

This diff is large: its 7 lines aren’t shown here.

tools/perf/Documentation/perf-trace.txt+2−2

This diff is large: its 11 lines aren’t shown here.

tools/perf/Makefile.perf+2−10

This diff is large: its 33 lines aren’t shown here.

tools/perf/arch/arm/util/cs-etm.c+8−4

This diff is large: its 41 lines aren’t shown here.

tools/perf/arch/powerpc/entry/syscalls/syscall.tbl+6−15

This diff is large: its 59 lines aren’t shown here.

tools/perf/arch/s390/entry/syscalls/syscall.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/perf/arch/x86/Makefile+6−5

This diff is large: its 24 lines aren’t shown here.

tools/perf/arch/x86/entry/syscalls/syscall_64.tbl+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/arch/x86/include/arch-tests.h+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/arch/x86/tests/Build+1−0

This diff is large: its 7 lines aren’t shown here.

tools/perf/arch/x86/tests/arch-tests.c+4−0

This diff is large: its 11 lines aren’t shown here.

tools/perf/arch/x86/tests/insn-x86.c+1−1

This diff is large: its 13 lines aren’t shown here.

tools/perf/arch/x86/tests/sample-parsing.c+121−0

This diff is large: its 122 lines aren’t shown here.

tools/perf/arch/x86/util/archinsn.c+1−1

This diff is large: its 12 lines aren’t shown here.

tools/perf/bench/numa.c+29−13

This diff is large: its 125 lines aren’t shown here.

tools/perf/bench/sched-messaging.c+2−2

This diff is large: its 14 lines aren’t shown here.

tools/perf/bench/sched-pipe.c+2−2

This diff is large: its 18 lines aren’t shown here.

tools/perf/bench/syscall.c+2−2

This diff is large: its 18 lines aren’t shown here.

tools/perf/builtin-daemon.c+36−27

This diff is large: its 141 lines aren’t shown here.

tools/perf/builtin-diff.c+2−1

This diff is large: its 10 lines aren’t shown here.

tools/perf/builtin-inject.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/perf/builtin-trace.c+2−3

This diff is large: its 19 lines aren’t shown here.

tools/perf/perf-archive.sh+1−2

This diff is large: its 11 lines aren’t shown here.

tools/perf/tests/attr.c+7−1

This diff is large: its 22 lines aren’t shown here.

tools/perf/tests/bpf.c+1−8

This diff is large: its 23 lines aren’t shown here.

tools/perf/tests/code-reading.c+3−7

This diff is large: its 17 lines aren’t shown here.

tools/perf/tests/cpumap.c+2−0

This diff is large: its 9 lines aren’t shown here.

tools/perf/tests/keep-tracking.c+2−3

This diff is large: its 13 lines aren’t shown here.

tools/perf/tests/mmap-basic.c+0−2

This diff is large: its 9 lines aren’t shown here.

tools/perf/tests/perf-time-to-tsc.c+2−0

This diff is large: its 9 lines aren’t shown here.

tools/perf/tests/sample-parsing.c+0−4

This diff is large: its 18 lines aren’t shown here.

tools/perf/tests/shell/daemon.sh+17−17

This diff is large: its 124 lines aren’t shown here.

tools/perf/tests/sw-clock.c+4−8

This diff is large: its 39 lines aren’t shown here.

tools/perf/tests/switch-tracking.c+2−3

This diff is large: its 13 lines aren’t shown here.

tools/perf/tests/task-exit.c+3−7

This diff is large: its 37 lines aren’t shown here.

tools/perf/tests/thread-map.c+3−5

This diff is large: its 33 lines aren’t shown here.

tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c+3−1

This diff is large: its 12 lines aren’t shown here.

tools/perf/util/auxtrace.c+0−4

This diff is large: its 11 lines aren’t shown here.

tools/perf/util/block-info.c+3−3

This diff is large: its 21 lines aren’t shown here.

tools/perf/util/bpf-event.c+10−3

This diff is large: its 36 lines aren’t shown here.

tools/perf/util/evlist.c+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/util/evsel.c+17−1

This diff is large: its 36 lines aren’t shown here.

tools/perf/util/evsel.h+3−1

This diff is large: its 23 lines aren’t shown here.

tools/perf/util/header.c+2−2

This diff is large: its 11 lines aren’t shown here.

tools/perf/util/map.c+3−4

This diff is large: its 21 lines aren’t shown here.

tools/perf/util/parse-events.c+3−0

This diff is large: its 10 lines aren’t shown here.

tools/perf/util/parse-events.y+5−1

This diff is large: its 21 lines aren’t shown here.

tools/perf/util/pmu.c+33−0

This diff is large: its 37 lines aren’t shown here.

tools/perf/util/pmu.h+3−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/util/python-ext-sources+1−0

This diff is large: its 5 lines aren’t shown here.

tools/perf/util/sort.c+2−2

This diff is large: its 18 lines aren’t shown here.

tools/perf/util/stat-display.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/perf/util/stat.c+38−9

This diff is large: its 89 lines aren’t shown here.

tools/perf/util/synthetic-events.c+6−5

This diff is large: its 34 lines aren’t shown here.

tools/perf/util/trace-event-read.c+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/util/vdso.c+2−0

This diff is large: its 9 lines aren’t shown here.

tools/testing/kunit/configs/broken_on_uml.config+2−0

This diff is large: its 6 lines aren’t shown here.

tools/testing/kunit/kunit_config.py+1−1

This diff is large: its 9 lines aren’t shown here.

tools/testing/radix-tree/idr-test.c+18−3

This diff is large: its 53 lines aren’t shown here.

tools/testing/radix-tree/linux/compiler_types.h+0−0

Empty file deleted.

tools/testing/radix-tree/multiorder.c+2−0

This diff is large: its 10 lines aren’t shown here.

tools/testing/radix-tree/xarray.c+2−0

This diff is large: its 14 lines aren’t shown here.

tools/testing/selftests/arm64/fp/sve-ptrace.c+1−1

This diff is large: its 7 lines aren’t shown here.

tools/testing/selftests/arm64/fp/sve-test.S+17−5

This diff is large: its 34 lines aren’t shown here.

tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c+44−0

This diff is large: its 62 lines aren’t shown here.

tools/testing/selftests/bpf/prog_tests/check_mtu.c+4−0

This diff is large: its 18 lines aren’t shown here.

tools/testing/selftests/bpf/prog_tests/fexit_sleep.c+82−0

This diff is large: its 83 lines aren’t shown here.

tools/testing/selftests/bpf/progs/bpf_tcp_nogpl.c+19−0

This diff is large: its 20 lines aren’t shown here.

tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c+8−0

This diff is large: its 22 lines aren’t shown here.

tools/testing/selftests/bpf/progs/fexit_sleep.c+31−0

This diff is large: its 32 lines aren’t shown here.

tools/testing/selftests/bpf/progs/netif_receive_skb.c+10−3

This diff is large: its 29 lines aren’t shown here.

tools/testing/selftests/bpf/progs/test_check_mtu.c+92−0

This diff is large: its 103 lines aren’t shown here.

tools/testing/selftests/bpf/progs/test_global_func11.c+1−1

This diff is large: its 7 lines aren’t shown here.

tools/testing/selftests/bpf/progs/test_tunnel_kern.c+4−8

This diff is large: its 26 lines aren’t shown here.

tools/testing/selftests/bpf/verifier/array_access.c+2−1

This diff is large: its 15 lines aren’t shown here.

tools/testing/selftests/bpf/verifier/atomic_and.c+23−0

This diff is large: its 27 lines aren’t shown here.

tools/testing/selftests/bpf/verifier/atomic_cmpxchg.c+25−0

This diff is large: its 29 lines aren’t shown here.

tools/testing/selftests/bpf/verifier/atomic_or.c+25−0

This diff is large: its 29 lines aren’t shown here.

tools/testing/selftests/bpf/verifier/bounds.c+0−5

This diff is large: its 19 lines aren’t shown here.

tools/testing/selftests/bpf/verifier/bounds_deduction.c+21−9

This diff is large: its 110 lines aren’t shown here.

tools/testing/selftests/bpf/verifier/bounds_mix_sign_unsign.c+0−13

This diff is large: its 96 lines aren’t shown here.

tools/testing/selftests/bpf/verifier/map_ptr.c+4−0

This diff is large: its 17 lines aren’t shown here.

tools/testing/selftests/bpf/verifier/unpriv.c+14−1

This diff is large: its 29 lines aren’t shown here.

tools/testing/selftests/bpf/verifier/value_ptr_arith.c+23−4

This diff is large: its 55 lines aren’t shown here.

tools/testing/selftests/gpio/.gitignore+1−1

This diff is large: its 4 lines aren’t shown here.

tools/testing/selftests/kvm/.gitignore+3−0

This diff is large: its 14 lines aren’t shown here.

tools/testing/selftests/kvm/Makefile+3−0

This diff is large: its 16 lines aren’t shown here.

tools/testing/selftests/kvm/hardware_disable_test.c+5−5

This diff is large: its 38 lines aren’t shown here.

tools/testing/selftests/kvm/include/kvm_util.h+2−0

This diff is large: its 16 lines aren’t shown here.

tools/testing/selftests/kvm/lib/kvm_util.c+6−1

This diff is large: its 18 lines aren’t shown here.

tools/testing/selftests/kvm/lib/kvm_util_internal.h+0−2

This diff is large: its 9 lines aren’t shown here.

tools/testing/selftests/kvm/x86_64/get_msr_index_features.c+134−0

This diff is large: its 135 lines aren’t shown here.

tools/testing/selftests/kvm/x86_64/hyperv_clock.c+269−0

This diff is large: its 270 lines aren’t shown here.

tools/testing/selftests/kvm/x86_64/set_boot_cpu_id.c+166−0

This diff is large: its 167 lines aren’t shown here.

tools/testing/selftests/net/fib_nexthops.sh+8−0

This diff is large: its 15 lines aren’t shown here.

tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh+9−0

This diff is large: its 21 lines aren’t shown here.

tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh+12−1

This diff is large: its 23 lines aren’t shown here.

tools/testing/selftests/net/ipsec.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/testing/selftests/net/mptcp/mptcp_join.sh+20−10

This diff is large: its 71 lines aren’t shown here.

tools/testing/selftests/net/reuseaddr_ports_exhausted.c+16−16

This diff is large: its 42 lines aren’t shown here.

tools/testing/selftests/netfilter/Makefile+1−1

This diff is large: its 9 lines aren’t shown here.

tools/testing/selftests/netfilter/nf_nat_edemux.sh+99−0

This diff is large: its 100 lines aren’t shown here.

tools/testing/selftests/vm/Makefile+2−2

This diff is large: its 18 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