History

Merge tag 'v4.18' into rdma.git for-next

Resolve merge conflicts from the -rc cycle against the rdma.git tree: Conflicts: drivers/infiniband/core/uverbs_cmd.c - New ifs added to ib_uverbs_ex_create_flow in -rc and for-next - Merge removal of file->ucontext in for-next with new code in -rc drivers/infiniband/core/uverbs_main.c - for-next removed code from ib_uverbs_write() that was modified in for-rc

Jason Gunthorpe committed 8 years ago

Commit 89982f72 parents a1ceeca 94710ca1684 files · +18047 −9534Browse files

Unified · Split

1684 files
  1. Documentation/admin-guide/kernel-parameters.txt +5 −0
  2. Documentation/admin-guide/pm/intel_pstate.rst +13 −3
  3. Documentation/core-api/kernel-api.rst +1 −1
  4. Documentation/device-mapper/writecache.txt +2 −0
  5. Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt +1 −1
  6. Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt +1 −1
  7. Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt +1 −1
  8. Documentation/devicetree/bindings/input/sprd,sc27xx-vibra.txt +23 −0
  9. Documentation/devicetree/bindings/input/touchscreen/hideep.txt +1 −1
  10. Documentation/devicetree/bindings/interrupt-controller/nvidia,tegra20-ictlr.txt +1 −1
  11. Documentation/devicetree/bindings/interrupt-controller/st,stm32-exti.txt +1 −1
  12. Documentation/devicetree/bindings/mips/brcm/soc.txt +1 −1
  13. Documentation/devicetree/bindings/net/fsl-fman.txt +1 −1
  14. Documentation/devicetree/bindings/power/power_domain.txt +1 −1
  15. Documentation/devicetree/bindings/regulator/tps65090.txt +1 −1
  16. Documentation/devicetree/bindings/reset/st,sti-softreset.txt +1 −1
  17. Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt +1 −1
  18. Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt +1 −1
  19. Documentation/devicetree/bindings/sound/qcom,apq8096.txt +1 −1
  20. Documentation/devicetree/bindings/usb/rockchip,dwc3.txt +2 −1
  21. Documentation/devicetree/bindings/w1/w1-gpio.txt +1 −1
  22. Documentation/driver-api/infrastructure.rst +2 −2
  23. Documentation/filesystems/Locking +1 −6
  24. Documentation/filesystems/cifs/AUTHORS +4 −3
  25. Documentation/filesystems/cifs/CHANGES +3 −0
  26. Documentation/filesystems/cifs/TODO +9 −8
  27. Documentation/filesystems/vfs.txt +0 −13
  28. Documentation/kbuild/kbuild.txt +7 −10
  29. Documentation/kbuild/kconfig-language.txt +6 −0
  30. Documentation/kbuild/kconfig.txt +43 −8
  31. Documentation/networking/bonding.txt +1 −1
  32. Documentation/networking/dpaa2/overview.rst +1 −0
  33. Documentation/networking/e100.rst +70 −61
  34. Documentation/networking/e1000.rst +94 −55
  35. Documentation/networking/strparser.txt +1 −1
  36. Documentation/trace/histogram.txt +12 −11
  37. Documentation/usb/gadget_configfs.txt +1 −1
  38. Documentation/virtual/kvm/api.txt +1 −1
  39. MAINTAINERS +51 −25
  40. Makefile +5 −10
  41. arch/alpha/Kconfig +0 −5
  42. arch/alpha/kernel/osf_sys.c +1 −4
  43. arch/alpha/lib/Makefile +0 −2
  44. arch/alpha/lib/dec_and_lock.c +0 −44
  45. arch/arc/Kconfig +4 −1
  46. arch/arc/Makefile +1 −14
  47. arch/arc/configs/axs101_defconfig +0 −1
  48. arch/arc/configs/axs103_defconfig +0 −1
  49. arch/arc/configs/axs103_smp_defconfig +0 −1
  50. arch/arc/configs/haps_hs_defconfig +0 −1
  51. arch/arc/configs/haps_hs_smp_defconfig +0 −1
  52. arch/arc/configs/hsdk_defconfig +0 −1
  53. arch/arc/configs/nsim_700_defconfig +0 −1
  54. arch/arc/configs/nsim_hs_defconfig +0 −1
  55. arch/arc/configs/nsim_hs_smp_defconfig +0 −1
  56. arch/arc/configs/nsimosci_defconfig +0 −1
  57. arch/arc/configs/nsimosci_hs_defconfig +0 −1
  58. arch/arc/configs/nsimosci_hs_smp_defconfig +0 −1
  59. arch/arc/configs/tb10x_defconfig +0 −1
  60. arch/arc/include/asm/cache.h +3 −1
  61. arch/arc/include/asm/delay.h +3 −0
  62. arch/arc/include/asm/entry-compact.h +6 −0
  63. arch/arc/include/asm/entry.h +0 −3
  64. arch/arc/include/asm/mach_desc.h +0 −2
  65. arch/arc/include/asm/page.h +1 −1
  66. arch/arc/include/asm/pgtable.h +1 −1
  67. arch/arc/kernel/irq.c +1 −1
  68. arch/arc/kernel/process.c +36 −11
  69. arch/arc/mm/cache.c +14 −3
  70. arch/arc/mm/dma.c +47 −2
  71. arch/arc/plat-eznps/include/plat/ctop.h +10 −0
  72. arch/arc/plat-eznps/mtm.c +4 −2
  73. arch/arc/plat-hsdk/Kconfig +3 −0
  74. arch/arc/plat-hsdk/platform.c +62 −0
  75. arch/arm/Kconfig +7 −1
  76. arch/arm/boot/dts/am335x-bone-common.dtsi +0 −1
  77. arch/arm/boot/dts/am3517.dtsi +9 −0
  78. arch/arm/boot/dts/am437x-sk-evm.dts +2 −0
  79. arch/arm/boot/dts/armada-385-synology-ds116.dts +1 −1
  80. arch/arm/boot/dts/armada-38x.dtsi +1 −1
  81. arch/arm/boot/dts/bcm-cygnus.dtsi +12 −12
  82. arch/arm/boot/dts/bcm-hr2.dtsi +12 −12
  83. arch/arm/boot/dts/bcm-nsp.dtsi +16 −16
  84. arch/arm/boot/dts/bcm5301x.dtsi +1 −1
  85. arch/arm/boot/dts/da850.dtsi +1 −5
  86. arch/arm/boot/dts/dra7.dtsi +1 −1
  87. arch/arm/boot/dts/imx51-zii-rdu1.dts +1 −1
  88. arch/arm/boot/dts/imx6q.dtsi +1 −1
  89. arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi +1 −1
  90. arch/arm/boot/dts/imx6sx.dtsi +1 −1
  91. arch/arm/boot/dts/omap4-droid4-xt894.dts +3 −6
  92. arch/arm/boot/dts/socfpga.dtsi +2 −2
  93. arch/arm/boot/dts/socfpga_arria10.dtsi +2 −3
  94. arch/arm/common/Makefile +1 −1
  95. arch/arm/configs/imx_v4_v5_defconfig +2 −0
  96. arch/arm/configs/imx_v6_v7_defconfig +2 −0
  97. arch/arm/configs/multi_v7_defconfig +155 −223
  98. arch/arm/crypto/speck-neon-core.S +4 −2
  99. arch/arm/firmware/Makefile +3 −0
  100. arch/arm/kernel/entry-common.S +3 −1
  101. arch/arm/kernel/head-nommu.S +1 −1
  102. arch/arm/kernel/process.c +1 −0
  103. arch/arm/kernel/signal.c +2 −2
  104. arch/arm/mach-bcm/Kconfig +1 −0
  105. arch/arm/mach-davinci/board-da850-evm.c +1 −1
  106. arch/arm/mach-omap2/omap-smp.c +41 −0
  107. arch/arm/mach-pxa/irq.c +2 −2
  108. arch/arm/mach-rpc/ecard.c +1 −4
  109. arch/arm/mach-socfpga/Kconfig +1 −0
  110. arch/arm/mm/init.c +9 −0
  111. arch/arm/net/bpf_jit_32.c +1 −1
  112. arch/arm/xen/enlighten.c +4 −3
  113. arch/arm64/Makefile +5 −5
  114. arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +2 −4
  115. arch/arm64/boot/dts/amlogic/meson-axg-s400.dts +14 −1
  116. arch/arm64/boot/dts/amlogic/meson-axg.dtsi +2 −2
  117. arch/arm64/boot/dts/amlogic/meson-gx.dtsi +9 −3
  118. arch/arm64/boot/dts/amlogic/meson-gxl-mali.dtsi +1 −1
  119. arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +0 −3
  120. arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi +7 −0
  121. arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +0 −8
  122. arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi +4 −4
  123. arch/arm64/boot/dts/broadcom/stingray/bcm958742k.dts +4 −0
  124. arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dts +4 −0
  125. arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi +2 −2
  126. arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts +2 −0
  127. arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +2 −0
  128. arch/arm64/boot/dts/marvell/armada-cp110.dtsi +1 −1
  129. arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi +1 −1
  130. arch/arm64/boot/dts/qcom/msm8916.dtsi +2 −2
  131. arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts +1 −1
  132. arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts +1 −1
  133. arch/arm64/configs/defconfig +39 −63
  134. arch/arm64/crypto/aes-ce-ccm-core.S +55 −95
  135. arch/arm64/crypto/aes-glue.c +1 −1
  136. arch/arm64/crypto/ghash-ce-core.S +25 −51
  137. arch/arm64/crypto/ghash-ce-glue.c +6 −2
  138. arch/arm64/include/asm/alternative.h +6 −1
  139. arch/arm64/include/asm/kvm_host.h +1 −0
  140. arch/arm64/include/asm/pgtable.h +1 −5
  141. arch/arm64/include/asm/simd.h +7 −12
  142. arch/arm64/include/asm/sysreg.h +11 −0
  143. arch/arm64/include/asm/tlb.h +1 −1
  144. arch/arm64/kernel/alternative.c +44 −7
  145. arch/arm64/kernel/cpufeature.c +3 −3
  146. arch/arm64/kernel/module.c +2 −3
  147. arch/arm64/kernel/smp.c +1 −1
  148. arch/arm64/kvm/fpsimd.c +27 −9
  149. arch/arm64/mm/dma-mapping.c +5 −4
  150. arch/arm64/mm/hugetlbpage.c +4 −3
  151. arch/arm64/mm/init.c +3 −1
  152. arch/arm64/mm/proc.S +3 −2
  153. arch/ia64/include/asm/tlb.h +3 −4
  154. arch/ia64/kernel/perfmon.c +2 −4
  155. arch/ia64/mm/init.c +7 −9
  156. arch/m68k/include/asm/mcf_pgalloc.h +3 −1
  157. arch/microblaze/Kconfig.debug +0 −7
  158. arch/microblaze/include/asm/setup.h +0 −5
  159. arch/microblaze/include/asm/unistd.h +1 −1
  160. arch/microblaze/include/uapi/asm/unistd.h +2 −0
  161. arch/microblaze/kernel/Makefile +1 −3
  162. arch/microblaze/kernel/heartbeat.c +0 −72
  163. arch/microblaze/kernel/platform.c +0 −29
  164. arch/microblaze/kernel/reset.c +6 −5
  165. arch/microblaze/kernel/syscall_table.S +2 −0
  166. arch/microblaze/kernel/timer.c +0 −7
  167. arch/mips/Kconfig +1 −0
  168. arch/mips/ath79/common.c +1 −1
  169. arch/mips/ath79/mach-pb44.c +1 −1
  170. arch/mips/include/asm/io.h +2 −0
  171. arch/mips/include/uapi/asm/unistd.h +12 −6
  172. arch/mips/kernel/entry.S +8 −0
  173. arch/mips/kernel/mcount.S +12 −15
  174. arch/mips/kernel/process.c +29 −14
  175. arch/mips/kernel/scall32-o32.S +2 −0
  176. arch/mips/kernel/scall64-64.S +2 −0
  177. arch/mips/kernel/scall64-n32.S +2 −0
  178. arch/mips/kernel/scall64-o32.S +2 −0
  179. arch/mips/kernel/signal.c +3 −0
  180. arch/mips/kernel/traps.c +1 −0
  181. arch/mips/mm/ioremap.c +25 −12
  182. arch/mips/pci/pci.c +1 −1
  183. arch/nds32/Kconfig +6 −6
  184. arch/nds32/Makefile +2 −0
  185. arch/nds32/include/asm/cacheflush.h +7 −2
  186. arch/nds32/include/asm/futex.h +1 −1
  187. arch/nds32/kernel/setup.c +2 −1
  188. arch/nds32/mm/cacheflush.c +40 −60
  189. arch/openrisc/include/asm/pgalloc.h +5 −1
  190. arch/openrisc/kernel/entry.S +1 −7
  191. arch/openrisc/kernel/head.S +6 −3
  192. arch/openrisc/kernel/traps.c +1 −1
  193. arch/parisc/Kconfig +4 −5
  194. arch/parisc/Makefile +0 −4
  195. arch/parisc/include/asm/barrier.h +32 −0
  196. arch/parisc/include/asm/signal.h +0 −8
  197. arch/parisc/include/uapi/asm/unistd.h +2 −1
  198. arch/parisc/kernel/drivers.c +9 −16
  199. arch/parisc/kernel/entry.S +2 −0
  200. arch/parisc/kernel/pacache.S +1 −0
  201. arch/parisc/kernel/syscall.S +4 −0
  202. arch/parisc/kernel/syscall_table.S +1 −0
  203. arch/parisc/kernel/unwind.c +2 −2
  204. arch/powerpc/Makefile +2 −0
  205. arch/powerpc/include/asm/book3s/32/pgalloc.h +1 −1
  206. arch/powerpc/include/asm/book3s/64/pgtable-4k.h +21 −0
  207. arch/powerpc/include/asm/book3s/64/pgtable-64k.h +9 −0
  208. arch/powerpc/include/asm/book3s/64/pgtable.h +5 −0
  209. arch/powerpc/include/asm/mmu_context.h +23 −14
  210. arch/powerpc/include/asm/nmi.h +1 −1
  211. arch/powerpc/include/asm/nohash/32/pgalloc.h +1 −1
  212. arch/powerpc/include/asm/nohash/64/pgalloc.h +1 −0
  213. arch/powerpc/include/asm/systbl.h +1 −0
  214. arch/powerpc/include/asm/unistd.h +1 −1
  215. arch/powerpc/include/uapi/asm/unistd.h +1 −0
  216. arch/powerpc/kernel/dt_cpu_ftrs.c +2 −1
  217. arch/powerpc/kernel/idle_book3s.S +2 −0
  218. arch/powerpc/kernel/pci-common.c +3 −1
  219. arch/powerpc/kernel/pci_32.c +0 −4
  220. arch/powerpc/kernel/pci_64.c +0 −4
  221. arch/powerpc/kernel/rtas.c +0 −4
  222. arch/powerpc/kernel/setup-common.c +10 −2
  223. arch/powerpc/kernel/setup_64.c +8 −0
  224. arch/powerpc/kernel/signal.c +2 −2
  225. arch/powerpc/kernel/signal_32.c +0 −8
  226. arch/powerpc/kernel/signal_64.c +0 −4
  227. arch/powerpc/kernel/smp.c +0 −6
  228. arch/powerpc/kernel/stacktrace.c +2 −2
  229. arch/powerpc/kernel/syscalls.c +0 −4
  230. arch/powerpc/kvm/book3s_64_vio.c +1 −1
  231. arch/powerpc/kvm/book3s_64_vio_hv.c +4 −2
  232. arch/powerpc/mm/hugetlbpage.c +2 −1
  233. arch/powerpc/mm/mmu_context_iommu.c +35 −2
  234. arch/powerpc/mm/pgtable-book3s64.c +12 −0
  235. arch/powerpc/mm/subpage-prot.c +0 −4
  236. arch/powerpc/mm/tlb-radix.c +77 −21
  237. arch/powerpc/net/bpf_jit_comp64.c +5 −24
  238. arch/powerpc/platforms/powermac/time.c +20 −9
  239. arch/powerpc/platforms/powernv/pci-ioda.c +2 −1
  240. arch/powerpc/platforms/pseries/setup.c +2 −1
  241. arch/powerpc/xmon/xmon.c +2 −2
  242. arch/riscv/Kconfig +1 −0
  243. arch/riscv/include/uapi/asm/elf.h +7 −2
  244. arch/riscv/kernel/irq.c +0 −4
  245. arch/riscv/kernel/module.c +13 −13
  246. arch/riscv/kernel/ptrace.c +1 −1
  247. arch/riscv/kernel/setup.c +0 −5
  248. arch/riscv/mm/init.c +2 −0
  249. arch/s390/Kconfig +2 −2
  250. arch/s390/include/asm/css_chars.h +32 −30
  251. arch/s390/kernel/compat_wrapper.c +1 −0
  252. arch/s390/kernel/entry.S +6 −2
  253. arch/s390/kernel/signal.c +2 −1
  254. arch/s390/kernel/syscalls/syscall.tbl +2 −0
  255. arch/s390/mm/pgalloc.c +4 −0
  256. arch/s390/net/bpf_jit_comp.c +1 −0
  257. arch/sparc/include/asm/Kbuild +1 −0
  258. arch/sparc/include/asm/msi.h +0 −32
  259. arch/sparc/kernel/time_64.c +1 −1
  260. arch/sparc/mm/srmmu.c +19 −1
  261. arch/x86/Kconfig +1 −1
  262. arch/x86/Makefile +0 −6
  263. arch/x86/boot/compressed/Makefile +6 −2
  264. arch/x86/boot/compressed/eboot.c +3 −9
  265. arch/x86/boot/compressed/pgtable_64.c +55 −18
  266. arch/x86/crypto/aegis128-aesni-asm.S +1 −0
  267. arch/x86/crypto/aegis128-aesni-glue.c +4 −8
  268. arch/x86/crypto/aegis128l-aesni-asm.S +1 −0
  269. arch/x86/crypto/aegis128l-aesni-glue.c +4 −8
  270. arch/x86/crypto/aegis256-aesni-asm.S +1 −0
  271. arch/x86/crypto/aegis256-aesni-glue.c +4 −8
  272. arch/x86/crypto/morus1280-avx2-asm.S +1 −0
  273. arch/x86/crypto/morus1280-avx2-glue.c +3 −7
  274. arch/x86/crypto/morus1280-sse2-asm.S +1 −0
  275. arch/x86/crypto/morus1280-sse2-glue.c +3 −7
  276. arch/x86/crypto/morus640-sse2-asm.S +1 −0
  277. arch/x86/crypto/morus640-sse2-glue.c +3 −7
  278. arch/x86/entry/common.c +1 −1
  279. arch/x86/entry/entry_32.S +1 −1
  280. arch/x86/entry/entry_64.S +4 −14
  281. arch/x86/entry/entry_64_compat.S +8 −8
  282. arch/x86/events/amd/ibs.c +5 −1
  283. arch/x86/events/intel/core.c +3 −0
  284. arch/x86/events/intel/ds.c +16 −17
  285. arch/x86/events/intel/uncore.h +1 −1
  286. arch/x86/events/intel/uncore_snbep.c +7 −3
  287. arch/x86/hyperv/hv_apic.c +5 −0
  288. arch/x86/hyperv/hv_init.c +4 −1
  289. arch/x86/include/asm/apm.h +0 −6
  290. arch/x86/include/asm/asm.h +59 −0
  291. arch/x86/include/asm/barrier.h +1 −1
  292. arch/x86/include/asm/irqflags.h +1 −1
  293. arch/x86/include/asm/mshyperv.h +4 −1
  294. arch/x86/include/asm/pgalloc.h +3 −0
  295. arch/x86/include/asm/pgtable.h +1 −1
  296. arch/x86/include/asm/pgtable_64.h +2 −2
  297. arch/x86/include/asm/qspinlock_paravirt.h +1 −1
  298. arch/x86/include/asm/uaccess_64.h +6 −1
  299. arch/x86/include/asm/vmx.h +3 −0
  300. arch/x86/kernel/Makefile +1 −0
  301. arch/x86/kernel/apic/apic.c +3 −0
  302. arch/x86/kernel/apic/x2apic_uv_x.c +57 −3
  303. arch/x86/kernel/apm_32.c +5 −0
  304. arch/x86/kernel/cpu/amd.c +3 −1
  305. arch/x86/kernel/cpu/bugs.c +9 −3
  306. arch/x86/kernel/cpu/cacheinfo.c +1 −1
  307. arch/x86/kernel/cpu/common.c +3 −0
  308. arch/x86/kernel/cpu/mcheck/mce-severity.c +5 −0
  309. arch/x86/kernel/cpu/mcheck/mce.c +28 −19
  310. arch/x86/kernel/cpu/microcode/intel.c +4 −1
  311. arch/x86/kernel/cpu/mtrr/if.c +2 −1
  312. arch/x86/kernel/e820.c +12 −3
  313. arch/x86/kernel/head64.c +1 −1
  314. arch/x86/kernel/irqflags.S +26 −0
  315. arch/x86/kernel/kvmclock.c +6 −6
  316. arch/x86/kernel/quirks.c +9 −2
  317. arch/x86/kernel/signal.c +1 −1
  318. arch/x86/kernel/smpboot.c +5 −0
  319. arch/x86/kernel/traps.c +8 −6
  320. arch/x86/kernel/uprobes.c +1 −1
  321. arch/x86/kvm/Kconfig +1 −1
  322. arch/x86/kvm/mmu.c +1 −1
  323. arch/x86/kvm/vmx.c +119 −31
  324. arch/x86/kvm/x86.c +3 −1
  325. arch/x86/kvm/x86.h +9 −0
  326. arch/x86/mm/fault.c +7 −14
  327. arch/x86/mm/init_64.c +16 −4
  328. arch/x86/net/bpf_jit_comp32.c +4 −4
  329. arch/x86/platform/efi/efi_64.c +3 −3
  330. arch/x86/purgatory/Makefile +1 −1
  331. arch/x86/um/mem_32.c +1 −1
  332. arch/x86/xen/enlighten.c +7 −0
  333. arch/x86/xen/enlighten_pv.c +13 −13
  334. arch/x86/xen/enlighten_pvh.c +1 −0
  335. arch/x86/xen/irq.c +1 −3
  336. arch/x86/xen/smp_pv.c +5 −0
  337. block/bio.c +41 −16
  338. block/blk-core.c +8 −9
  339. block/blk-mq-debugfs.c +1 −1
  340. block/blk-mq-tag.c +1 −1
  341. block/blk-mq.c +13 −4
  342. block/blk-softirq.c +1 −0
  343. block/blk-timeout.c +1 −0
  344. block/bsg.c +0 −2
  345. block/sed-opal.c +2 −2
  346. certs/blacklist.h +1 −1
  347. crypto/af_alg.c +13 −4
  348. crypto/algif_aead.c +2 −2
  349. crypto/algif_skcipher.c +2 −2
  350. crypto/asymmetric_keys/x509_cert_parser.c +9 −0
  351. crypto/morus640.c +2 −1
  352. crypto/sha3_generic.c +1 −1
  353. drivers/acpi/acpi_lpss.c +13 −1
  354. drivers/acpi/acpica/hwsleep.c +11 −4
  355. drivers/acpi/acpica/psloop.c +31 −0
  356. drivers/acpi/acpica/uterror.c +3 −3
  357. drivers/acpi/battery.c +5 −4
  358. drivers/acpi/ec.c +20 −0
  359. drivers/acpi/nfit/core.c +37 −11
  360. drivers/acpi/nfit/nfit.h +1 −0
  361. drivers/acpi/osl.c +72 −0
  362. drivers/acpi/pptt.c +8 −2
  363. drivers/ata/Kconfig +0 −2
  364. drivers/ata/ahci.c +60 −0
  365. drivers/ata/ahci_mvebu.c +1 −1
  366. drivers/ata/libahci.c +5 −2
  367. drivers/ata/libata-core.c +3 −0
  368. drivers/ata/libata-eh.c +16 −25
  369. drivers/ata/libata-scsi.c +12 −6
  370. drivers/ata/sata_fsl.c +1 −8
  371. drivers/ata/sata_nv.c +0 −3
  372. drivers/atm/iphase.c +1 −1
  373. drivers/atm/zatm.c +2 −0
  374. drivers/base/Makefile +0 −3
  375. drivers/base/core.c +11 −4
  376. drivers/base/dd.c +0 −8
  377. drivers/base/power/domain.c +12 −11
  378. drivers/block/drbd/drbd_req.c +2 −2
  379. drivers/block/drbd/drbd_worker.c +1 −1
  380. drivers/block/loop.c +1 −0
  381. drivers/block/nbd.c +113 −25
  382. drivers/block/null_blk.c +1 −1
  383. drivers/block/zram/zram_drv.c +14 −1
  384. drivers/bluetooth/hci_nokia.c +1 −1
  385. drivers/bus/ti-sysc.c +4 −4
  386. drivers/char/agp/alpha-agp.c +1 −1
  387. drivers/char/agp/amd64-agp.c +2 −2
  388. drivers/char/hw_random/core.c +9 −2
  389. drivers/char/ipmi/ipmi_si_intf.c +4 −2
  390. drivers/char/ipmi/kcs_bmc.c +10 −21
  391. drivers/char/mem.c +1 −0
  392. drivers/char/random.c +22 −17
  393. drivers/clk/Makefile +1 −1
  394. drivers/clk/clk-aspeed.c +44 −15
  395. drivers/clk/clk.c +1 −2
  396. drivers/clk/davinci/da8xx-cfgchip.c +1 −1
  397. drivers/clk/davinci/psc.h +1 −1
  398. drivers/clk/meson/clk-audio-divider.c +1 −1
  399. drivers/clk/meson/gxbb.c +1 −0
  400. drivers/clk/mvebu/armada-37xx-periph.c +38 −0
  401. drivers/clk/qcom/gcc-msm8996.c +1 −0
  402. drivers/clk/qcom/mmcc-msm8996.c +1 −0
  403. drivers/clk/sunxi-ng/Makefile +15 −24
  404. drivers/clocksource/arm_arch_timer.c +1 −1
  405. drivers/clocksource/timer-stm32.c +3 −1
  406. drivers/cpufreq/intel_pstate.c +53 −8
  407. drivers/cpufreq/pcc-cpufreq.c +4 −0
  408. drivers/cpufreq/qcom-cpufreq-kryo.c +27 −7
  409. drivers/crypto/chelsio/chtls/chtls_io.c +2 −3
  410. drivers/crypto/padlock-aes.c +6 −2
  411. drivers/dax/device.c +8 −4
  412. drivers/dax/super.c +8 −0
  413. drivers/dma/k3dma.c +1 −1
  414. drivers/dma/pl330.c +1 −1
  415. drivers/dma/ti/omap-dma.c +5 −1
  416. drivers/firmware/dmi-id.c +2 −0
  417. drivers/firmware/dmi_scan.c +1 −0
  418. drivers/firmware/efi/libstub/tpm.c +1 −1
  419. drivers/fpga/altera-cvp.c +4 −2
  420. drivers/gpio/gpio-uniphier.c +5 −1
  421. drivers/gpio/gpiolib-acpi.c +55 −1
  422. drivers/gpio/gpiolib-of.c +2 −1
  423. drivers/gpu/drm/amd/amdgpu/amdgpu.h +8 −38
  424. drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c +37 −10
  425. drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +108 −23
  426. drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c +7 −0
  427. drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +4 −0
  428. drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +12 −1
  429. drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +1 −1
  430. drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +6 −6
  431. drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +10 −14
  432. drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +1 −1
  433. drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +1 −0
  434. drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +7 −7
  435. drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h +1 −1
  436. drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +27 −6
  437. drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +8 −4
  438. drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +36 −3
  439. drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +2 −2
  440. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +55 −10
  441. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +8 −12
  442. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c +3 −2
  443. drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c +3 −7
  444. drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +3 −5
  445. drivers/gpu/drm/amd/display/dc/dc.h +1 −0
  446. drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c +25 −2
  447. drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +16 −3
  448. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +2 −0
  449. drivers/gpu/drm/amd/display/dc/inc/dc_link_ddc.h +2 −3
  450. drivers/gpu/drm/amd/include/atomfirmware.h +4 −1
  451. drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c +84 −12
  452. drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.h +5 −0
  453. drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c +1 −1
  454. drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +4 −0
  455. drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.h +3 −0
  456. drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c +2 −0
  457. drivers/gpu/drm/amd/powerplay/inc/vega12/smu9_driver_if.h +4 −1
  458. drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +12 −11
  459. drivers/gpu/drm/arm/malidp_drv.c +2 −1
  460. drivers/gpu/drm/arm/malidp_hw.c +2 −1
  461. drivers/gpu/drm/arm/malidp_planes.c +6 −3
  462. drivers/gpu/drm/armada/armada_crtc.c +10 −2
  463. drivers/gpu/drm/armada/armada_hw.h +1 −0
  464. drivers/gpu/drm/armada/armada_overlay.c +22 −8
  465. drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +1 −1
  466. drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +12 −0
  467. drivers/gpu/drm/bridge/sil-sii8620.c +157 −208
  468. drivers/gpu/drm/drm_atomic_helper.c +5 −3
  469. drivers/gpu/drm/drm_context.c +1 −1
  470. drivers/gpu/drm/drm_drv.c +7 −7
  471. drivers/gpu/drm/drm_lease.c +1 −15
  472. drivers/gpu/drm/drm_property.c +3 −3
  473. drivers/gpu/drm/etnaviv/etnaviv_drv.c +20 −4
  474. drivers/gpu/drm/etnaviv/etnaviv_gpu.h +3 −0
  475. drivers/gpu/drm/etnaviv/etnaviv_sched.c +24 −0
  476. drivers/gpu/drm/exynos/exynos5433_drm_decon.c +3 −3
  477. drivers/gpu/drm/exynos/exynos_drm_drv.c +2 −2
  478. drivers/gpu/drm/exynos/exynos_drm_fb.c +1 −1
  479. drivers/gpu/drm/exynos/exynos_drm_fimc.c +10 −7
  480. drivers/gpu/drm/exynos/exynos_drm_gem.c +5 −5
  481. drivers/gpu/drm/exynos/exynos_drm_gsc.c +31 −20
  482. drivers/gpu/drm/exynos/exynos_drm_ipp.c +58 −52
  483. drivers/gpu/drm/exynos/exynos_drm_plane.c +1 −1
  484. drivers/gpu/drm/exynos/exynos_drm_rotator.c +2 −2
  485. drivers/gpu/drm/exynos/exynos_drm_scaler.c +35 −9
  486. drivers/gpu/drm/exynos/regs-gsc.h +1 −0
  487. drivers/gpu/drm/i915/gvt/cmd_parser.c +23 −0
  488. drivers/gpu/drm/i915/gvt/display.c +3 −3
  489. drivers/gpu/drm/i915/gvt/gtt.c +58 −0
  490. drivers/gpu/drm/i915/gvt/gtt.h +2 −0
  491. drivers/gpu/drm/i915/gvt/gvt.h +29 −0
  492. drivers/gpu/drm/i915/gvt/handlers.c +24 −0
  493. drivers/gpu/drm/i915/gvt/mmio.h +2 −0
  494. drivers/gpu/drm/i915/gvt/mmio_context.c +3 −1
  495. drivers/gpu/drm/i915/i915_drv.h +15 −10
  496. drivers/gpu/drm/i915/i915_gem.c +57 −28
  497. drivers/gpu/drm/i915/i915_gem_context.c +1 −1
  498. drivers/gpu/drm/i915/i915_gem_execbuffer.c +27 −22
  499. drivers/gpu/drm/i915/i915_irq.c +40 −4
  500. drivers/gpu/drm/i915/i915_reg.h +5 −0
  501. drivers/gpu/drm/i915/i915_vma.c +1 −1
  502. drivers/gpu/drm/i915/intel_crt.c +20 −0
  503. drivers/gpu/drm/i915/intel_ddi.c +11 −2
  504. drivers/gpu/drm/i915/intel_display.c +33 −4
  505. drivers/gpu/drm/i915/intel_dp.c +16 −18
  506. drivers/gpu/drm/i915/intel_dp_mst.c +6 −0
  507. drivers/gpu/drm/i915/intel_drv.h +1 −2
  508. drivers/gpu/drm/i915/intel_dsi.c +6 −0
  509. drivers/gpu/drm/i915/intel_dvo.c +6 −0
  510. drivers/gpu/drm/i915/intel_hdmi.c +6 −0
  511. drivers/gpu/drm/i915/intel_lrc.c +13 −5
  512. drivers/gpu/drm/i915/intel_lvds.c +5 −0
  513. drivers/gpu/drm/i915/intel_sdvo.c +6 −0
  514. drivers/gpu/drm/i915/intel_tv.c +10 −2
  515. drivers/gpu/drm/imx/imx-ldb.c +6 −3
  516. drivers/gpu/drm/meson/meson_drv.c +8 −4
  517. drivers/gpu/drm/nouveau/dispnv04/disp.c +3 −0
  518. drivers/gpu/drm/nouveau/dispnv50/curs507a.c +1 −1
  519. drivers/gpu/drm/nouveau/dispnv50/disp.c +27 −26
  520. drivers/gpu/drm/nouveau/dispnv50/wndw.c +8 −5
  521. drivers/gpu/drm/nouveau/nouveau_backlight.c +4 −2
  522. drivers/gpu/drm/nouveau/nouveau_connector.c +7 −2
  523. drivers/gpu/drm/nouveau/nouveau_connector.h +32 −4
  524. drivers/gpu/drm/nouveau/nouveau_display.c +8 −2
  525. drivers/gpu/drm/nouveau/nouveau_drm.c +7 −11
  526. drivers/gpu/drm/nouveau/nouveau_gem.c +2 −2
  527. drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c +3 −0
  528. drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp100.c +9 −0
  529. drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp102.c +1 −0
  530. drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h +2 −0
  531. drivers/gpu/drm/qxl/qxl_display.c +5 −2
  532. drivers/gpu/drm/sun4i/Makefile +4 −1
  533. drivers/gpu/drm/sun4i/sun4i_tcon.c +0 −25
  534. drivers/gpu/drm/tegra/drm.c +1 −1
  535. drivers/gpu/drm/udl/udl_fb.c +4 −1
  536. drivers/gpu/drm/udl/udl_transfer.c +7 −4
  537. drivers/gpu/drm/vc4/vc4_plane.c +3 −0
  538. drivers/gpu/host1x/dev.c +3 −0
  539. drivers/gpu/host1x/job.c +2 −1
  540. drivers/gpu/ipu-v3/ipu-csi.c +2 −1
  541. drivers/hid/hid-core.c +4 −1
  542. drivers/hid/hid-debug.c +7 −1
  543. drivers/hid/hid-google-hammer.c +2 −0
  544. drivers/hid/hid-ids.h +1 −0
  545. drivers/hid/hid-steam.c +5 −5
  546. drivers/hid/i2c-hid/i2c-hid.c +1 −1
  547. drivers/hid/intel-ish-hid/ipc/pci-ish.c +7 −15
  548. drivers/hid/usbhid/hiddev.c +11 −0
  549. drivers/hid/wacom_sys.c +8 −0
  550. drivers/hid/wacom_wac.c +8 −2
  551. drivers/hwmon/dell-smm-hwmon.c +7 −0
  552. drivers/hwmon/nct6775.c +1 −1
  553. drivers/i2c/algos/i2c-algo-bit.c +4 −4
  554. drivers/i2c/busses/i2c-cht-wc.c +2 −1
  555. drivers/i2c/busses/i2c-davinci.c +6 −2
  556. drivers/i2c/busses/i2c-gpio.c +2 −2
  557. drivers/i2c/busses/i2c-imx.c +2 −3
  558. drivers/i2c/busses/i2c-rcar.c +51 −3
  559. drivers/i2c/busses/i2c-stu300.c +1 −1
  560. drivers/i2c/busses/i2c-tegra.c +8 −9
  561. drivers/i2c/busses/i2c-xlp9xx.c +28 −13
  562. drivers/i2c/i2c-core-base.c +11 −2
  563. drivers/i2c/i2c-core-smbus.c +9 −5
  564. drivers/i2c/i2c-mux.c +2 −2
  565. drivers/iio/accel/mma8452.c +1 −1
  566. drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +2 −0
  567. drivers/iio/light/tsl2772.c +2 −0
  568. drivers/iio/pressure/bmp280-core.c +2 −3
  569. drivers/infiniband/core/uverbs_cmd.c +71 −15
  570. drivers/infiniband/core/verbs.c +8 −6
  571. drivers/infiniband/hw/cxgb4/mem.c +1 −1
  572. drivers/infiniband/hw/hfi1/rc.c +1 −1
  573. drivers/infiniband/hw/hfi1/uc.c +2 −2
  574. drivers/infiniband/hw/hfi1/ud.c +2 −2
  575. drivers/infiniband/hw/hfi1/verbs_txreq.c +2 −2
  576. drivers/infiniband/hw/hfi1/verbs_txreq.h +2 −2
  577. drivers/infiniband/hw/mlx4/mr.c +5 −2
  578. drivers/infiniband/hw/mlx5/main.c +22 −16
  579. drivers/infiniband/hw/mlx5/srq.c +12 −6
  580. drivers/infiniband/hw/qedr/verbs.c +3 −0
  581. drivers/infiniband/sw/rxe/rxe_req.c +4 −1
  582. drivers/input/input-mt.c +8 −4
  583. drivers/input/joystick/xpad.c +1 −1
  584. drivers/input/keyboard/goldfish_events.c +5 −4
  585. drivers/input/misc/Kconfig +10 −0
  586. drivers/input/misc/Makefile +1 −0
  587. drivers/input/misc/sc27xx-vibra.c +154 −0
  588. drivers/input/mouse/elan_i2c.h +2 −0
  589. drivers/input/mouse/elan_i2c_core.c +4 −1
  590. drivers/input/mouse/elan_i2c_smbus.c +8 −2
  591. drivers/input/mouse/elantech.c +9 −2
  592. drivers/input/mouse/psmouse-base.c +6 −6
  593. drivers/input/rmi4/Kconfig +1 −0
  594. drivers/input/rmi4/rmi_2d_sensor.c +16 −18
  595. drivers/input/rmi4/rmi_bus.c +49 −1
  596. drivers/input/rmi4/rmi_bus.h +9 −1
  597. drivers/input/rmi4/rmi_driver.c +20 −32
  598. drivers/input/rmi4/rmi_f01.c +5 −5
  599. drivers/input/rmi4/rmi_f03.c +5 −4
  600. drivers/input/rmi4/rmi_f11.c +16 −26
  601. drivers/input/rmi4/rmi_f12.c +4 −4
  602. drivers/input/rmi4/rmi_f30.c +5 −4
  603. drivers/input/rmi4/rmi_f34.c +3 −2
  604. drivers/input/rmi4/rmi_f54.c +0 −6
  605. drivers/input/serio/i8042-x86ia64io.h +7 −0
  606. drivers/input/touchscreen/silead.c +1 −0
  607. drivers/iommu/Kconfig +0 −1
  608. drivers/iommu/intel-iommu.c +76 −18
  609. drivers/irqchip/irq-gic-v2m.c +1 −1
  610. drivers/irqchip/irq-gic-v3-its.c +50 −12
  611. drivers/irqchip/irq-ls-scfg-msi.c +7 −3
  612. drivers/isdn/mISDN/socket.c +1 −1
  613. drivers/lightnvm/Kconfig +1 −1
  614. drivers/md/dm-raid.c +1 −1
  615. drivers/md/dm-table.c +4 −3
  616. drivers/md/dm-thin-metadata.c +0 −9
  617. drivers/md/dm-thin.c +9 −2
  618. drivers/md/dm-writecache.c +34 −19
  619. drivers/md/dm-zoned-target.c +1 −1
  620. drivers/md/dm.c +3 −5
  621. drivers/md/md.c +5 −3
  622. drivers/md/raid10.c +7 −0
  623. drivers/media/platform/vsp1/vsp1_drm.c +1 −3
  624. drivers/media/rc/bpf-lirc.c +3 −12
  625. drivers/media/rc/rc-ir-raw.c +4 −4
  626. drivers/media/rc/rc-main.c +10 −2
  627. drivers/misc/cxl/api.c +4 −4
  628. drivers/misc/ibmasm/ibmasmfs.c +3 −24
  629. drivers/misc/mei/interrupt.c +4 −1
  630. drivers/misc/vmw_balloon.c +2 −2
  631. drivers/mmc/core/slot-gpio.c +1 −1
  632. drivers/mmc/host/dw_mmc.c +4 −3
  633. drivers/mmc/host/mxcmmc.c +2 −1
  634. drivers/mmc/host/renesas_sdhi_internal_dmac.c +7 −8
  635. drivers/mmc/host/sdhci-esdhc-imx.c +9 −12
  636. drivers/mmc/host/sunxi-mmc.c +7 −0
  637. drivers/mtd/chips/cfi_cmdset_0002.c +11 −8
  638. drivers/mtd/devices/mtd_dataflash.c +2 −2
  639. drivers/mtd/nand/raw/denali_dt.c +5 −1
  640. drivers/mtd/nand/raw/mxc_nand.c +4 −1
  641. drivers/mtd/nand/raw/nand_base.c +1 −1
  642. drivers/mtd/nand/raw/nand_macronix.c +36 −12
  643. drivers/mtd/nand/raw/nand_micron.c +2 −0
  644. drivers/mtd/spi-nor/cadence-quadspi.c +4 −2
  645. drivers/net/bonding/bond_main.c +12 −2
  646. drivers/net/bonding/bond_options.c +14 −9
  647. drivers/net/can/m_can/m_can.c +9 −9
  648. drivers/net/can/mscan/mpc5xxx_can.c +5 −0
  649. drivers/net/can/peak_canfd/peak_pciefd_main.c +19 −0
  650. drivers/net/can/usb/ems_usb.c +1 −0
  651. drivers/net/can/xilinx_can.c +288 −104
  652. drivers/net/dsa/mv88e6xxx/chip.c +15 −10
  653. drivers/net/ethernet/3com/Kconfig +1 −1
  654. drivers/net/ethernet/amazon/ena/ena_com.c +1 −0
  655. drivers/net/ethernet/amd/Kconfig +3 −3
  656. drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +2 −2
  657. drivers/net/ethernet/apm/xgene-v2/Kconfig +0 −1
  658. drivers/net/ethernet/apm/xgene/Kconfig +0 −1
  659. drivers/net/ethernet/aquantia/atlantic/aq_cfg.h +0 −2
  660. drivers/net/ethernet/aquantia/atlantic/aq_hw.h +3 −1
  661. drivers/net/ethernet/aquantia/atlantic/aq_main.c +2 −9
  662. drivers/net/ethernet/aquantia/atlantic/aq_nic.c +27 −20
  663. drivers/net/ethernet/aquantia/atlantic/aq_nic.h +1 −1
  664. drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c +1 −1
  665. drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c +3 −3
  666. drivers/net/ethernet/arc/Kconfig +4 −2
  667. drivers/net/ethernet/atheros/alx/main.c +7 −1
  668. drivers/net/ethernet/atheros/atl1c/atl1c_main.c +1 −0
  669. drivers/net/ethernet/broadcom/Kconfig +0 −2
  670. drivers/net/ethernet/broadcom/bcmsysport.c +2 −2
  671. drivers/net/ethernet/broadcom/bcmsysport.h +2 −1
  672. drivers/net/ethernet/broadcom/bnx2x/bnx2x.h +1 −0
  673. drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +6 −0
  674. drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +10 −3
  675. drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +6 −0
  676. drivers/net/ethernet/broadcom/bnxt/bnxt.c +17 −7
  677. drivers/net/ethernet/broadcom/bnxt/bnxt.h +0 −1
  678. drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c +27 −3
  679. drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c +0 −2
  680. drivers/net/ethernet/broadcom/cnic.c +1 −1
  681. drivers/net/ethernet/broadcom/tg3.c +13 −0
  682. drivers/net/ethernet/broadcom/tg3.h +2 −0
  683. drivers/net/ethernet/cadence/macb.h +11 −0
  684. drivers/net/ethernet/cadence/macb_main.c +27 −11
  685. drivers/net/ethernet/cadence/macb_ptp.c +1 −4
  686. drivers/net/ethernet/calxeda/Kconfig +1 −1
  687. drivers/net/ethernet/cavium/Kconfig +6 −6
  688. drivers/net/ethernet/cavium/liquidio/lio_main.c +4 −1
  689. drivers/net/ethernet/cavium/octeon/octeon_mgmt.c +11 −3
  690. drivers/net/ethernet/cavium/thunder/thunder_bgx.c +2 −0
  691. drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +2 −0
  692. drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c +2 −4
  693. drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +3 −1
  694. drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +13 −22
  695. drivers/net/ethernet/cirrus/Kconfig +1 −0
  696. drivers/net/ethernet/cisco/enic/enic_clsf.c +1 −2
  697. drivers/net/ethernet/cisco/enic/enic_main.c +34 −58
  698. drivers/net/ethernet/faraday/ftgmac100.c +2 −2
  699. drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +8 −7
  700. drivers/net/ethernet/freescale/fman/fman_port.c +8 −0
  701. drivers/net/ethernet/hisilicon/Kconfig +1 −1
  702. drivers/net/ethernet/huawei/hinic/hinic_main.c +1 −0
  703. drivers/net/ethernet/huawei/hinic/hinic_rx.c +1 −0
  704. drivers/net/ethernet/huawei/hinic/hinic_tx.c +1 −0
  705. drivers/net/ethernet/ibm/ibmvnic.c +29 −14
  706. drivers/net/ethernet/intel/i40e/i40e_txrx.c +18 −13
  707. drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +11 −1
  708. drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c +1 −1
  709. drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +14 −10
  710. drivers/net/ethernet/marvell/Kconfig +3 −5
  711. drivers/net/ethernet/marvell/mvneta.c +1 −1
  712. drivers/net/ethernet/mellanox/mlx4/en_rx.c +6 −2
  713. drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +1 −1
  714. drivers/net/ethernet/mellanox/mlx5/core/alloc.c +1 −1
  715. drivers/net/ethernet/mellanox/mlx5/core/cmd.c +4 −4
  716. drivers/net/ethernet/mellanox/mlx5/core/en.h +0 −2
  717. drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c +5 −2
  718. drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c +21 −28
  719. drivers/net/ethernet/mellanox/mlx5/core/en_main.c +8 −7
  720. drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +6 −2
  721. drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +8 −4
  722. drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +8 −10
  723. drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +2 −2
  724. drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +3 −2
  725. drivers/net/ethernet/mellanox/mlx5/core/fw.c +3 −2
  726. drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c +4 −0
  727. drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c +10 −2
  728. drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c +5 −4
  729. drivers/net/ethernet/mellanox/mlx5/core/port.c +2 −2
  730. drivers/net/ethernet/mellanox/mlx5/core/sriov.c +6 −1
  731. drivers/net/ethernet/mellanox/mlx5/core/vport.c +0 −2
  732. drivers/net/ethernet/mellanox/mlx5/core/wq.c +22 −12
  733. drivers/net/ethernet/mellanox/mlxsw/Kconfig +1 −1
  734. drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c +29 −22
  735. drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +24 −24
  736. drivers/net/ethernet/mscc/ocelot.c +6 −5
  737. drivers/net/ethernet/netronome/nfp/bpf/main.c +6 −3
  738. drivers/net/ethernet/netronome/nfp/flower/main.c +3 −1
  739. drivers/net/ethernet/netronome/nfp/flower/match.c +14 −0
  740. drivers/net/ethernet/netronome/nfp/flower/offload.c +11 −0
  741. drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c +1 −1
  742. drivers/net/ethernet/netronome/nfp/nfp_main.c +1 −5
  743. drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nffw.c +1 −1
  744. drivers/net/ethernet/qlogic/qed/qed.h +1 −0
  745. drivers/net/ethernet/qlogic/qed/qed_dcbx.c +8 −11
  746. drivers/net/ethernet/qlogic/qed/qed_debug.c +1 −1
  747. drivers/net/ethernet/qlogic/qed/qed_dev.c +1 −1
  748. drivers/net/ethernet/qlogic/qed/qed_l2.c +7 −8
  749. drivers/net/ethernet/qlogic/qed/qed_l2.h +1 −1
  750. drivers/net/ethernet/qlogic/qed/qed_ll2.c +9 −2
  751. drivers/net/ethernet/qlogic/qed/qed_main.c +19 −3
  752. drivers/net/ethernet/qlogic/qed/qed_mcp.c +37 −15
  753. drivers/net/ethernet/qlogic/qed/qed_sriov.c +18 −3
  754. drivers/net/ethernet/qlogic/qed/qed_vf.c +2 −2
  755. drivers/net/ethernet/qlogic/qed/qed_vf.h +6 −1
  756. drivers/net/ethernet/qlogic/qede/qede_ptp.c +8 −2
  757. drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c +2 −0
  758. drivers/net/ethernet/qualcomm/qca_spi.c +12 −9
  759. drivers/net/ethernet/realtek/r8169.c +3 −3
  760. drivers/net/ethernet/renesas/Kconfig +0 −2
  761. drivers/net/ethernet/renesas/ravb_main.c +17 −76
  762. drivers/net/ethernet/renesas/sh_eth.c +17 −77
  763. drivers/net/ethernet/sfc/ef10.c +21 −9
  764. drivers/net/ethernet/sfc/efx.c +9 −9
  765. drivers/net/ethernet/sfc/farch.c +1 −0
  766. drivers/net/ethernet/stmicro/stmmac/Kconfig +1 −1
  767. drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c +14 −4
  768. drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +1 −1
  769. drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c +12 −0
  770. drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h +2 −0
  771. drivers/net/ethernet/stmicro/stmmac/hwif.h +3 −0
  772. drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +13 −1
  773. drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c +38 −2
  774. drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +0 −1
  775. drivers/net/ethernet/sun/sungem.c +12 −10
  776. drivers/net/ethernet/ti/cpsw.c +11 −14
  777. drivers/net/ethernet/ti/cpsw_ale.c +1 −1
  778. drivers/net/ethernet/ti/davinci_cpdma.c +1 −1
  779. drivers/net/ethernet/ti/davinci_emac.c +17 −2
  780. drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c +1 −0
  781. drivers/net/geneve.c +1 −1
  782. drivers/net/hamradio/bpqether.c +2 −6
  783. drivers/net/hyperv/hyperv_net.h +1 −1
  784. drivers/net/hyperv/netvsc.c +46 −8
  785. drivers/net/hyperv/netvsc_drv.c +16 −1
  786. drivers/net/hyperv/rndis_filter.c +13 −49
  787. drivers/net/ieee802154/adf7242.c +32 −2
  788. drivers/net/ieee802154/at86rf230.c +5 −10
  789. drivers/net/ieee802154/fakelb.c +1 −1
  790. drivers/net/ieee802154/mcr20a.c +2 −1
  791. drivers/net/ipvlan/ipvlan_main.c +31 −9
  792. drivers/net/net_failover.c +1 −1
  793. drivers/net/netdevsim/devlink.c +1 −0
  794. drivers/net/phy/dp83tc811.c +1 −1
  795. drivers/net/phy/marvell.c +36 −18
  796. drivers/net/phy/mdio-mux-bcm-iproc.c +1 −1
  797. drivers/net/phy/phy.c +1 −1
  798. drivers/net/phy/phy_device.c +2 −5
  799. drivers/net/phy/sfp-bus.c +26 −9
  800. drivers/net/ppp/pppoe.c +1 −1
  801. drivers/net/tun.c +1 −1
  802. drivers/net/usb/asix_devices.c +3 −1
  803. drivers/net/usb/cdc_ncm.c +1 −2
  804. drivers/net/usb/lan78xx.c +40 −4
  805. drivers/net/usb/qmi_wwan.c +2 −0
  806. drivers/net/usb/r8152.c +2 −1
  807. drivers/net/usb/rtl8150.c +1 −1
  808. drivers/net/usb/smsc75xx.c +62 −0
  809. drivers/net/virtio_net.c +38 −25
  810. drivers/net/vxlan.c +88 −42
  811. drivers/net/wan/lmc/lmc_main.c +1 −1
  812. drivers/net/wireless/ath/ath10k/mac.c +14 −2
  813. drivers/net/wireless/ath/ath10k/wmi.h +1 −0
  814. drivers/net/wireless/ath/wcn36xx/testmode.c +1 −1
  815. drivers/net/wireless/broadcom/brcm80211/Kconfig +0 −1
  816. drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +2 −1
  817. drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +7 −0
  818. drivers/net/wireless/intel/iwlwifi/cfg/9000.c +69 −0
  819. drivers/net/wireless/intel/iwlwifi/iwl-config.h +5 −0
  820. drivers/net/wireless/intel/iwlwifi/pcie/drv.c +22 −0
  821. drivers/net/wireless/marvell/mwifiex/usb.c +2 −5
  822. drivers/net/wireless/mediatek/mt7601u/phy.c +4 −2
  823. drivers/net/wireless/quantenna/qtnfmac/Kconfig +1 −1
  824. drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +1 −2
  825. drivers/net/wireless/realtek/rtlwifi/base.c +10 −7
  826. drivers/net/wireless/realtek/rtlwifi/base.h +1 −1
  827. drivers/net/wireless/realtek/rtlwifi/core.c +1 −2
  828. drivers/net/wireless/realtek/rtlwifi/pci.c +1 −1
  829. drivers/net/wireless/realtek/rtlwifi/ps.c +2 −2
  830. drivers/net/wireless/realtek/rtlwifi/usb.c +1 −1
  831. drivers/net/xen-netfront.c +16 −9
  832. drivers/nfc/pn533/usb.c +2 −2
  833. drivers/nvdimm/claim.c +1 −0
  834. drivers/nvdimm/pmem.c +2 −1
  835. drivers/nvme/host/core.c +35 −29
  836. drivers/nvme/host/fabrics.c +7 −3
  837. drivers/nvme/host/fabrics.h +2 −1
  838. drivers/nvme/host/fc.c +4 −4
  839. drivers/nvme/host/nvme.h +1 −0
  840. drivers/nvme/host/pci.c +41 −7
  841. drivers/nvme/host/rdma.c +41 −37
  842. drivers/nvme/target/configfs.c +7 −2
  843. drivers/nvme/target/core.c +9 −1
  844. drivers/nvme/target/fc.c +35 −9
  845. drivers/nvme/target/loop.c +1 −1
  846. drivers/nvmem/core.c +4 −0
  847. drivers/of/base.c +3 −3
  848. drivers/of/of_private.h +2 −0
  849. drivers/of/overlay.c +11 −0
  850. drivers/opp/core.c +1 −1
  851. drivers/pci/Makefile +3 −3
  852. drivers/pci/bus.c +3 −3
  853. drivers/pci/controller/Kconfig +0 −3
  854. drivers/pci/controller/dwc/Kconfig +0 −1
  855. drivers/pci/controller/dwc/pcie-designware-host.c +2 −1
  856. drivers/pci/controller/pci-aardvark.c +1 −1
  857. drivers/pci/controller/pci-ftpci100.c +3 −1
  858. drivers/pci/controller/pci-hyperv.c +5 −3
  859. drivers/pci/controller/pci-v3-semi.c +1 −1
  860. drivers/pci/controller/pci-versatile.c +1 −1
  861. drivers/pci/controller/pci-xgene.c +1 −1
  862. drivers/pci/controller/pcie-mediatek.c +1 −1
  863. drivers/pci/controller/pcie-mobiveil.c +1 −1
  864. drivers/pci/controller/pcie-rcar.c +13 −3
  865. drivers/pci/controller/pcie-xilinx-nwl.c +1 −1
  866. drivers/pci/controller/pcie-xilinx.c +1 −0
  867. drivers/pci/endpoint/pci-epf-core.c +43 −19
  868. drivers/pci/hotplug/acpi_pcihp.c +9 −1
  869. drivers/pci/hotplug/acpiphp_glue.c +1 −1
  870. drivers/pci/iov.c +16 −0
  871. drivers/pci/of.c +1 −1
  872. drivers/pci/pci-acpi.c +12 −0
  873. drivers/pci/pci-driver.c +1 −0
  874. drivers/pci/pci.c +38 −0
  875. drivers/pci/pci.h +15 −0
  876. drivers/pci/pcie/err.c +2 −0
  877. drivers/pci/probe.c +2 −2
  878. drivers/pci/remove.c +3 −2
  879. drivers/perf/xgene_pmu.c +1 −1
  880. drivers/phy/broadcom/phy-brcm-usb-init.c +4 −0
  881. drivers/phy/motorola/phy-mapphone-mdm6600.c +2 −2
  882. drivers/pinctrl/actions/pinctrl-owl.c +1 −1
  883. drivers/pinctrl/bcm/pinctrl-nsp-mux.c +4 −2
  884. drivers/pinctrl/devicetree.c +5 −2
  885. drivers/pinctrl/mediatek/pinctrl-mt7622.c +38 −16
  886. drivers/pinctrl/mediatek/pinctrl-mtk-common.c +0 −5
  887. drivers/pinctrl/pinctrl-ingenic.c +1 −1
  888. drivers/pinctrl/pinctrl-single.c +11 −3
  889. drivers/pinctrl/sh-pfc/pfc-r8a77970.c +6 −8
  890. drivers/platform/x86/dell-laptop.c +1 −1
  891. drivers/ptp/ptp_chardev.c +3 −2
  892. drivers/ptp/ptp_qoriq.c +1 −1
  893. drivers/rtc/interface.c +5 −3
  894. drivers/rtc/rtc-mrst.c +1 −3
  895. drivers/s390/block/dasd.c +67 −117
  896. drivers/s390/block/dasd_alias.c +3 −3
  897. drivers/s390/block/dasd_diag.c +2 −1
  898. drivers/s390/block/dasd_eckd.c +25 −21
  899. drivers/s390/block/dasd_eer.c +5 −5
  900. drivers/s390/block/dasd_fba.c +4 −2
  901. drivers/s390/block/dasd_int.h +5 −29
  902. drivers/s390/cio/Makefile +1 −0
  903. drivers/s390/cio/vfio_ccw_cp.c +75 −65
  904. drivers/s390/cio/vfio_ccw_drv.c +4 −1
  905. drivers/s390/cio/vfio_ccw_fsm.c +16 −1
  906. drivers/s390/cio/vfio_ccw_trace.h +54 −0
  907. drivers/s390/net/qeth_core.h +12 −1
  908. drivers/s390/net/qeth_core_main.c +28 −19
  909. drivers/s390/net/qeth_l2_main.c +15 −9
  910. drivers/s390/net/qeth_l3_main.c +2 −1
  911. drivers/scsi/aacraid/aachba.c +7 −8
  912. drivers/scsi/cxlflash/main.h +2 −2
  913. drivers/scsi/cxlflash/ocxl_hw.c +2 −3
  914. drivers/scsi/fcoe/fcoe_ctlr.c +3 −3
  915. drivers/scsi/hpsa.c +21 −4
  916. drivers/scsi/hpsa.h +1 −0
  917. drivers/scsi/ipr.c +0 −2
  918. drivers/scsi/libfc/fc_rport.c +1 −0
  919. drivers/scsi/libiscsi.c +6 −6
  920. drivers/scsi/mpt3sas/mpt3sas_base.c +8 −8
  921. drivers/scsi/qedf/qedf_main.c +12 −0
  922. drivers/scsi/qedi/qedi_main.c +12 −1
  923. drivers/scsi/qla2xxx/qla_attr.c +1 −0
  924. drivers/scsi/qla2xxx/qla_def.h +2 −0
  925. drivers/scsi/qla2xxx/qla_gbl.h +1 −0
  926. drivers/scsi/qla2xxx/qla_gs.c +30 −14
  927. drivers/scsi/qla2xxx/qla_init.c +11 −10
  928. drivers/scsi/qla2xxx/qla_inline.h +2 −0
  929. drivers/scsi/qla2xxx/qla_iocb.c +27 −26
  930. drivers/scsi/qla2xxx/qla_isr.c +3 −0
  931. drivers/scsi/qla2xxx/qla_mbx.c +6 −0
  932. drivers/scsi/qla2xxx/qla_mid.c +9 −2
  933. drivers/scsi/qla2xxx/qla_os.c +24 −31
  934. drivers/scsi/qla2xxx/qla_sup.c +3 −0
  935. drivers/scsi/qla2xxx/qla_target.c +3 −4
  936. drivers/scsi/scsi_debug.c +1 −1
  937. drivers/scsi/scsi_error.c +14 −0
  938. drivers/scsi/scsi_transport_fc.c +1 −1
  939. drivers/scsi/sd_zbc.c +3 −2
  940. drivers/scsi/sg.c +46 −11
  941. drivers/scsi/sr.c +21 −8
  942. drivers/scsi/vmw_pvscsi.c +8 −3
  943. drivers/scsi/xen-scsifront.c +26 −7
  944. drivers/soc/imx/gpc.c +21 −0
  945. drivers/soc/imx/gpcv2.c +9 −4
  946. drivers/soc/qcom/Kconfig +2 −1
  947. drivers/soc/renesas/rcar-sysc.c +29 −6
  948. drivers/staging/android/ashmem.c +2 −0
  949. drivers/staging/android/ion/ion_heap.c +1 −1
  950. drivers/staging/comedi/drivers/quatech_daqp_cs.c +1 −1
  951. drivers/staging/ks7010/ks_hostif.c +6 −6
  952. drivers/staging/media/omap4iss/iss_video.c +2 −1
  953. drivers/staging/rtl8188eu/Kconfig +0 −1
  954. drivers/staging/rtl8188eu/core/rtw_recv.c +114 −47
  955. drivers/staging/rtl8188eu/core/rtw_security.c +46 −46
  956. drivers/staging/rtl8723bs/core/rtw_ap.c +1 −1
  957. drivers/staging/rtlwifi/rtl8822be/hw.c +1 −1
  958. drivers/staging/rtlwifi/wifi.h +1 −0
  959. drivers/staging/speakup/speakup_soft.c +5 −1
  960. drivers/staging/typec/Kconfig +1 −0
  961. drivers/target/iscsi/cxgbit/cxgbit_target.c +9 −7
  962. drivers/target/target_core_pr.c +10 −5
  963. drivers/target/target_core_user.c +36 −8
  964. drivers/thunderbolt/domain.c +4 −0
  965. drivers/tty/n_tty.c +32 −23
  966. drivers/tty/serdev/core.c +1 −0
  967. drivers/tty/serial/8250/8250_pci.c +0 −2
  968. drivers/tty/vt/vt.c +2 −2
  969. drivers/uio/uio.c +103 −36
  970. drivers/usb/chipidea/Kconfig +1 −8
  971. drivers/usb/chipidea/Makefile +1 −2
  972. drivers/usb/chipidea/ci.h +0 −8
  973. drivers/usb/chipidea/host.c +4 −1
  974. drivers/usb/chipidea/ulpi.c +3 −0
  975. drivers/usb/class/cdc-acm.c +6 −0
  976. drivers/usb/core/hub.c +6 −2
  977. drivers/usb/core/quirks.c +4 −0
  978. drivers/usb/dwc2/core.h +3 −0
  979. drivers/usb/dwc2/gadget.c +15 −11
  980. drivers/usb/dwc2/hcd.c +118 −29
  981. drivers/usb/dwc2/hcd.h +8 −0
  982. drivers/usb/dwc2/hcd_intr.c +16 −4
  983. drivers/usb/dwc2/hcd_queue.c +4 −1
  984. drivers/usb/dwc3/core.c +13 −10
  985. drivers/usb/dwc3/dwc3-of-simple.c +2 −1
  986. drivers/usb/dwc3/dwc3-pci.c +2 −0
  987. drivers/usb/dwc3/dwc3-qcom.c +5 −8
  988. drivers/usb/dwc3/ep0.c +0 −3
  989. drivers/usb/gadget/composite.c +3 −1
  990. drivers/usb/gadget/function/f_fs.c +19 −9
  991. drivers/usb/gadget/function/f_uac2.c +12 −12
  992. drivers/usb/gadget/function/u_audio.c +33 −55
  993. drivers/usb/gadget/udc/aspeed-vhub/Kconfig +1 −0
  994. drivers/usb/gadget/udc/aspeed-vhub/ep0.c +10 −1
  995. drivers/usb/gadget/udc/aspeed-vhub/epn.c +11 −3
  996. drivers/usb/gadget/udc/aspeed-vhub/vhub.h +33 −0
  997. drivers/usb/gadget/udc/r8a66597-udc.c +3 −3
  998. drivers/usb/host/xhci-dbgcap.c +8 −4
  999. drivers/usb/host/xhci-mem.c +3 −3
  1000. drivers/usb/host/xhci-tegra.c +3 −3
  1001. drivers/usb/host/xhci-trace.h +31 −5
  1002. drivers/usb/host/xhci.c +44 −4
  1003. drivers/usb/host/xhci.h +4 −0
  1004. drivers/usb/misc/yurex.c +6 −17
  1005. drivers/usb/phy/phy-fsl-usb.c +3 −1
  1006. drivers/usb/serial/ch341.c +1 −1
  1007. drivers/usb/serial/cp210x.c +15 −0
  1008. drivers/usb/serial/keyspan_pda.c +3 −1
  1009. drivers/usb/serial/mos7840.c +3 −0
  1010. drivers/usb/typec/tcpm.c +10 −7
  1011. drivers/usb/typec/ucsi/ucsi.c +13 −0
  1012. drivers/usb/typec/ucsi/ucsi_acpi.c +5 −0
  1013. drivers/vfio/pci/Kconfig +10 −2
  1014. drivers/vfio/pci/vfio_pci.c +4 −0
  1015. drivers/vfio/vfio_iommu_spapr_tce.c +5 −5
  1016. drivers/vfio/vfio_iommu_type1.c +7 −9
  1017. drivers/vhost/net.c +2 −1
  1018. drivers/vhost/vhost.c +6 −3
  1019. drivers/virtio/virtio_balloon.c +2 −0
  1020. drivers/xen/Makefile +1 −1
  1021. drivers/xen/events/events_base.c +0 −2
  1022. drivers/xen/grant-table.c +2 −2
  1023. drivers/xen/manage.c +15 −3
  1024. drivers/xen/privcmd-buf.c +210 −0
  1025. drivers/xen/privcmd.c +9 −0
  1026. drivers/xen/privcmd.h +3 −0
  1027. drivers/xen/xen-scsiback.c +13 −3
  1028. fs/aio.c +6 −147
  1029. fs/autofs/Makefile +2 −2
  1030. fs/autofs/dev-ioctl.c +13 −9
  1031. fs/autofs/init.c +1 −1
  1032. fs/binfmt_elf.c +2 −3
  1033. fs/block_dev.c +5 −4
  1034. fs/btrfs/extent_io.c +9 −3
  1035. fs/btrfs/inode.c +5 −2
  1036. fs/btrfs/ioctl.c +7 −5
  1037. fs/btrfs/qgroup.c +13 −4
  1038. fs/btrfs/scrub.c +9 −8
  1039. fs/btrfs/volumes.c +2 −0
  1040. fs/cachefiles/bind.c +2 −1
  1041. fs/cachefiles/namei.c +1 −2
  1042. fs/cachefiles/rdwr.c +12 −5
  1043. fs/ceph/inode.c +1 −0
  1044. fs/cifs/cifs_debug.c +29 −0
  1045. fs/cifs/cifsencrypt.c +15 −5
  1046. fs/cifs/cifsglob.h +39 −4
  1047. fs/cifs/cifsproto.h +3 −5
  1048. fs/cifs/cifssmb.c +12 −6
  1049. fs/cifs/connect.c +11 −5
  1050. fs/cifs/inode.c +11 −2
  1051. fs/cifs/misc.c +6 −3
  1052. fs/cifs/smb1ops.c +1 −0
  1053. fs/cifs/smb2file.c +4 −7
  1054. fs/cifs/smb2misc.c +17 −2
  1055. fs/cifs/smb2ops.c +216 −73
  1056. fs/cifs/smb2pdu.c +305 −60
  1057. fs/cifs/smb2pdu.h +22 −7
  1058. fs/cifs/smb2proto.h +6 −0
  1059. fs/cifs/smb2transport.c +55 −19
  1060. fs/cifs/smbdirect.c +7 −15
  1061. fs/cifs/smbdirect.h +2 −2
  1062. fs/cifs/trace.h +2 −1
  1063. fs/cifs/transport.c +97 −97
  1064. fs/dcache.c +6 −7
  1065. fs/eventfd.c +6 −13
  1066. fs/eventpoll.c +5 −10
  1067. fs/exec.c +3 −4
  1068. fs/ext2/ext2.h +0 −2
  1069. fs/ext2/super.c +3 −3
  1070. fs/ext4/balloc.c +16 −8
  1071. fs/ext4/ext4.h +1 −8
  1072. fs/ext4/ext4_extents.h +1 −0
  1073. fs/ext4/extents.c +6 −0
  1074. fs/ext4/ialloc.c +19 −3
  1075. fs/ext4/inline.c +13 −45
  1076. fs/ext4/inode.c +11 −12
  1077. fs/ext4/mballoc.c +4 −2
  1078. fs/ext4/mmp.c +2 −5
  1079. fs/ext4/super.c +82 −14
  1080. fs/ext4/xattr.c +18 −22
  1081. fs/fat/inode.c +13 −7
  1082. fs/fscache/cache.c +1 −1
  1083. fs/fscache/cookie.c +4 −3
  1084. fs/fscache/object.c +1 −0
  1085. fs/fscache/operation.c +4 −2
  1086. fs/hugetlbfs/inode.c +2 −0
  1087. fs/inode.c +6 −0
  1088. fs/internal.h +0 −1
  1089. fs/iomap.c +1 −1
  1090. fs/jbd2/transaction.c +8 −1
  1091. fs/jfs/jfs_dinode.h +7 −0
  1092. fs/jfs/jfs_incore.h +1 −0
  1093. fs/jfs/super.c +1 −2
  1094. fs/jfs/xattr.c +6 −4
  1095. fs/namespace.c +26 −2
  1096. fs/nfs/delegation.c +3 −1
  1097. fs/nfs/flexfilelayout/flexfilelayout.c +16 −5
  1098. fs/nfs/nfs4proc.c +39 −20
  1099. fs/nfs/pnfs.h +5 −0
  1100. fs/pipe.c +9 −13
  1101. fs/proc/base.c +23 −5
  1102. fs/proc/generic.c +10 −1
  1103. fs/proc/task_mmu.c +2 −1
  1104. fs/quota/dquot.c +2 −5
  1105. fs/reiserfs/prints.c +81 −60
  1106. fs/select.c +0 −23
  1107. fs/squashfs/block.c +2 −0
  1108. fs/squashfs/cache.c +3 −0
  1109. fs/squashfs/file.c +34 −24
  1110. fs/squashfs/file_cache.c +2 −2
  1111. fs/squashfs/file_direct.c +12 −12
  1112. fs/squashfs/fragment.c +10 −7
  1113. fs/squashfs/squashfs.h +2 −1
  1114. fs/squashfs/squashfs_fs.h +6 −0
  1115. fs/squashfs/squashfs_fs_sb.h +1 −0
  1116. fs/squashfs/super.c +3 −2
  1117. fs/timerfd.c +11 −11
  1118. fs/udf/balloc.c +2 −3
  1119. fs/udf/directory.c +4 −4
  1120. fs/udf/inode.c +4 −4
  1121. fs/udf/namei.c +3 −11
  1122. fs/udf/udfdecl.h +7 −2
  1123. fs/userfaultfd.c +10 −6
  1124. fs/xfs/libxfs/xfs_ag_resv.c +27 −4
  1125. fs/xfs/libxfs/xfs_alloc.c +3 −2
  1126. fs/xfs/libxfs/xfs_bmap.c +26 −0
  1127. fs/xfs/libxfs/xfs_bmap.h +2 −0
  1128. fs/xfs/libxfs/xfs_format.h +5 −0
  1129. fs/xfs/libxfs/xfs_inode_buf.c +51 −31
  1130. fs/xfs/libxfs/xfs_rtbitmap.c +2 −2
  1131. fs/xfs/xfs_bmap_util.c +52 −54
  1132. fs/xfs/xfs_fsmap.c +2 −2
  1133. fs/xfs/xfs_fsops.c +1 −1
  1134. fs/xfs/xfs_inode.c +21 −36
  1135. fs/xfs/xfs_iomap.c +14 −1
  1136. fs/xfs/xfs_trans.c +6 −1
  1137. include/acpi/processor.h +1 −2
  1138. include/asm-generic/qspinlock_types.h +1 −1
  1139. include/asm-generic/tlb.h +8 −0
  1140. include/crypto/if_alg.h +2 −1
  1141. include/dt-bindings/clock/imx6ul-clock.h +19 −21
  1142. include/linux/acpi.h +3 −0
  1143. include/linux/atmdev.h +15 −0
  1144. include/linux/backing-dev-defs.h +1 −1
  1145. include/linux/blk-mq.h +14 −0
  1146. include/linux/blkdev.h +2 −2
  1147. include/linux/bpf-cgroup.h +27 −0
  1148. include/linux/bpf.h +20 −0
  1149. include/linux/bpf_lirc.h +3 −2
  1150. include/linux/bpfilter.h +3 −3
  1151. include/linux/compat.h +7 −1
  1152. include/linux/compiler-gcc.h +47 −7
  1153. include/linux/compiler_types.h +18 −0
  1154. include/linux/cpu.h +1 −1
  1155. include/linux/dax.h +1 −1
  1156. include/linux/delayacct.h +1 −1
  1157. include/linux/dma-contiguous.h +1 −1
  1158. include/linux/eventfd.h +1 −0
  1159. include/linux/filter.h +29 −32
  1160. include/linux/fs.h +1 −2
  1161. include/linux/fsl/guts.h +1 −0
  1162. include/linux/ftrace.h +0 −2
  1163. include/linux/hid.h +2 −1
  1164. include/linux/if_bridge.h +2 −2
  1165. include/linux/igmp.h +2 −0
  1166. include/linux/iio/buffer-dma.h +1 −1
  1167. include/linux/input/mt.h +1 −1
  1168. include/linux/intel-iommu.h +1 −0
  1169. include/linux/irq.h +1 −0
  1170. include/linux/irqdesc.h +0 −5
  1171. include/linux/kernel.h +1 −1
  1172. include/linux/kthread.h +0 −1
  1173. include/linux/libata.h +24 −0
  1174. include/linux/marvell_phy.h +2 −0
  1175. include/linux/memory.h +1 −0
  1176. include/linux/mlx5/driver.h +15 −3
  1177. include/linux/mlx5/eswitch.h +2 −0
  1178. include/linux/mlx5/mlx5_ifc.h +1 −1
  1179. include/linux/mm.h +21 −2
  1180. include/linux/mod_devicetable.h +1 −0
  1181. include/linux/net.h +0 −1
  1182. include/linux/netdevice.h +20 −0
  1183. include/linux/nfs_xdr.h +2 −0
  1184. include/linux/pci.h +2 −1
  1185. include/linux/perf_event.h +1 −0
  1186. include/linux/pm_domain.h +3 −3
  1187. include/linux/poll.h +6 −6
  1188. include/linux/refcount.h +3 −1
  1189. include/linux/ring_buffer.h +1 −0
  1190. include/linux/rmi.h +2 −0
  1191. include/linux/rtmutex.h +7 −0
  1192. include/linux/scatterlist.h +0 −18
  1193. include/linux/sched.h +13 −12
  1194. include/linux/sched/task.h +1 −1
  1195. include/linux/skbuff.h +7 −6
  1196. include/linux/slub_def.h +4 −0
  1197. include/linux/spinlock.h +5 −0
  1198. include/linux/syscalls.h +5 −0
  1199. include/linux/uio_driver.h +1 −1
  1200. include/net/af_vsock.h +2 −2
  1201. include/net/bluetooth/bluetooth.h +1 −1
  1202. include/net/cfg80211.h +6 −6
  1203. include/net/ip6_fib.h +8 −2
  1204. include/net/ip6_route.h +6 −0
  1205. include/net/ipv6.h +4 −9
  1206. include/net/iucv/af_iucv.h +2 −0
  1207. include/net/llc.h +5 −0
  1208. include/net/net_namespace.h +1 −0
  1209. include/net/netfilter/nf_tables.h +2 −3
  1210. include/net/netfilter/nf_tables_core.h +6 −0
  1211. include/net/netfilter/nf_tproxy.h +2 −2
  1212. include/net/netns/ipv6.h +0 −1
  1213. include/net/pkt_cls.h +5 −0
  1214. include/net/sctp/sctp.h +2 −1
  1215. include/net/tc_act/tc_csum.h +0 −1
  1216. include/net/tc_act/tc_tunnel_key.h +0 −1
  1217. include/net/tcp.h +13 −3
  1218. include/net/tls.h +4 −2
  1219. include/net/udp.h +1 −1
  1220. include/net/xdp_sock.h +4 −0
  1221. include/rdma/ib_verbs.h +8 −5
  1222. include/uapi/linux/aio_abi.h +4 −8
  1223. include/uapi/linux/bpf.h +23 −5
  1224. include/uapi/linux/btf.h +1 −1
  1225. include/uapi/linux/ethtool.h +1 −1
  1226. include/uapi/linux/nbd.h +3 −0
  1227. include/uapi/linux/perf_event.h +2 −0
  1228. include/uapi/linux/rseq.h +58 −44
  1229. include/uapi/linux/target_core_user.h +3 −1
  1230. include/uapi/linux/tcp.h +4 −0
  1231. include/uapi/linux/types_32_64.h +0 −50
  1232. include/xen/xen.h +5 −1
  1233. init/Kconfig +3 −8
  1234. init/main.c +1 −1
  1235. ipc/sem.c +1 −1
  1236. ipc/shm.c +12 −0
  1237. kernel/Makefile +1 −0
  1238. kernel/auditsc.c +9 −4
  1239. kernel/bpf/arraymap.c +1 −1
  1240. kernel/bpf/btf.c +36 −24
  1241. kernel/bpf/cgroup.c +54 −0
  1242. kernel/bpf/core.c +33 −6
  1243. kernel/bpf/cpumap.c +9 −6
  1244. kernel/bpf/devmap.c +28 −5
  1245. kernel/bpf/hashtab.c +11 −5
  1246. kernel/bpf/sockmap.c +217 −89
  1247. kernel/bpf/syscall.c +27 −88
  1248. kernel/bpf/verifier.c +9 −2
  1249. kernel/cpu.c +1 −1
  1250. kernel/dma/Kconfig +50 −0
  1251. kernel/dma/Makefile +11 −0
  1252. kernel/dma/coherent.c +0 −0
  1253. kernel/dma/contiguous.c +0 −0
  1254. kernel/dma/debug.c +0 −0
  1255. kernel/dma/direct.c +0 −0
  1256. kernel/dma/mapping.c +1 −1
  1257. kernel/dma/noncoherent.c +0 −0
  1258. kernel/dma/swiotlb.c +1 −0
  1259. kernel/dma/virt.c +0 −2
  1260. kernel/events/core.c +9 −3
  1261. kernel/events/ring_buffer.c +3 −3
  1262. kernel/fork.c +28 −5
  1263. kernel/irq/debugfs.c +1 −0
  1264. kernel/irq/manage.c +8 −1
  1265. kernel/kthread.c +31 −7
  1266. kernel/locking/lockdep.c +6 −6
  1267. kernel/locking/rtmutex.c +25 −4
  1268. kernel/locking/rwsem.c +1 −0
  1269. kernel/memremap.c +19 −3
  1270. kernel/rseq.c +29 −19
  1271. kernel/sched/core.c +32 −35
  1272. kernel/sched/cpufreq_schedutil.c +1 −1
  1273. kernel/sched/deadline.c +17 −2
  1274. kernel/sched/fair.c +22 −23
  1275. kernel/sched/rt.c +12 −6
  1276. kernel/sched/sched.h +9 −2
  1277. kernel/sched/topology.c +1 −1
  1278. kernel/softirq.c +14 −6
  1279. kernel/stop_machine.c +13 −1
  1280. kernel/time/hrtimer.c +1 −1
  1281. kernel/time/posix-cpu-timers.c +0 −2
  1282. kernel/time/tick-common.c +1 −2
  1283. kernel/time/tick-sched.c +1 −1
  1284. kernel/time/time.c +4 −2
  1285. kernel/trace/ftrace.c +1 −12
  1286. kernel/trace/ring_buffer.c +16 −0
  1287. kernel/trace/trace.c +16 −9
  1288. kernel/trace/trace.h +1 −3
  1289. kernel/trace/trace_events_filter.c +14 −1
  1290. kernel/trace/trace_events_hist.c +1 −1
  1291. kernel/trace/trace_events_trigger.c +13 −5
  1292. kernel/trace/trace_functions_graph.c +4 −1
  1293. kernel/trace/trace_kprobe.c +18 −3
  1294. kernel/trace/trace_output.c +3 −2
  1295. lib/Kconfig +1 −46
  1296. lib/Kconfig.kasan +2 −1
  1297. lib/Kconfig.ubsan +0 −11
  1298. lib/Makefile +1 −11
  1299. lib/dec_and_lock.c +16 −0
  1300. lib/iov_iter.c +73 −4
  1301. lib/percpu_ida.c +1 −1
  1302. lib/refcount.c +28 −0
  1303. lib/rhashtable.c +19 −8
  1304. lib/scatterlist.c +0 −6
  1305. lib/test_bpf.c +20 −0
  1306. lib/test_printf.c +0 −7
  1307. mm/backing-dev.c +7 −13
  1308. mm/debug.c +16 −2
  1309. mm/gup.c +0 −2
  1310. mm/huge_memory.c +2 −0
  1311. mm/hugetlb.c +8 −0
  1312. mm/kasan/kasan.c +3 −2
  1313. mm/memblock.c +4 −1
  1314. mm/memcontrol.c +12 −5
  1315. mm/memory.c +5 −4
  1316. mm/mempolicy.c +1 −0
  1317. mm/mmap.c +26 −41
  1318. mm/nommu.c +6 −6
  1319. mm/page_alloc.c +4 −4
  1320. mm/rmap.c +7 −1
  1321. mm/shmem.c +1 −0
  1322. mm/slab_common.c +4 −0
  1323. mm/slub.c +6 −1
  1324. mm/vmstat.c +0 −2
  1325. mm/zswap.c +9 −0
  1326. net/8021q/vlan.c +1 −1
  1327. net/9p/client.c +2 −1
  1328. net/Makefile +0 −4
  1329. net/appletalk/ddp.c +1 −1
  1330. net/atm/br2684.c +1 −2
  1331. net/atm/clip.c +1 −2
  1332. net/atm/common.c +9 −5
  1333. net/atm/common.h +1 −1
  1334. net/atm/lec.c +1 −2
  1335. net/atm/mpc.c +1 −2
  1336. net/atm/pppoatm.c +1 −2
  1337. net/atm/pvc.c +1 −1
  1338. net/atm/raw.c +2 −2
  1339. net/atm/svc.c +1 −1
  1340. net/ax25/af_ax25.c +1 −1
  1341. net/batman-adv/bat_iv_ogm.c +3 −1
  1342. net/batman-adv/bat_v.c +3 −1
  1343. net/batman-adv/debugfs.c +40 −0
  1344. net/batman-adv/debugfs.h +11 −0
  1345. net/batman-adv/hard-interface.c +31 −6
  1346. net/batman-adv/translation-table.c +5 −2
  1347. net/bluetooth/af_bluetooth.c +5 −2
  1348. net/bluetooth/hci_sock.c +1 −1
  1349. net/bluetooth/l2cap_sock.c +1 −1
  1350. net/bluetooth/rfcomm/sock.c +1 −1
  1351. net/bluetooth/sco.c +1 −1
  1352. net/bpf/test_run.c +14 −3
  1353. net/bpfilter/.gitignore +1 −0
  1354. net/bpfilter/Kconfig +1 −1
  1355. net/bpfilter/Makefile +2 −13
  1356. net/bpfilter/bpfilter_kern.c +5 −6
  1357. net/bpfilter/bpfilter_umh_blob.S +7 −0
  1358. net/caif/caif_dev.c +3 −1
  1359. net/caif/caif_socket.c +8 −4
  1360. net/can/bcm.c +1 −1
  1361. net/can/raw.c +1 −1
  1362. net/core/datagram.c +9 −4
  1363. net/core/dev.c +12 −9
  1364. net/core/dev_ioctl.c +2 −9
  1365. net/core/fib_rules.c +79 −1
  1366. net/core/filter.c +186 −82
  1367. net/core/gen_stats.c +14 −2
  1368. net/core/lwt_bpf.c +1 −1
  1369. net/core/page_pool.c +1 −1
  1370. net/core/rtnetlink.c +6 −3
  1371. net/core/skbuff.c +7 −7
  1372. net/core/sock.c +8 −5
  1373. net/core/xdp.c +2 −1
  1374. net/dccp/ccids/ccid2.c +4 −2
  1375. net/dccp/ccids/ccid3.c +9 −7
  1376. net/dccp/dccp.h +2 −1
  1377. net/dccp/ipv4.c +1 −1
  1378. net/dccp/ipv6.c +1 −1
  1379. net/dccp/proto.c +11 −2
  1380. net/decnet/af_decnet.c +3 −3
  1381. net/dns_resolver/dns_key.c +16 −12
  1382. net/dsa/slave.c +8 −2
  1383. net/ieee802154/6lowpan/core.c +6 −0
  1384. net/ieee802154/socket.c +2 −2
  1385. net/ipv4/af_inet.c +4 −4
  1386. net/ipv4/fib_frontend.c +3 −2
  1387. net/ipv4/fou.c +1 −3
  1388. net/ipv4/gre_offload.c +1 −1
  1389. net/ipv4/igmp.c +44 −18
  1390. net/ipv4/inet_fragment.c +4 −4
  1391. net/ipv4/inet_hashtables.c +2 −2
  1392. net/ipv4/ip_fragment.c +5 −0
  1393. net/ipv4/ip_output.c +4 −1
  1394. net/ipv4/ip_sockglue.c +7 −4
  1395. net/ipv4/netfilter/ip_tables.c +1 −0
  1396. net/ipv4/netfilter/nf_tproxy_ipv4.c +12 −6
  1397. net/ipv4/sysctl_net_ipv4.c +16 −7
  1398. net/ipv4/tcp.c +27 −12
  1399. net/ipv4/tcp_bbr.c +4 −0
  1400. net/ipv4/tcp_dctcp.c +16 −59
  1401. net/ipv4/tcp_input.c +71 −16
  1402. net/ipv4/tcp_ipv4.c +18 −5
  1403. net/ipv4/tcp_output.c +24 −12
  1404. net/ipv4/udp.c +5 −5
  1405. net/ipv4/udp_offload.c +1 −1
  1406. net/ipv6/Kconfig +1 −0
  1407. net/ipv6/addrconf.c +8 −4
  1408. net/ipv6/af_inet6.c +2 −2
  1409. net/ipv6/calipso.c +3 −6
  1410. net/ipv6/datagram.c +5 −2
  1411. net/ipv6/esp6.c +3 −1
  1412. net/ipv6/exthdrs.c +30 −81
  1413. net/ipv6/icmp.c +3 −2
  1414. net/ipv6/inet6_hashtables.c +2 −2
  1415. net/ipv6/ip6_fib.c +89 −72
  1416. net/ipv6/ip6_gre.c +2 −1
  1417. net/ipv6/ip6_output.c +4 −1
  1418. net/ipv6/ip6_tunnel.c +2 −6
  1419. net/ipv6/ip6_vti.c +6 −5
  1420. net/ipv6/ipv6_sockglue.c +22 −10
  1421. net/ipv6/mcast.c +52 −24
  1422. net/ipv6/ndisc.c +1 −1
  1423. net/ipv6/netfilter/ip6_tables.c +1 −0
  1424. net/ipv6/netfilter/nf_conntrack_reasm.c +5 −3
  1425. net/ipv6/netfilter/nf_tproxy_ipv6.c +12 −6
  1426. net/ipv6/raw.c +2 −2
  1427. net/ipv6/route.c +39 −16
  1428. net/ipv6/seg6_hmac.c +1 −1
  1429. net/ipv6/seg6_iptunnel.c +1 −1
  1430. net/ipv6/tcp_ipv6.c +4 −2
  1431. net/iucv/af_iucv.c +5 −2
  1432. net/kcm/kcmsock.c +5 −5
  1433. net/key/af_key.c +1 −1
  1434. net/l2tp/l2tp_ip.c +1 −1
  1435. net/l2tp/l2tp_ip6.c +1 −1
  1436. net/l2tp/l2tp_ppp.c +10 −5
  1437. net/llc/af_llc.c +1 −1
  1438. net/llc/llc_core.c +2 −2
  1439. net/mac80211/rx.c +1 −4
  1440. net/mac80211/tx.c +2 −0
  1441. net/mac80211/util.c +2 −1
  1442. net/ncsi/ncsi-aen.c +5 −5
  1443. net/ncsi/ncsi-manage.c +22 −27
  1444. net/netfilter/Kconfig +7 −18
  1445. net/netfilter/Makefile +4 −3
  1446. net/netfilter/nf_conncount.c +47 −5
  1447. net/netfilter/nf_conntrack_core.c +1 −1
  1448. net/netfilter/nf_conntrack_helper.c +5 −0
  1449. net/netfilter/nf_conntrack_proto_dccp.c +4 −4
  1450. net/netfilter/nf_log.c +10 −3
  1451. net/netfilter/nf_tables_api.c +165 −139
  1452. net/netfilter/nf_tables_set_core.c +28 −0
  1453. net/netfilter/nfnetlink_queue.c +3 −0
  1454. net/netfilter/nft_compat.c +13 −0
  1455. net/netfilter/nft_immediate.c +3 −0
  1456. net/netfilter/nft_lookup.c +11 −2
  1457. net/netfilter/nft_set_bitmap.c +1 −18
  1458. net/netfilter/nft_set_hash.c +4 −26
  1459. net/netfilter/nft_set_rbtree.c +6 −20
  1460. net/netfilter/xt_TPROXY.c +4 −4
  1461. net/netlink/af_netlink.c +8 −1
  1462. net/netrom/af_netrom.c +1 −1
  1463. net/nfc/llcp_commands.c +6 −3
  1464. net/nfc/llcp_sock.c +6 −3
  1465. net/nfc/rawsock.c +2 −2
  1466. net/nsh/nsh.c +1 −1
  1467. net/openvswitch/meter.c +5 −5
  1468. net/packet/af_packet.c +20 −17
  1469. net/phonet/socket.c +6 −3
  1470. net/qrtr/qrtr.c +12 −3
  1471. net/rds/connection.c +10 −1
  1472. net/rds/ib_frmr.c +5 −0
  1473. net/rds/ib_mr.h +2 −1
  1474. net/rds/ib_rdma.c +13 −8
  1475. net/rds/loop.c +56 −0
  1476. net/rds/loop.h +2 −0
  1477. net/rds/rdma.c +8 −5
  1478. net/rds/rds.h +4 −1
  1479. net/rds/send.c +7 −5
  1480. net/rose/af_rose.c +1 −1
  1481. net/rxrpc/af_rxrpc.c +7 −3
  1482. net/rxrpc/ar-internal.h +4 −4
  1483. net/rxrpc/call_accept.c +2 −2
  1484. net/rxrpc/conn_event.c +2 −2
  1485. net/rxrpc/net_ns.c +3 −3
  1486. net/rxrpc/output.c +6 −6
  1487. net/rxrpc/peer_event.c +88 −68
  1488. net/rxrpc/peer_object.c +4 −4
  1489. net/rxrpc/rxkad.c +2 −2
  1490. net/sched/act_csum.c +3 −3
  1491. net/sched/act_ife.c +5 −7
  1492. net/sched/act_tunnel_key.c +3 −3
  1493. net/sched/cls_api.c +2 −2
  1494. net/sched/cls_flower.c +17 −4
  1495. net/sched/sch_blackhole.c +1 −1
  1496. net/sched/sch_fq_codel.c +18 −7
  1497. net/sched/sch_hfsc.c +2 −2
  1498. net/sctp/chunk.c +3 −1
  1499. net/sctp/ipv6.c +1 −1
  1500. net/sctp/protocol.c +1 −1
  1501. net/sctp/socket.c +3 −1
  1502. net/sctp/transport.c +1 −1
  1503. net/smc/af_smc.c +105 −46
  1504. net/smc/smc.h +8 −0
  1505. net/smc/smc_cdc.c +2 −1
  1506. net/smc/smc_clc.c +2 −1
  1507. net/smc/smc_close.c +2 −0
  1508. net/smc/smc_tx.c +10 −2
  1509. net/socket.c +11 −44
  1510. net/strparser/strparser.c +2 −20
  1511. net/sunrpc/xprt.c +7 −3
  1512. net/tipc/discover.c +11 −7
  1513. net/tipc/net.c +9 −6
  1514. net/tipc/node.c +5 −2
  1515. net/tipc/socket.c +9 −5
  1516. net/tls/tls_main.c +1 −1
  1517. net/tls/tls_sw.c +19 −10
  1518. net/unix/af_unix.c +19 −11
  1519. net/vmw_vsock/af_vsock.c +21 −13
  1520. net/vmw_vsock/virtio_transport.c +1 −1
  1521. net/vmw_vsock/vmci_transport.c +1 −2
  1522. net/wireless/nl80211.c +30 −30
  1523. net/wireless/reg.c +3 −25
  1524. net/wireless/trace.h +10 −8
  1525. net/x25/af_x25.c +1 −1
  1526. net/xdp/xsk.c +20 −24
  1527. net/xdp/xsk_queue.h +3 −8
  1528. net/xfrm/xfrm_policy.c +3 −0
  1529. net/xfrm/xfrm_user.c +11 −7
  1530. samples/bpf/.gitignore +49 −0
  1531. samples/bpf/parse_varlen.c +1 −5
  1532. samples/bpf/test_overhead_user.c +15 −4
  1533. samples/bpf/trace_event_user.c +24 −3
  1534. samples/bpf/xdp2skb_meta.sh +3 −3
  1535. samples/bpf/xdp_fwd_kern.c +4 −4
  1536. samples/bpf/xdp_redirect_cpu_kern.c +1 −1
  1537. samples/bpf/xdp_redirect_cpu_user.c +2 −2
  1538. samples/bpf/xdpsock_user.c +1 −1
  1539. samples/vfio-mdev/mbochs.c +11 −12
  1540. scripts/Kbuild.include +1 −1
  1541. scripts/Makefile.build +1 −4
  1542. scripts/Makefile.clean +0 −3
  1543. scripts/Makefile.modbuiltin +0 −4
  1544. scripts/Makefile.modinst +0 −4
  1545. scripts/Makefile.modpost +0 −4
  1546. scripts/Makefile.modsign +0 −3
  1547. scripts/Makefile.ubsan +0 −4
  1548. scripts/cc-can-link.sh +1 −1
  1549. scripts/checkpatch.pl +3 −9
  1550. scripts/extract-vmlinux +2 −0
  1551. scripts/gcc-x86_64-has-stack-protector.sh +1 −1
  1552. scripts/kconfig/expr.h +3 −0
  1553. scripts/kconfig/preprocess.c +1 −1
  1554. scripts/kconfig/zconf.y +6 −2
  1555. scripts/tags.sh +2 −1
  1556. security/keys/dh.c +4 −2
  1557. security/selinux/selinuxfs.c +33 −45
  1558. security/smack/smack_lsm.c +1 −0
  1559. sound/core/rawmidi.c +14 −6
  1560. sound/core/seq/seq_clientmgr.c +2 −1
  1561. sound/core/timer.c +1 −1
  1562. sound/pci/hda/hda_codec.c +3 −2
  1563. sound/pci/hda/hda_codec.h +1 −0
  1564. sound/pci/hda/patch_ca0132.c +25 −42
  1565. sound/pci/hda/patch_conexant.c +1 −0
  1566. sound/pci/hda/patch_hdmi.c +19 −5
  1567. sound/pci/hda/patch_realtek.c +23 −3
  1568. sound/pci/lx6464es/lx6464es.c +1 −0
  1569. tools/arch/arm/include/uapi/asm/kvm.h +1 −0
  1570. tools/arch/arm64/include/uapi/asm/kvm.h +1 −0
  1571. tools/arch/powerpc/include/uapi/asm/kvm.h +1 −0
  1572. tools/arch/powerpc/include/uapi/asm/unistd.h +2 −0
  1573. tools/arch/x86/include/asm/cpufeatures.h +2 −0
  1574. tools/arch/x86/include/asm/mcsafe_test.h +13 −0
  1575. tools/arch/x86/lib/memcpy_64.S +54 −58
  1576. tools/bpf/bpftool/common.c +8 −3
  1577. tools/bpf/bpftool/map.c +9 −5
  1578. tools/bpf/bpftool/perf.c +3 −2
  1579. tools/bpf/bpftool/prog.c +11 −5
  1580. tools/build/Build.include +3 −3
  1581. tools/build/Makefile +1 −1
  1582. tools/include/uapi/drm/drm.h +7 −0
  1583. tools/include/uapi/linux/bpf.h +24 −6
  1584. tools/include/uapi/linux/btf.h +1 −1
  1585. tools/include/uapi/linux/if_link.h +2 −0
  1586. tools/include/uapi/linux/kvm.h +1 −0
  1587. tools/include/uapi/linux/perf_event.h +2 −0
  1588. tools/lib/bpf/btf.c +19 −22
  1589. tools/lib/bpf/btf.h +7 −5
  1590. tools/lib/bpf/libbpf.c +46 −41
  1591. tools/lib/bpf/libbpf.h +2 −2
  1592. tools/objtool/check.c +1 −0
  1593. tools/objtool/elf.c +32 −15
  1594. tools/perf/Documentation/perf-stat.txt +3 −0
  1595. tools/perf/Makefile.config +1 −2
  1596. tools/perf/arch/powerpc/util/skip-callchain-idx.c +1 −1
  1597. tools/perf/arch/x86/entry/syscalls/syscall_64.tbl +2 −0
  1598. tools/perf/arch/x86/util/perf_regs.c +1 −1
  1599. tools/perf/arch/x86/util/pmu.c +1 −0
  1600. tools/perf/arch/x86/util/tsc.c +1 −0
  1601. tools/perf/bench/Build +1 −0
  1602. tools/perf/bench/mem-memcpy-x86-64-asm.S +1 −0
  1603. tools/perf/bench/mem-memcpy-x86-64-lib.c +24 −0
  1604. tools/perf/bench/numa.c +3 −2
  1605. tools/perf/builtin-annotate.c +10 −1
  1606. tools/perf/builtin-c2c.c +5 −5
  1607. tools/perf/builtin-report.c +2 −1
  1608. tools/perf/builtin-script.c +39 −3
  1609. tools/perf/builtin-stat.c +28 −20
  1610. tools/perf/jvmti/jvmti_agent.c +2 −1
  1611. tools/perf/perf.h +1 −0
  1612. tools/perf/pmu-events/Build +1 −1
  1613. tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py +17 −23
  1614. tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py +3 −1
  1615. tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py +1 −1
  1616. tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py +6 −5
  1617. tools/perf/scripts/python/sched-migration.py +9 −5
  1618. tools/perf/tests/builtin-test.c +1 −1
  1619. tools/perf/tests/parse-events.c +20 −5
  1620. tools/perf/tests/shell/record+probe_libc_inet_pton.sh +21 −16
  1621. tools/perf/tests/shell/trace+probe_vfs_getname.sh +1 −1
  1622. tools/perf/tests/topology.c +1 −0
  1623. tools/perf/ui/gtk/hists.c +1 −1
  1624. tools/perf/util/c++/clang.cpp +9 −2
  1625. tools/perf/util/header.c +10 −2
  1626. tools/perf/util/header.h +1 −0
  1627. tools/perf/util/hist.c +8 −4
  1628. tools/perf/util/hist.h +2 −2
  1629. tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c +1 −1
  1630. tools/perf/util/llvm-utils.c +3 −3
  1631. tools/perf/util/namespaces.h +1 −0
  1632. tools/perf/util/parse-events.y +5 −0
  1633. tools/perf/util/pmu.c +97 −2
  1634. tools/perf/util/scripting-engines/trace-event-python.c +17 −20
  1635. tools/perf/util/sort.h +3 −1
  1636. tools/power/x86/turbostat/turbostat.8 +3 −3
  1637. tools/power/x86/turbostat/turbostat.c +215 −129
  1638. tools/testing/nvdimm/test/nfit.c +1 −2
  1639. tools/testing/selftests/bpf/Makefile +1 −1
  1640. tools/testing/selftests/bpf/bpf_helpers.h +9 −0
  1641. tools/testing/selftests/bpf/config +11 −0
  1642. tools/testing/selftests/bpf/test_btf.c +112 −2
  1643. tools/testing/selftests/bpf/test_btf_haskv.c +2 −5
  1644. tools/testing/selftests/bpf/test_kmod.sh +9 −0
  1645. tools/testing/selftests/bpf/test_lirc_mode2.sh +9 −0
  1646. tools/testing/selftests/bpf/test_lwt_seg6local.sh +12 −3
  1647. tools/testing/selftests/bpf/test_offload.py +10 −2
  1648. tools/testing/selftests/bpf/test_sockmap.c +1 −7
  1649. tools/testing/selftests/bpf/test_tunnel.sh +14 −12
  1650. tools/testing/selftests/bpf/test_verifier.c +62 −1
  1651. tools/testing/selftests/ftrace/test.d/00basic/snapshot.tc +28 −0
  1652. tools/testing/selftests/net/.gitignore +1 −0
  1653. tools/testing/selftests/net/config +2 −0
  1654. tools/testing/selftests/net/fib_tests.sh +0 −41
  1655. tools/testing/selftests/net/tcp_mmap.c +1 −1
  1656. tools/testing/selftests/net/udpgso_bench.sh +0 −3
  1657. tools/testing/selftests/pstore/pstore_post_reboot_tests +4 −1
  1658. tools/testing/selftests/rseq/param_test.c +24 −0
  1659. tools/testing/selftests/rseq/rseq-arm.h +1 −0
  1660. tools/testing/selftests/rseq/rseq-mips.h +725 −0
  1661. tools/testing/selftests/rseq/rseq.h +19 −7
  1662. tools/testing/selftests/rseq/run_param_test.sh +0 −0
  1663. tools/testing/selftests/sparc64/Makefile +12 −8
  1664. tools/testing/selftests/sparc64/drivers/Makefile +1 −1
  1665. tools/testing/selftests/static_keys/test_static_keys.sh +13 −0
  1666. tools/testing/selftests/sync/config +4 −0
  1667. tools/testing/selftests/sysctl/sysctl.sh +13 −7
  1668. tools/testing/selftests/user/test_user_copy.sh +7 −0
  1669. tools/testing/selftests/vm/compaction_test.c +3 −1
  1670. tools/testing/selftests/vm/mlock2-tests.c +7 −5
  1671. tools/testing/selftests/vm/run_vmtests +4 −1
  1672. tools/testing/selftests/vm/userfaultfd.c +3 −1
  1673. tools/testing/selftests/x86/sigreturn.c +36 −23
  1674. tools/testing/selftests/zram/zram.sh +4 −1
  1675. tools/testing/selftests/zram/zram_lib.sh +4 −1
  1676. tools/usb/ffs-test.c +16 −3
  1677. tools/virtio/asm/barrier.h +2 −2
  1678. tools/virtio/linux/kernel.h +5 −0
  1679. tools/virtio/linux/scatterlist.h +0 −18
  1680. virt/kvm/Kconfig +1 −1
  1681. virt/kvm/arm/mmu.c +2 −0
  1682. virt/kvm/arm/vgic/vgic-v3.c +0 −5
  1683. virt/kvm/eventfd.c +11 −6
  1684. virt/kvm/kvm_main.c +9 −10
Documentation/admin-guide/kernel-parameters.txt+5−0
@@ -4846,3 +4846,8 @@ · 4845 unmodified lines
48464846 xirc2ps_cs= [NET,PCMCIA]
48474847 Format:
48484848 <irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]
4849+
4850+ xhci-hcd.quirks [USB,KNL]
4851+ A hex value specifying bitmask with supplemental xhci
4852+ host controller quirks. Meaning of each bit can be
4853+ consulted in header drivers/usb/host/xhci.h.
Documentation/admin-guide/pm/intel_pstate.rst+13−3
@@ -324,8 +324,7 @@ Global Attributes · 323 unmodified lines
324324
325325 ``intel_pstate`` exposes several global attributes (files) in ``sysfs`` to
326326 control its functionality at the system level. They are located in the
327−``/sys/devices/system/cpu/cpufreq/intel_pstate/`` directory and affect all
328−CPUs.
327+``/sys/devices/system/cpu/intel_pstate/`` directory and affect all CPUs.
329328
330329 Some of them are not present if the ``intel_pstate=per_cpu_perf_limits``
331330 argument is passed to the kernel in the command line.
@@ -379,6 +378,17 @@ argument is passed to the kernel in the command line. · 47 unmodified lines
379378 but it affects the maximum possible value of per-policy P-state limits
380379 (see `Interpretation of Policy Attributes`_ below for details).
381380
381+``hwp_dynamic_boost``
382+ This attribute is only present if ``intel_pstate`` works in the
383+ `active mode with the HWP feature enabled <Active Mode With HWP_>`_ in
384+ the processor. If set (equal to 1), it causes the minimum P-state limit
385+ to be increased dynamically for a short time whenever a task previously
386+ waiting on I/O is selected to run on a given logical CPU (the purpose
387+ of this mechanism is to improve performance).
388+
389+ This setting has no effect on logical CPUs whose minimum P-state limit
390+ is directly set to the highest non-turbo P-state or above it.
391+
382392 .. _status_attr:
383393
384394 ``status``
@@ -410,7 +420,7 @@ argument is passed to the kernel in the command line. · 25 unmodified lines
410420 That only is supported in some configurations, though (for example, if
411421 the `HWP feature is enabled in the processor <Active Mode With HWP_>`_,
412422 the operation mode of the driver cannot be changed), and if it is not
413− supported in the current configuration, writes to this attribute with
423+ supported in the current configuration, writes to this attribute will
414424 fail with an appropriate error.
415425
416426 Interpretation of Policy Attributes
Documentation/core-api/kernel-api.rst+1−1
@@ -284,7 +284,7 @@ Resources Management · 283 unmodified lines
284284 MTRR Handling
285285 -------------
286286
287−.. kernel-doc:: arch/x86/kernel/cpu/mtrr/main.c
287+.. kernel-doc:: arch/x86/kernel/cpu/mtrr/mtrr.c
288288 :export:
289289
290290 Security Framework
Documentation/device-mapper/writecache.txt+2−0
@@ -15,6 +15,8 @@ Constructor parameters: · 14 unmodified lines
1515 size)
1616 5. the number of optional parameters (the parameters with an argument
1717 count as two)
18+ start_sector n (default: 0)
19+ offset from the start of cache device in 512-byte sectors
1820 high_watermark n (default: 50)
1921 start writeback when the number of used blocks reach this
2022 watermark
Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt+1−1
@@ -66,7 +66,7 @@ Required root node properties: · 65 unmodified lines
6666 - "insignal,arndale-octa" - for Exynos5420-based Insignal Arndale
6767 Octa board.
6868 - "insignal,origen" - for Exynos4210-based Insignal Origen board.
69− - "insignal,origen4412 - for Exynos4412-based Insignal Origen board.
69+ - "insignal,origen4412" - for Exynos4412-based Insignal Origen board.
7070
7171
7272 Optional nodes:
Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt+1−1
@@ -36,7 +36,7 @@ Optional nodes: · 35 unmodified lines
3636
3737 - port/ports: to describe a connection to an external encoder. The
3838 binding follows Documentation/devicetree/bindings/graph.txt and
39− suppors a single port with a single endpoint.
39+ supports a single port with a single endpoint.
4040
4141 - See also Documentation/devicetree/bindings/display/tilcdc/panel.txt and
4242 Documentation/devicetree/bindings/display/tilcdc/tfp410.txt for connecting
Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt+1−1
@@ -1,7 +1,7 @@
11 Nintendo Wii (Hollywood) GPIO controller
22
33 Required properties:
4−- compatible: "nintendo,hollywood-gpio
4+- compatible: "nintendo,hollywood-gpio"
55 - reg: Physical base address and length of the controller's registers.
66 - gpio-controller: Marks the device node as a GPIO controller.
77 - #gpio-cells: Should be <2>. The first cell is the pin number and the
Documentation/devicetree/bindings/input/sprd,sc27xx-vibra.txt+23−0
@@ -0,0 +1,23 @@
1+Spreadtrum SC27xx PMIC Vibrator
2+
3+Required properties:
4+- compatible: should be "sprd,sc2731-vibrator".
5+- reg: address of vibrator control register.
6+
7+Example :
8+
9+ sc2731_pmic: pmic@0 {
10+ compatible = "sprd,sc2731";
11+ reg = <0>;
12+ spi-max-frequency = <26000000>;
13+ interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
14+ interrupt-controller;
15+ #interrupt-cells = <2>;
16+ #address-cells = <1>;
17+ #size-cells = <0>;
18+
19+ vibrator@eb4 {
20+ compatible = "sprd,sc2731-vibrator";
21+ reg = <0xeb4>;
22+ };
23+ };
Documentation/devicetree/bindings/input/touchscreen/hideep.txt+1−1
@@ -32,7 +32,7 @@ i2c@00000000 { · 31 unmodified lines
3232 reg = <0x6c>;
3333 interrupt-parent = <&gpx1>;
3434 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
35− vdd-supply = <&ldo15_reg>";
35+ vdd-supply = <&ldo15_reg>;
3636 vid-supply = <&ldo18_reg>;
3737 reset-gpios = <&gpx1 5 0>;
3838 touchscreen-size-x = <1080>;
Documentation/devicetree/bindings/interrupt-controller/nvidia,tegra20-ictlr.txt+1−1
@@ -15,7 +15,7 @@ Required properties: · 14 unmodified lines
1515 include "nvidia,tegra30-ictlr".
1616 - reg : Specifies base physical address and size of the registers.
1717 Each controller must be described separately (Tegra20 has 4 of them,
18− whereas Tegra30 and later have 5"
18+ whereas Tegra30 and later have 5).
1919 - interrupt-controller : Identifies the node as an interrupt controller.
2020 - #interrupt-cells : Specifies the number of cells needed to encode an
2121 interrupt source. The value must be 3.
Documentation/devicetree/bindings/interrupt-controller/st,stm32-exti.txt+1−1
@@ -12,7 +12,7 @@ Required properties: · 11 unmodified lines
1212 specifier, shall be 2
1313 - interrupts: interrupts references to primary interrupt controller
1414 (only needed for exti controller with multiple exti under
15− same parent interrupt: st,stm32-exti and st,stm32h7-exti")
15+ same parent interrupt: st,stm32-exti and st,stm32h7-exti)
1616
1717 Example:
1818
Documentation/devicetree/bindings/mips/brcm/soc.txt+1−1
@@ -152,7 +152,7 @@ Required properties: · 151 unmodified lines
152152 - compatible : should contain one of:
153153 "brcm,bcm7425-timers"
154154 "brcm,bcm7429-timers"
155− "brcm,bcm7435-timers and
155+ "brcm,bcm7435-timers" and
156156 "brcm,brcmstb-timers"
157157 - reg : the timers register range
158158 - interrupts : the interrupt line for this timer block
Documentation/devicetree/bindings/net/fsl-fman.txt+1−1
@@ -238,7 +238,7 @@ PROPERTIES · 237 unmodified lines
238238 Must include one of the following:
239239 - "fsl,fman-dtsec" for dTSEC MAC
240240 - "fsl,fman-xgec" for XGEC MAC
241− - "fsl,fman-memac for mEMAC MAC
241+ - "fsl,fman-memac" for mEMAC MAC
242242
243243 - cell-index
244244 Usage: required
Documentation/devicetree/bindings/power/power_domain.txt+1−1
@@ -133,7 +133,7 @@ located inside a PM domain with index 0 of a power controller represented by a · 132 unmodified lines
133133 node with the label "power".
134134 In the second example the consumer device are partitioned across two PM domains,
135135 the first with index 0 and the second with index 1, of a power controller that
136−is represented by a node with the label "power.
136+is represented by a node with the label "power".
137137
138138 Optional properties:
139139 - required-opps: This contains phandle to an OPP node in another device's OPP
Documentation/devicetree/bindings/regulator/tps65090.txt+1−1
@@ -16,7 +16,7 @@ Required properties: · 15 unmodified lines
1616 Optional properties:
1717 - ti,enable-ext-control: This is applicable for DCDC1, DCDC2 and DCDC3.
1818 If DCDCs are externally controlled then this property should be there.
19−- "dcdc-ext-control-gpios: This is applicable for DCDC1, DCDC2 and DCDC3.
19+- dcdc-ext-control-gpios: This is applicable for DCDC1, DCDC2 and DCDC3.
2020 If DCDCs are externally controlled and if it is from GPIO then GPIO
2121 number should be provided. If it is externally controlled and no GPIO
2222 entry then driver will just configure this rails as external control
Documentation/devicetree/bindings/reset/st,sti-softreset.txt+1−1
@@ -15,7 +15,7 @@ Please refer to reset.txt in this directory for common reset · 14 unmodified lines
1515 controller binding usage.
1616
1717 Required properties:
18−- compatible: Should be st,stih407-softreset";
18+- compatible: Should be "st,stih407-softreset";
1919 - #reset-cells: 1, see below
2020
2121 example:
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt+1−1
@@ -39,7 +39,7 @@ Required properties: · 38 unmodified lines
3939
4040 Optional property:
4141 - clock-frequency: Desired I2C bus clock frequency in Hz.
42− When missing default to 400000Hz.
42+ When missing default to 100000Hz.
4343
4444 Child nodes should conform to I2C bus binding as described in i2c.txt.
4545
Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt+1−1
@@ -30,7 +30,7 @@ Required properties: · 29 unmodified lines
3030
3131 Board connectors:
3232 * Headset Mic
33− * Secondary Mic",
33+ * Secondary Mic
3434 * DMIC
3535 * Ext Spk
3636
Documentation/devicetree/bindings/sound/qcom,apq8096.txt+1−1
@@ -35,7 +35,7 @@ This binding describes the APQ8096 sound card, which uses qdsp for audio. · 34 unmodified lines
3535 "Digital Mic3"
3636
3737 Audio pins and MicBias on WCD9335 Codec:
38− "MIC_BIAS1
38+ "MIC_BIAS1"
3939 "MIC_BIAS2"
4040 "MIC_BIAS3"
4141 "MIC_BIAS4"
Documentation/devicetree/bindings/usb/rockchip,dwc3.txt+2−1
@@ -16,7 +16,8 @@ A child node must exist to represent the core DWC3 IP block. The name of · 15 unmodified lines
1616 the node is not important. The content of the node is defined in dwc3.txt.
1717
1818 Phy documentation is provided in the following places:
19−Documentation/devicetree/bindings/phy/qcom-dwc3-usb-phy.txt
19+Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.txt - USB2.0 PHY
20+Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt - Type-C PHY
2021
2122 Example device nodes:
2223
Documentation/devicetree/bindings/w1/w1-gpio.txt+1−1
@@ -15,7 +15,7 @@ Optional properties: · 14 unmodified lines
1515
1616 Examples:
1717
18− onewire@0 {
18+ onewire {
1919 compatible = "w1-gpio";
2020 gpios = <&gpio 126 0>, <&gpio 105 0>;
2121 };
Documentation/driver-api/infrastructure.rst+2−2
@@ -49,10 +49,10 @@ Device Drivers Base · 48 unmodified lines
4949 Device Drivers DMA Management
5050 -----------------------------
5151
52−.. kernel-doc:: drivers/base/dma-coherent.c
52+.. kernel-doc:: kernel/dma/coherent.c
5353 :export:
5454
55−.. kernel-doc:: drivers/base/dma-mapping.c
55+.. kernel-doc:: kernel/dma/mapping.c
5656 :export:
5757
5858 Device drivers PnP support
Documentation/filesystems/Locking+1−6
@@ -441,8 +441,6 @@ prototypes: · 440 unmodified lines
441441 int (*iterate) (struct file *, struct dir_context *);
442442 int (*iterate_shared) (struct file *, struct dir_context *);
443443 __poll_t (*poll) (struct file *, struct poll_table_struct *);
444− struct wait_queue_head * (*get_poll_head)(struct file *, __poll_t);
445− __poll_t (*poll_mask) (struct file *, __poll_t);
446444 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
447445 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
448446 int (*mmap) (struct file *, struct vm_area_struct *);
@@ -473,7 +471,7 @@ prototypes: · 24 unmodified lines
473471 };
474472
475473 locking rules:
476− All except for ->poll_mask may block.
474+ All may block.
477475
478476 ->llseek() locking has moved from llseek to the individual llseek
479477 implementations. If your fs is not using generic_file_llseek, you
@@ -505,9 +503,6 @@ in sys_read() and friends. · 25 unmodified lines
505503 the lease within the individual filesystem to record the result of the
506504 operation
507505
508−->poll_mask can be called with or without the waitqueue lock for the waitqueue
509−returned from ->get_poll_head.
510−
511506 --------------------------- dquot_operations -------------------------------
512507 prototypes:
513508 int (*write_dquot) (struct dquot *);
Documentation/filesystems/cifs/AUTHORS+4−3
@@ -42,9 +42,11 @@ Jeff Layton (many, many fixes, as well as great work on the cifs Kerberos code) · 41 unmodified lines
4242 Scott Lovenberg
4343 Pavel Shilovsky (for great work adding SMB2 support, and various SMB3 features)
4444 Aurelien Aptel (for DFS SMB3 work and some key bug fixes)
45−Ronnie Sahlberg (for SMB3 xattr work and bug fixes)
45+Ronnie Sahlberg (for SMB3 xattr work, bug fixes, and lots of great work on compounding)
4646 Shirish Pargaonkar (for many ACL patches over the years)
4747 Sachin Prabhu (many bug fixes, including for reconnect, copy offload and security)
48+Paulo Alcantara
49+Long Li (some great work on RDMA, SMB Direct)
4850
4951
5052 Test case and Bug Report contributors
@@ -58,5 +60,4 @@ mention to the Stanford Checker (SWAT) which pointed out many minor · 7 unmodified lines
5860 bugs in error paths. Valuable suggestions also have come from Al Viro
5961 and Dave Miller.
6062
61−And thanks to the IBM LTC and Power test teams and SuSE testers for
62−finding multiple bugs during excellent stress test runs.
63+And thanks to the IBM LTC and Power test teams and SuSE and Citrix and RedHat testers for finding multiple bugs during excellent stress test runs.
Documentation/filesystems/cifs/CHANGES+3−0
@@ -1,3 +1,6 @@
1+See https://wiki.samba.org/index.php/LinuxCIFSKernel for
2+more current information.
3+
14 Version 1.62
25 ------------
36 Add sockopt=TCP_NODELAY mount option. EA (xattr) routines hardened
Documentation/filesystems/cifs/TODO+9−8
@@ -9,14 +9,14 @@ is a partial list of the known problems and missing features: · 8 unmodified lines
99
1010 a) SMB3 (and SMB3.02) missing optional features:
1111 - multichannel (started), integration with RDMA
12− - directory leases (improved metadata caching)
13− - T10 copy offload (copy chunk, and "Duplicate Extents" ioctl
12+ - directory leases (improved metadata caching), started (root dir only)
13+ - T10 copy offload ie "ODX" (copy chunk, and "Duplicate Extents" ioctl
1414 currently the only two server side copy mechanisms supported)
1515
1616 b) improved sparse file support
1717
1818 c) Directory entry caching relies on a 1 second timer, rather than
19−using Directory Leases
19+using Directory Leases, currently only the root file handle is cached longer
2020
2121 d) quota support (needs minor kernel change since quota calls
2222 to make it to network filesystems or deviceless filesystems)
@@ -42,6 +42,8 @@ mount or a per server basis to client UIDs or nobody if no mapping · 19 unmodified lines
4242 exists. Also better integration with winbind for resolving SID owners
4343
4444 k) Add tools to take advantage of more smb3 specific ioctls and features
45+(passthrough ioctl/fsctl for sending various SMB3 fsctls to the server
46+is in progress)
4547
4648 l) encrypted file support
4749
@@ -71,9 +73,8 @@ t) split cifs and smb3 support into separate modules so legacy (and less · 23 unmodified lines
7173 secure) CIFS dialect can be disabled in environments that don't need it
7274 and simplify the code.
7375
74−u) Finish up SMB3.1.1 dialect support
75−
76−v) POSIX Extensions for SMB3.1.1
76+v) POSIX Extensions for SMB3.1.1 (started, create and mkdir support added
77+so far).
7778
7879 KNOWN BUGS
7980 ====================================
@@ -92,8 +93,8 @@ Misc testing to do · 12 unmodified lines
9293 1) check out max path names and max path name components against various server
9394 types. Try nested symlinks (8 deep). Return max path name in stat -f information
9495
95−2) Improve xfstest's cifs enablement and adapt xfstests where needed to test
96−cifs better
96+2) Improve xfstest's cifs/smb3 enablement and adapt xfstests where needed to test
97+cifs/smb3 better
9798
9899 3) Additional performance testing and optimization using iozone and similar -
99100 there are some easy changes that can be done to parallelize sequential writes,
Documentation/filesystems/vfs.txt+0−13
@@ -857,8 +857,6 @@ struct file_operations { · 856 unmodified lines
857857 ssize_t (*write_iter) (struct kiocb *, struct iov_iter *);
858858 int (*iterate) (struct file *, struct dir_context *);
859859 __poll_t (*poll) (struct file *, struct poll_table_struct *);
860− struct wait_queue_head * (*get_poll_head)(struct file *, __poll_t);
861− __poll_t (*poll_mask) (struct file *, __poll_t);
862860 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
863861 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
864862 int (*mmap) (struct file *, struct vm_area_struct *);
@@ -903,17 +901,6 @@ otherwise noted. · 38 unmodified lines
903901 activity on this file and (optionally) go to sleep until there
904902 is activity. Called by the select(2) and poll(2) system calls
905903
906− get_poll_head: Returns the struct wait_queue_head that callers can
907− wait on. Callers need to check the returned events using ->poll_mask
908− once woken. Can return NULL to indicate polling is not supported,
909− or any error code using the ERR_PTR convention to indicate that a
910− grave error occured and ->poll_mask shall not be called.
911−
912− poll_mask: return the mask of EPOLL* values describing the file descriptor
913− state. Called either before going to sleep on the waitqueue returned by
914− get_poll_head, or after it has been woken. If ->get_poll_head and
915− ->poll_mask are implemented ->poll does not need to be implement.
916−
917904 unlocked_ioctl: called by the ioctl(2) system call.
918905
919906 compat_ioctl: called by the ioctl(2) system call when 32 bit system calls
Documentation/kbuild/kbuild.txt+7−10
@@ -50,6 +50,11 @@ LDFLAGS_MODULE · 49 unmodified lines
5050 --------------------------------------------------
5151 Additional options used for $(LD) when linking modules.
5252
53+KBUILD_KCONFIG
54+--------------------------------------------------
55+Set the top-level Kconfig file to the value of this environment
56+variable. The default name is "Kconfig".
57+
5358 KBUILD_VERBOSE
5459 --------------------------------------------------
5560 Set the kbuild verbosity. Can be assigned same values as "V=...".
@@ -88,7 +93,8 @@ In most cases the name of the architecture is the same as the · 32 unmodified lines
8893 directory name found in the arch/ directory.
8994 But some architectures such as x86 and sparc have aliases.
9095 x86: i386 for 32 bit, x86_64 for 64 bit
91−sparc: sparc for 32 bit, sparc64 for 64 bit
96+sh: sh for 32 bit, sh64 for 64 bit
97+sparc: sparc32 for 32 bit, sparc64 for 64 bit
9298
9399 CROSS_COMPILE
94100 --------------------------------------------------
@@ -148,15 +154,6 @@ stripped after they are installed. If INSTALL_MOD_STRIP is '1', then · 53 unmodified lines
148154 the default option --strip-debug will be used. Otherwise,
149155 INSTALL_MOD_STRIP value will be used as the options to the strip command.
150156
151−INSTALL_FW_PATH
152−--------------------------------------------------
153−INSTALL_FW_PATH specifies where to install the firmware blobs.
154−The default value is:
155−
156− $(INSTALL_MOD_PATH)/lib/firmware
157−
158−The value can be overridden in which case the default value is ignored.
159−
160157 INSTALL_HDR_PATH
161158 --------------------------------------------------
162159 INSTALL_HDR_PATH specifies where to install user space headers when
Documentation/kbuild/kconfig-language.txt+6−0
@@ -430,6 +430,12 @@ This sets the config program's title bar if the config program chooses · 429 unmodified lines
430430 to use it. It should be placed at the top of the configuration, before any
431431 other statement.
432432
433+'#' Kconfig source file comment:
434+
435+An unquoted '#' character anywhere in a source file line indicates
436+the beginning of a source file comment. The remainder of that line
437+is a comment.
438+
433439
434440 Kconfig hints
435441 -------------
Documentation/kbuild/kconfig.txt+43−8
@@ -2,9 +2,9 @@ This file contains some assistance for using "make *config". · 1 unmodified line
22
33 Use "make help" to list all of the possible configuration targets.
44
5−The xconfig ('qconf') and menuconfig ('mconf') programs also
6−have embedded help text. Be sure to check it for navigation,
7−search, and other general help text.
5+The xconfig ('qconf'), menuconfig ('mconf'), and nconfig ('nconf')
6+programs also have embedded help text. Be sure to check that for
7+navigation, search, and other general help text.
88
99 ======================================================================
1010 General
@@ -17,13 +17,16 @@ this happens, using a previously working .config file and running · 6 unmodified lines
1717 for you, so you may find that you need to see what NEW kernel
1818 symbols have been introduced.
1919
20−To see a list of new config symbols when using "make oldconfig", use
20+To see a list of new config symbols, use
2121
2222 cp user/some/old.config .config
2323 make listnewconfig
2424
2525 and the config program will list any new symbols, one per line.
2626
27+Alternatively, you can use the brute force method:
28+
29+ make oldconfig
2730 scripts/diffconfig .config.old .config | less
2831
2932 ______________________________________________________________________
@@ -160,7 +163,7 @@ Searching in menuconfig: · 130 unmodified lines
160163 This lists all config symbols that contain "hotplug",
161164 e.g., HOTPLUG_CPU, MEMORY_HOTPLUG.
162165
163− For search help, enter / followed TAB-TAB-TAB (to highlight
166+ For search help, enter / followed by TAB-TAB (to highlight
164167 <Help>) and Enter. This will tell you that you can also use
165168 regular expressions (regexes) in the search string, so if you
166169 are not interested in MEMORY_HOTPLUG, you could try
@@ -202,6 +205,39 @@ Example: · 35 unmodified lines
202205 make MENUCONFIG_MODE=single_menu menuconfig
203206
204207
208+======================================================================
209+nconfig
210+--------------------------------------------------
211+
212+nconfig is an alternate text-based configurator. It lists function
213+keys across the bottom of the terminal (window) that execute commands.
214+You can also just use the corresponding numeric key to execute the
215+commands unless you are in a data entry window. E.g., instead of F6
216+for Save, you can just press 6.
217+
218+Use F1 for Global help or F3 for the Short help menu.
219+
220+Searching in nconfig:
221+
222+ You can search either in the menu entry "prompt" strings
223+ or in the configuration symbols.
224+
225+ Use / to begin a search through the menu entries. This does
226+ not support regular expressions. Use <Down> or <Up> for
227+ Next hit and Previous hit, respectively. Use <Esc> to
228+ terminate the search mode.
229+
230+ F8 (SymSearch) searches the configuration symbols for the
231+ given string or regular expression (regex).
232+
233+NCONFIG_MODE
234+--------------------------------------------------
235+This mode shows all sub-menus in one large tree.
236+
237+Example:
238+ make NCONFIG_MODE=single_menu nconfig
239+
240+
205241 ======================================================================
206242 xconfig
207243 --------------------------------------------------
@@ -230,8 +266,7 @@ gconfig · 22 unmodified lines
230266
231267 Searching in gconfig:
232268
233− None (gconfig isn't maintained as well as xconfig or menuconfig);
234− however, gconfig does have a few more viewing choices than
235− xconfig does.
269+ There is no search command in gconfig. However, gconfig does
270+ have several different viewing choices, modes, and options.
236271
237272 ###
Documentation/networking/bonding.txt+1−1
@@ -1490,7 +1490,7 @@ To remove an ARP target: · 1489 unmodified lines
14901490
14911491 To configure the interval between learning packet transmits:
14921492 # echo 12 > /sys/class/net/bond0/bonding/lp_interval
1493− NOTE: the lp_inteval is the number of seconds between instances where
1493+ NOTE: the lp_interval is the number of seconds between instances where
14941494 the bonding driver sends learning packets to each slaves peer switch. The
14951495 default interval is 1 second.
14961496
Documentation/networking/dpaa2/overview.rst+1−0
@@ -1,5 +1,6 @@
11 .. include:: <isonum.txt>
22
3+=========================================================
34 DPAA2 (Data Path Acceleration Architecture Gen2) Overview
45 =========================================================
56
Documentation/networking/e100.rst+70−61
@@ -1,3 +1,4 @@
1+==============================================================
12 Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters
23 ==============================================================
34
@@ -46,123 +47,131 @@ Driver Configuration Parameters · 42 unmodified lines
4647 The default value for each parameter is generally the recommended setting,
4748 unless otherwise noted.
4849
49−Rx Descriptors: Number of receive descriptors. A receive descriptor is a data
50+Rx Descriptors:
51+ Number of receive descriptors. A receive descriptor is a data
5052 structure that describes a receive buffer and its attributes to the network
5153 controller. The data in the descriptor is used by the controller to write
5254 data from the controller to host memory. In the 3.x.x driver the valid range
5355 for this parameter is 64-256. The default value is 256. This parameter can be
5456 changed using the command::
5557
56− ethtool -G eth? rx n
58+ ethtool -G eth? rx n
5759
5860 Where n is the number of desired Rx descriptors.
5961
60−Tx Descriptors: Number of transmit descriptors. A transmit descriptor is a data
62+Tx Descriptors:
63+ Number of transmit descriptors. A transmit descriptor is a data
6164 structure that describes a transmit buffer and its attributes to the network
6265 controller. The data in the descriptor is used by the controller to read
6366 data from the host memory to the controller. In the 3.x.x driver the valid
6467 range for this parameter is 64-256. The default value is 128. This parameter
6568 can be changed using the command::
6669
67− ethtool -G eth? tx n
70+ ethtool -G eth? tx n
6871
6972 Where n is the number of desired Tx descriptors.
7073
71−Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by
74+Speed/Duplex:
75+ The driver auto-negotiates the link speed and duplex settings by
7276 default. The ethtool utility can be used as follows to force speed/duplex.::
7377
74− ethtool -s eth? autoneg off speed {10|100} duplex {full|half}
78+ ethtool -s eth? autoneg off speed {10|100} duplex {full|half}
7579
7680 NOTE: setting the speed/duplex to incorrect values will cause the link to
7781 fail.
7882
79−Event Log Message Level: The driver uses the message level flag to log events
83+Event Log Message Level:
84+ The driver uses the message level flag to log events
8085 to syslog. The message level can be set at driver load time. It can also be
8186 set using the command::
8287
83− ethtool -s eth? msglvl n
88+ ethtool -s eth? msglvl n
8489
8590
8691 Additional Configurations
8792 =========================
8893
89− Configuring the Driver on Different Distributions
90− -------------------------------------------------
94+Configuring the Driver on Different Distributions
95+-------------------------------------------------
9196
92− Configuring a network driver to load properly when the system is started is
93− distribution dependent. Typically, the configuration process involves adding
94− an alias line to /etc/modprobe.d/*.conf as well as editing other system
95− startup scripts and/or configuration files. Many popular Linux
96− distributions ship with tools to make these changes for you. To learn the
97− proper way to configure a network device for your system, refer to your
98− distribution documentation. If during this process you are asked for the
99− driver or module name, the name for the Linux Base Driver for the Intel
100− PRO/100 Family of Adapters is e100.
97+Configuring a network driver to load properly when the system is started
98+is distribution dependent. Typically, the configuration process involves
99+adding an alias line to `/etc/modprobe.d/*.conf` as well as editing other
100+system startup scripts and/or configuration files. Many popular Linux
101+distributions ship with tools to make these changes for you. To learn
102+the proper way to configure a network device for your system, refer to
103+your distribution documentation. If during this process you are asked
104+for the driver or module name, the name for the Linux Base Driver for
105+the Intel PRO/100 Family of Adapters is e100.
101106
102− As an example, if you install the e100 driver for two PRO/100 adapters
103− (eth0 and eth1), add the following to a configuration file in /etc/modprobe.d/
107+As an example, if you install the e100 driver for two PRO/100 adapters
108+(eth0 and eth1), add the following to a configuration file in
109+/etc/modprobe.d/::
104110
105111 alias eth0 e100
106112 alias eth1 e100
107113
108− Viewing Link Messages
109− ---------------------
110− In order to see link messages and other Intel driver information on your
111− console, you must set the dmesg level up to six. This can be done by
112− entering the following on the command line before loading the e100 driver::
114+Viewing Link Messages
115+---------------------
116+
117+In order to see link messages and other Intel driver information on your
118+console, you must set the dmesg level up to six. This can be done by
119+entering the following on the command line before loading the e100
120+driver::
113121
114122 dmesg -n 6
115123
116− If you wish to see all messages issued by the driver, including debug
117− messages, set the dmesg level to eight.
124+If you wish to see all messages issued by the driver, including debug
125+messages, set the dmesg level to eight.
118126
119− NOTE: This setting is not saved across reboots.
127+NOTE: This setting is not saved across reboots.
120128
129+ethtool
130+-------
121131
122− ethtool
123− -------
132+The driver utilizes the ethtool interface for driver configuration and
133+diagnostics, as well as displaying statistical information. The ethtool
134+version 1.6 or later is required for this functionality.
124135
125− The driver utilizes the ethtool interface for driver configuration and
126− diagnostics, as well as displaying statistical information. The ethtool
127− version 1.6 or later is required for this functionality.
136+The latest release of ethtool can be found from
137+https://www.kernel.org/pub/software/network/ethtool/
128138
129− The latest release of ethtool can be found from
130− https://www.kernel.org/pub/software/network/ethtool/
139+Enabling Wake on LAN* (WoL)
140+---------------------------
141+WoL is provided through the ethtool* utility. For instructions on
142+enabling WoL with ethtool, refer to the ethtool man page. WoL will be
143+enabled on the system during the next shut down or reboot. For this
144+driver version, in order to enable WoL, the e100 driver must be loaded
145+when shutting down or rebooting the system.
131146
132− Enabling Wake on LAN* (WoL)
133− ---------------------------
134− WoL is provided through the ethtool* utility. For instructions on enabling
135− WoL with ethtool, refer to the ethtool man page.
147+NAPI
148+----
136149
137− WoL will be enabled on the system during the next shut down or reboot. For
138− this driver version, in order to enable WoL, the e100 driver must be
139− loaded when shutting down or rebooting the system.
150+NAPI (Rx polling mode) is supported in the e100 driver.
140151
141− NAPI
142− ----
152+See https://wiki.linuxfoundation.org/networking/napi for more
153+information on NAPI.
143154
144− NAPI (Rx polling mode) is supported in the e100 driver.
155+Multiple Interfaces on Same Ethernet Broadcast Network
156+------------------------------------------------------
145157
146− See https://wiki.linuxfoundation.org/networking/napi for more information
147− on NAPI.
158+Due to the default ARP behavior on Linux, it is not possible to have one
159+system on two IP networks in the same Ethernet broadcast domain
160+(non-partitioned switch) behave as expected. All Ethernet interfaces
161+will respond to IP traffic for any IP address assigned to the system.
162+This results in unbalanced receive traffic.
148163
149− Multiple Interfaces on Same Ethernet Broadcast Network
150− ------------------------------------------------------
164+If you have multiple interfaces in a server, either turn on ARP
165+filtering by
151166
152− Due to the default ARP behavior on Linux, it is not possible to have
153− one system on two IP networks in the same Ethernet broadcast domain
154− (non-partitioned switch) behave as expected. All Ethernet interfaces
155− will respond to IP traffic for any IP address assigned to the system.
156− This results in unbalanced receive traffic.
167+(1) entering::
157168
158− If you have multiple interfaces in a server, either turn on ARP
159− filtering by
169+ echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
160170
161− (1) entering:: echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
162− (this only works if your kernel's version is higher than 2.4.5), or
171+ (this only works if your kernel's version is higher than 2.4.5), or
163172
164− (2) installing the interfaces in separate broadcast domains (either
165− in different switches or in a switch partitioned to VLANs).
173+(2) installing the interfaces in separate broadcast domains (either
174+ in different switches or in a switch partitioned to VLANs).
166175
167176
168177 Support
Documentation/networking/e1000.rst+94−55
@@ -1,3 +1,4 @@
1+===========================================================
12 Linux* Base Driver for Intel(R) Ethernet Network Connection
23 ===========================================================
34
@@ -33,7 +34,8 @@ Command Line Parameters · 29 unmodified lines
3334 The default value for each parameter is generally the recommended setting,
3435 unless otherwise noted.
3536
36−NOTES: For more information about the AutoNeg, Duplex, and Speed
37+NOTES:
38+ For more information about the AutoNeg, Duplex, and Speed
3739 parameters, see the "Speed and Duplex Configuration" section in
3840 this document.
3941
@@ -44,22 +46,27 @@ NOTES: For more information about the AutoNeg, Duplex, and Speed · 4 unmodified lines
4446
4547 AutoNeg
4648 -------
49+
4750 (Supported only on adapters with copper connections)
48−Valid Range: 0x01-0x0F, 0x20-0x2F
49−Default Value: 0x2F
51+
52+:Valid Range: 0x01-0x0F, 0x20-0x2F
53+:Default Value: 0x2F
5054
5155 This parameter is a bit-mask that specifies the speed and duplex settings
5256 advertised by the adapter. When this parameter is used, the Speed and
5357 Duplex parameters must not be specified.
5458
55−NOTE: Refer to the Speed and Duplex section of this readme for more
59+NOTE:
60+ Refer to the Speed and Duplex section of this readme for more
5661 information on the AutoNeg parameter.
5762
5863 Duplex
5964 ------
65+
6066 (Supported only on adapters with copper connections)
61−Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full)
62−Default Value: 0
67+
68+:Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full)
69+:Default Value: 0
6370
6471 This defines the direction in which data is allowed to flow. Can be
6572 either one or two-directional. If both Duplex and the link partner are
@@ -69,18 +76,22 @@ duplex. · 3 unmodified lines
6976
7077 FlowControl
7178 -----------
72−Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx)
73−Default Value: Reads flow control settings from the EEPROM
79+
80+:Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx)
81+:Default Value: Reads flow control settings from the EEPROM
7482
7583 This parameter controls the automatic generation(Tx) and response(Rx)
7684 to Ethernet PAUSE frames.
7785
7886 InterruptThrottleRate
7987 ---------------------
88+
8089 (not supported on Intel(R) 82542, 82543 or 82544-based adapters)
81−Valid Range: 0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative,
82− 4=simplified balancing)
83−Default Value: 3
90+
91+:Valid Range:
92+ 0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative,
93+ 4=simplified balancing)
94+:Default Value: 3
8495
8596 The driver can limit the amount of interrupts per second that the adapter
8697 will generate for incoming packets. It does this by writing a value to the
@@ -134,13 +145,15 @@ Setting InterruptThrottleRate to 0 turns off any interrupt moderation · 47 unmodified lines
134145 and may improve small packet latency, but is generally not suitable
135146 for bulk throughput traffic.
136147
137−NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and
148+NOTE:
149+ InterruptThrottleRate takes precedence over the TxAbsIntDelay and
138150 RxAbsIntDelay parameters. In other words, minimizing the receive
139151 and/or transmit absolute delays does not force the controller to
140152 generate more interrupts than what the Interrupt Throttle Rate
141153 allows.
142154
143−CAUTION: If you are using the Intel(R) PRO/1000 CT Network Connection
155+CAUTION:
156+ If you are using the Intel(R) PRO/1000 CT Network Connection
144157 (controller 82547), setting InterruptThrottleRate to a value
145158 greater than 75,000, may hang (stop transmitting) adapters
146159 under certain network conditions. If this occurs a NETDEV
@@ -150,7 +163,8 @@ CAUTION: If you are using the Intel(R) PRO/1000 CT Network Connection · 3 unmodified lines
150163 hang, ensure that InterruptThrottleRate is set no greater
151164 than 75,000 and is not set to 0.
152165
153−NOTE: When e1000 is loaded with default settings and multiple adapters
166+NOTE:
167+ When e1000 is loaded with default settings and multiple adapters
154168 are in use simultaneously, the CPU utilization may increase non-
155169 linearly. In order to limit the CPU utilization without impacting
156170 the overall throughput, we recommend that you load the driver as
@@ -167,9 +181,11 @@ NOTE: When e1000 is loaded with default settings and multiple adapters · 10 unmodified lines
167181
168182 RxDescriptors
169183 -------------
170−Valid Range: 48-256 for 82542 and 82543-based adapters
171− 48-4096 for all other supported adapters
172−Default Value: 256
184+
185+:Valid Range:
186+ - 48-256 for 82542 and 82543-based adapters
187+ - 48-4096 for all other supported adapters
188+:Default Value: 256
173189
174190 This value specifies the number of receive buffer descriptors allocated
175191 by the driver. Increasing this value allows the driver to buffer more
@@ -179,15 +195,17 @@ Each descriptor is 16 bytes. A receive buffer is also allocated for each · 3 unmodified lines
179195 descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending
180196 on the MTU setting. The maximum MTU size is 16110.
181197
182−NOTE: MTU designates the frame size. It only needs to be set for Jumbo
198+NOTE:
199+ MTU designates the frame size. It only needs to be set for Jumbo
183200 Frames. Depending on the available system resources, the request
184201 for a higher number of receive descriptors may be denied. In this
185202 case, use a lower number.
186203
187204 RxIntDelay
188205 ----------
189−Valid Range: 0-65535 (0=off)
190−Default Value: 0
206+
207+:Valid Range: 0-65535 (0=off)
208+:Default Value: 0
191209
192210 This value delays the generation of receive interrupts in units of 1.024
193211 microseconds. Receive interrupt reduction can improve CPU efficiency if
@@ -197,7 +215,8 @@ of TCP traffic. If the system is reporting dropped receives, this value · 3 unmodified lines
197215 may be set too high, causing the driver to run out of available receive
198216 descriptors.
199217
200−CAUTION: When setting RxIntDelay to a value other than 0, adapters may
218+CAUTION:
219+ When setting RxIntDelay to a value other than 0, adapters may
201220 hang (stop transmitting) under certain network conditions. If
202221 this occurs a NETDEV WATCHDOG message is logged in the system
203222 event log. In addition, the controller is automatically reset,
@@ -206,9 +225,11 @@ CAUTION: When setting RxIntDelay to a value other than 0, adapters may · 2 unmodified lines
206225
207226 RxAbsIntDelay
208227 -------------
228+
209229 (This parameter is supported only on 82540, 82545 and later adapters.)
210−Valid Range: 0-65535 (0=off)
211−Default Value: 128
230+
231+:Valid Range: 0-65535 (0=off)
232+:Default Value: 128
212233
213234 This value, in units of 1.024 microseconds, limits the delay in which a
214235 receive interrupt is generated. Useful only if RxIntDelay is non-zero,
@@ -219,9 +240,11 @@ conditions. · 4 unmodified lines
219240
220241 Speed
221242 -----
243+
222244 (This parameter is supported only on adapters with copper connections.)
223−Valid Settings: 0, 10, 100, 1000
224−Default Value: 0 (auto-negotiate at all supported speeds)
245+
246+:Valid Settings: 0, 10, 100, 1000
247+:Default Value: 0 (auto-negotiate at all supported speeds)
225248
226249 Speed forces the line speed to the specified value in megabits per second
227250 (Mbps). If this parameter is not specified or is set to 0 and the link
@@ -230,22 +253,26 @@ speed. Duplex should also be set when Speed is set to either 10 or 100. · 2 unmodified lines
230253
231254 TxDescriptors
232255 -------------
233−Valid Range: 48-256 for 82542 and 82543-based adapters
234− 48-4096 for all other supported adapters
235−Default Value: 256
256+
257+:Valid Range:
258+ - 48-256 for 82542 and 82543-based adapters
259+ - 48-4096 for all other supported adapters
260+:Default Value: 256
236261
237262 This value is the number of transmit descriptors allocated by the driver.
238263 Increasing this value allows the driver to queue more transmits. Each
239264 descriptor is 16 bytes.
240265
241−NOTE: Depending on the available system resources, the request for a
266+NOTE:
267+ Depending on the available system resources, the request for a
242268 higher number of transmit descriptors may be denied. In this case,
243269 use a lower number.
244270
245271 TxIntDelay
246272 ----------
247−Valid Range: 0-65535 (0=off)
248−Default Value: 8
273+
274+:Valid Range: 0-65535 (0=off)
275+:Default Value: 8
249276
250277 This value delays the generation of transmit interrupts in units of
251278 1.024 microseconds. Transmit interrupt reduction can improve CPU
@@ -255,9 +282,11 @@ causing the driver to run out of available transmit descriptors. · 3 unmodified lines
255282
256283 TxAbsIntDelay
257284 -------------
285+
258286 (This parameter is supported only on 82540, 82545 and later adapters.)
259−Valid Range: 0-65535 (0=off)
260−Default Value: 32
287+
288+:Valid Range: 0-65535 (0=off)
289+:Default Value: 32
261290
262291 This value, in units of 1.024 microseconds, limits the delay in which a
263292 transmit interrupt is generated. Useful only if TxIntDelay is non-zero,
@@ -268,18 +297,21 @@ network conditions. · 4 unmodified lines
268297
269298 XsumRX
270299 ------
300+
271301 (This parameter is NOT supported on the 82542-based adapter.)
272−Valid Range: 0-1
273−Default Value: 1
302+
303+:Valid Range: 0-1
304+:Default Value: 1
274305
275306 A value of '1' indicates that the driver should enable IP checksum
276307 offload for received packets (both UDP and TCP) to the adapter hardware.
277308
278309 Copybreak
279310 ---------
280−Valid Range: 0-xxxxxxx (0=off)
281−Default Value: 256
282−Usage: modprobe e1000.ko copybreak=128
311+
312+:Valid Range: 0-xxxxxxx (0=off)
313+:Default Value: 256
314+:Usage: modprobe e1000.ko copybreak=128
283315
284316 Driver copies all packets below or equaling this size to a fresh RX
285317 buffer before handing it up the stack.
@@ -291,8 +323,9 @@ it is also available during runtime at · 5 unmodified lines
291323
292324 SmartPowerDownEnable
293325 --------------------
294−Valid Range: 0-1
295−Default Value: 0 (disabled)
326+
327+:Valid Range: 0-1
328+:Default Value: 0 (disabled)
296329
297330 Allows PHY to turn off in lower power states. The user can turn off
298331 this parameter in supported chipsets.
@@ -308,14 +341,14 @@ fiber interface board only links at 1000 Mbps full-duplex. · 9 unmodified lines
308341
309342 For copper-based boards, the keywords interact as follows:
310343
311− The default operation is auto-negotiate. The board advertises all
344+- The default operation is auto-negotiate. The board advertises all
312345 supported speed and duplex combinations, and it links at the highest
313346 common speed and duplex mode IF the link partner is set to auto-negotiate.
314347
315− If Speed = 1000, limited auto-negotiation is enabled and only 1000 Mbps
348+- If Speed = 1000, limited auto-negotiation is enabled and only 1000 Mbps
316349 is advertised (The 1000BaseT spec requires auto-negotiation.)
317350
318− If Speed = 10 or 100, then both Speed and Duplex should be set. Auto-
351+- If Speed = 10 or 100, then both Speed and Duplex should be set. Auto-
319352 negotiation is disabled, and the AutoNeg parameter is ignored. Partner
320353 SHOULD also be forced.
321354
@@ -327,13 +360,15 @@ process. · 5 unmodified lines
327360 The parameter may be specified as either a decimal or hexadecimal value as
328361 determined by the bitmap below.
329362
363+============== ====== ====== ======= ======= ====== ====== ======= ======
330364 Bit position 7 6 5 4 3 2 1 0
331365 Decimal Value 128 64 32 16 8 4 2 1
332366 Hex value 80 40 20 10 8 4 2 1
333367 Speed (Mbps) N/A N/A 1000 N/A 100 100 10 10
334368 Duplex Full Full Half Full Half
369+============== ====== ====== ======= ======= ====== ====== ======= ======
335370
336−Some examples of using AutoNeg:
371+Some examples of using AutoNeg::
337372
338373 modprobe e1000 AutoNeg=0x01 (Restricts autonegotiation to 10 Half)
339374 modprobe e1000 AutoNeg=1 (Same as above)
@@ -354,8 +389,9 @@ previously mentioned to force the adapter to the same speed and duplex. · 14 unmodified lines
354389 Additional Configurations
355390 =========================
356391
357− Jumbo Frames
358− ------------
392+Jumbo Frames
393+------------
394+
359395 Jumbo Frames support is enabled by changing the MTU to a value larger than
360396 the default of 1500. Use the ifconfig command to increase the MTU size.
361397 For example::
@@ -367,11 +403,11 @@ Additional Configurations · 5 unmodified lines
367403
368404 MTU=9000
369405
370− to the file /etc/sysconfig/network-scripts/ifcfg-eth<x>. This example
371− applies to the Red Hat distributions; other distributions may store this
372− setting in a different location.
406+ to the file /etc/sysconfig/network-scripts/ifcfg-eth<x>. This example
407+ applies to the Red Hat distributions; other distributions may store this
408+ setting in a different location.
373409
374− Notes:
410+Notes:
375411 Degradation in throughput performance may be observed in some Jumbo frames
376412 environments. If this is observed, increasing the application's socket buffer
377413 size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values may help.
@@ -385,12 +421,14 @@ Additional Configurations · 7 unmodified lines
385421 poor performance or loss of link.
386422
387423 - Adapters based on the Intel(R) 82542 and 82573V/E controller do not
388− support Jumbo Frames. These correspond to the following product names:
424+ support Jumbo Frames. These correspond to the following product names::
425+
389426 Intel(R) PRO/1000 Gigabit Server Adapter
390427 Intel(R) PRO/1000 PM Network Connection
391428
392− ethtool
393− -------
429+ethtool
430+-------
431+
394432 The driver utilizes the ethtool interface for driver configuration and
395433 diagnostics, as well as displaying statistical information. The ethtool
396434 version 1.6 or later is required for this functionality.
@@ -398,8 +436,9 @@ Additional Configurations · 1 unmodified line
398436 The latest release of ethtool can be found from
399437 https://www.kernel.org/pub/software/network/ethtool/
400438
401− Enabling Wake on LAN* (WoL)
402− ---------------------------
439+Enabling Wake on LAN* (WoL)
440+---------------------------
441+
403442 WoL is configured through the ethtool* utility.
404443
405444 WoL will be enabled on the system during the next shut down or reboot.
Documentation/networking/strparser.txt+1−1
@@ -48,7 +48,7 @@ void strp_pause(struct strparser *strp) · 47 unmodified lines
4848 Temporarily pause a stream parser. Message parsing is suspended
4949 and no new messages are delivered to the upper layer.
5050
51−void strp_pause(struct strparser *strp)
51+void strp_unpause(struct strparser *strp)
5252
5353 Unpause a paused stream parser.
5454
Documentation/trace/histogram.txt+12−11
@@ -1729,35 +1729,35 @@ If a variable isn't a key variable or prefixed with 'vals=', the · 1728 unmodified lines
17291729 associated event field will be saved in a variable but won't be summed
17301730 as a value:
17311731
1732− # echo 'hist:keys=next_pid:ts1=common_timestamp ... >> event/trigger
1732+ # echo 'hist:keys=next_pid:ts1=common_timestamp ...' >> event/trigger
17331733
17341734 Multiple variables can be assigned at the same time. The below would
17351735 result in both ts0 and b being created as variables, with both
17361736 common_timestamp and field1 additionally being summed as values:
17371737
1738− # echo 'hist:keys=pid:vals=$ts0,$b:ts0=common_timestamp,b=field1 ... >> \
1738+ # echo 'hist:keys=pid:vals=$ts0,$b:ts0=common_timestamp,b=field1 ...' >> \
17391739 event/trigger
17401740
17411741 Note that variable assignments can appear either preceding or
17421742 following their use. The command below behaves identically to the
17431743 command above:
17441744
1745− # echo 'hist:keys=pid:ts0=common_timestamp,b=field1:vals=$ts0,$b ... >> \
1745+ # echo 'hist:keys=pid:ts0=common_timestamp,b=field1:vals=$ts0,$b ...' >> \
17461746 event/trigger
17471747
17481748 Any number of variables not bound to a 'vals=' prefix can also be
17491749 assigned by simply separating them with colons. Below is the same
17501750 thing but without the values being summed in the histogram:
17511751
1752− # echo 'hist:keys=pid:ts0=common_timestamp:b=field1 ... >> event/trigger
1752+ # echo 'hist:keys=pid:ts0=common_timestamp:b=field1 ...' >> event/trigger
17531753
17541754 Variables set as above can be referenced and used in expressions on
17551755 another event.
17561756
17571757 For example, here's how a latency can be calculated:
17581758
1759− # echo 'hist:keys=pid,prio:ts0=common_timestamp ... >> event1/trigger
1760− # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp-$ts0 ... >> event2/trigger
1759+ # echo 'hist:keys=pid,prio:ts0=common_timestamp ...' >> event1/trigger
1760+ # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp-$ts0 ...' >> event2/trigger
17611761
17621762 In the first line above, the event's timetamp is saved into the
17631763 variable ts0. In the next line, ts0 is subtracted from the second
@@ -1766,7 +1766,7 @@ yet another variable, 'wakeup_lat'. The hist trigger below in turn · 2 unmodified lines
17661766 makes use of the wakeup_lat variable to compute a combined latency
17671767 using the same key and variable from yet another event:
17681768
1769− # echo 'hist:key=pid:wakeupswitch_lat=$wakeup_lat+$switchtime_lat ... >> event3/trigger
1769+ # echo 'hist:key=pid:wakeupswitch_lat=$wakeup_lat+$switchtime_lat ...' >> event3/trigger
17701770
17711771 2.2.2 Synthetic Events
17721772 ----------------------
@@ -1807,10 +1807,11 @@ the command that defined it with a '!': · 34 unmodified lines
18071807 At this point, there isn't yet an actual 'wakeup_latency' event
18081808 instantiated in the event subsytem - for this to happen, a 'hist
18091809 trigger action' needs to be instantiated and bound to actual fields
1810−and variables defined on other events (see Section 6.3.3 below).
1810+and variables defined on other events (see Section 2.2.3 below on
1811+how that is done using hist trigger 'onmatch' action). Once that is
1812+done, the 'wakeup_latency' synthetic event instance is created.
18111813
1812−Once that is done, an event instance is created, and a histogram can
1813−be defined using it:
1814+A histogram can now be defined for the new synthetic event:
18141815
18151816 # echo 'hist:keys=pid,prio,lat.log2:sort=pid,lat' >> \
18161817 /sys/kernel/debug/tracing/events/synthetic/wakeup_latency/trigger
@@ -1960,7 +1961,7 @@ hist trigger specification. · 143 unmodified lines
19601961 back to that pid, the timestamp difference is calculated. If the
19611962 resulting latency, stored in wakeup_lat, exceeds the current
19621963 maximum latency, the values specified in the save() fields are
1963− recoreded:
1964+ recorded:
19641965
19651966 # echo 'hist:keys=pid:ts0=common_timestamp.usecs \
19661967 if comm=="cyclictest"' >> \
Documentation/usb/gadget_configfs.txt+1−1
@@ -226,7 +226,7 @@ $ rm configs/<config name>.<number>/<function> · 225 unmodified lines
226226 where <config name>.<number> specify the configuration and <function> is
227227 a symlink to a function being removed from the configuration, e.g.:
228228
229−$ rm configfs/c.1/ncm.usb0
229+$ rm configs/c.1/ncm.usb0
230230
231231 ...
232232 ...
Documentation/virtual/kvm/api.txt+1−1
@@ -4610,7 +4610,7 @@ This capability indicates that kvm will implement the interfaces to handle · 4609 unmodified lines
46104610 reset, migration and nested KVM for branch prediction blocking. The stfle
46114611 facility 82 should not be provided to the guest without this capability.
46124612
4613−8.14 KVM_CAP_HYPERV_TLBFLUSH
4613+8.18 KVM_CAP_HYPERV_TLBFLUSH
46144614
46154615 Architectures: x86
46164616
MAINTAINERS+51−25
@@ -581,7 +581,7 @@ W: https://www.infradead.org/~dhowells/kafs/ · 580 unmodified lines
581581
582582 AGPGART DRIVER
583583 M: David Airlie <airlied@linux.ie>
584−T: git git://people.freedesktop.org/~airlied/linux (part of drm maint)
584+T: git git://anongit.freedesktop.org/drm/drm
585585 S: Maintained
586586 F: drivers/char/agp/
587587 F: include/linux/agp*
@@ -2523,7 +2523,7 @@ S: Supported · 1935 unmodified lines
25232523 F: drivers/scsi/esas2r
25242524
25252525 ATUSB IEEE 802.15.4 RADIO DRIVER
2526−M: Stefan Schmidt <stefan@osg.samsung.com>
2526+M: Stefan Schmidt <stefan@datenfreihafen.org>
25272527 L: linux-wpan@vger.kernel.org
25282528 S: Maintained
25292529 F: drivers/net/ieee802154/atusb.c
@@ -2971,9 +2971,13 @@ N: bcm585* · 441 unmodified lines
29712971 N: bcm586*
29722972 N: bcm88312
29732973 N: hr2
2974−F: arch/arm64/boot/dts/broadcom/ns2*
2974+N: stingray
2975+F: arch/arm64/boot/dts/broadcom/northstar2/*
2976+F: arch/arm64/boot/dts/broadcom/stingray/*
29752977 F: drivers/clk/bcm/clk-ns*
2978+F: drivers/clk/bcm/clk-sr*
29762979 F: drivers/pinctrl/bcm/pinctrl-ns*
2980+F: include/dt-bindings/clock/bcm-sr*
29772981
29782982 BROADCOM KONA GPIO DRIVER
29792983 M: Ray Jui <rjui@broadcom.com>
@@ -4359,12 +4363,7 @@ L: iommu@lists.linux-foundation.org · 1379 unmodified lines
43594363 T: git git://git.infradead.org/users/hch/dma-mapping.git
43604364 W: http://git.infradead.org/users/hch/dma-mapping.git
43614365 S: Supported
4362−F: lib/dma-debug.c
4363−F: lib/dma-direct.c
4364−F: lib/dma-noncoherent.c
4365−F: lib/dma-virt.c
4366−F: drivers/base/dma-mapping.c
4367−F: drivers/base/dma-coherent.c
4366+F: kernel/dma/
43684367 F: include/asm-generic/dma-mapping.h
43694368 F: include/linux/dma-direct.h
43704369 F: include/linux/dma-mapping.h
@@ -4460,6 +4459,7 @@ F: Documentation/blockdev/drbd/ · 89 unmodified lines
44604459
44614460 DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
44624461 M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4462+R: "Rafael J. Wysocki" <rafael@kernel.org>
44634463 T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
44644464 S: Supported
44654465 F: Documentation/kobject.txt
@@ -4630,7 +4630,7 @@ F: include/uapi/drm/vmwgfx_drm.h · 164 unmodified lines
46304630 DRM DRIVERS
46314631 M: David Airlie <airlied@linux.ie>
46324632 L: dri-devel@lists.freedesktop.org
4633−T: git git://people.freedesktop.org/~airlied/linux
4633+T: git git://anongit.freedesktop.org/drm/drm
46344634 B: https://bugs.freedesktop.org/
46354635 C: irc://chat.freenode.net/dri-devel
46364636 S: Maintained
@@ -5443,6 +5443,7 @@ F: drivers/iommu/exynos-iommu.c · 806 unmodified lines
54435443
54445444 EZchip NPS platform support
54455445 M: Vineet Gupta <vgupta@synopsys.com>
5446+M: Ofer Levi <oferle@mellanox.com>
54465447 S: Supported
54475448 F: arch/arc/plat-eznps
54485449 F: arch/arc/boot/dts/eznps.dts
@@ -5673,7 +5674,7 @@ F: drivers/crypto/caam/ · 224 unmodified lines
56735674 F: Documentation/devicetree/bindings/crypto/fsl-sec4.txt
56745675
56755676 FREESCALE DIU FRAMEBUFFER DRIVER
5676−M: Timur Tabi <timur@tabi.org>
5677+M: Timur Tabi <timur@kernel.org>
56775678 L: linux-fbdev@vger.kernel.org
56785679 S: Maintained
56795680 F: drivers/video/fbdev/fsl-diu-fb.*
@@ -5773,7 +5774,7 @@ S: Maintained · 93 unmodified lines
57735774 F: drivers/net/wan/fsl_ucc_hdlc*
57745775
57755776 FREESCALE QUICC ENGINE UCC UART DRIVER
5776−M: Timur Tabi <timur@tabi.org>
5777+M: Timur Tabi <timur@kernel.org>
57775778 L: linuxppc-dev@lists.ozlabs.org
57785779 S: Maintained
57795780 F: drivers/tty/serial/ucc_uart.c
@@ -5789,7 +5790,6 @@ F: include/linux/fsl/ · 9 unmodified lines
57895790
57905791 FREESCALE SOC FS_ENET DRIVER
57915792 M: Pantelis Antoniou <pantelis.antoniou@gmail.com>
5792−M: Vitaly Bordug <vbordug@ru.mvista.com>
57935793 L: linuxppc-dev@lists.ozlabs.org
57945794 L: netdev@vger.kernel.org
57955795 S: Maintained
@@ -5797,7 +5797,7 @@ F: drivers/net/ethernet/freescale/fs_enet/ · 1 unmodified line
57975797 F: include/linux/fs_enet_pd.h
57985798
57995799 FREESCALE SOC SOUND DRIVERS
5800−M: Timur Tabi <timur@tabi.org>
5800+M: Timur Tabi <timur@kernel.org>
58015801 M: Nicolin Chen <nicoleotsuka@gmail.com>
58025802 M: Xiubo Li <Xiubo.Lee@gmail.com>
58035803 R: Fabio Estevam <fabio.estevam@nxp.com>
@@ -5929,7 +5929,7 @@ F: Documentation/dev-tools/gcov.rst · 125 unmodified lines
59295929
59305930 GDB KERNEL DEBUGGING HELPER SCRIPTS
59315931 M: Jan Kiszka <jan.kiszka@siemens.com>
5932−M: Kieran Bingham <kieran@bingham.xyz>
5932+M: Kieran Bingham <kbingham@kernel.org>
59335933 S: Supported
59345934 F: scripts/gdb/
59355935
@@ -6908,7 +6908,7 @@ F: drivers/clk/clk-versaclock5.c · 972 unmodified lines
69086908
69096909 IEEE 802.15.4 SUBSYSTEM
69106910 M: Alexander Aring <alex.aring@gmail.com>
6911−M: Stefan Schmidt <stefan@osg.samsung.com>
6911+M: Stefan Schmidt <stefan@datenfreihafen.org>
69126912 L: linux-wpan@vger.kernel.org
69136913 W: http://wpan.cakelab.org/
69146914 T: git git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan.git
@@ -7095,6 +7095,7 @@ F: include/uapi/linux/input.h · 180 unmodified lines
70957095 F: include/uapi/linux/input-event-codes.h
70967096 F: include/linux/input/
70977097 F: Documentation/devicetree/bindings/input/
7098+F: Documentation/devicetree/bindings/serio/
70987099 F: Documentation/input/
70997100
71007101 INPUT MULTITOUCH (MT) PROTOCOL
@@ -7983,7 +7984,7 @@ F: lib/test_kmod.c · 882 unmodified lines
79837984 F: tools/testing/selftests/kmod/
79847985
79857986 KPROBES
7986−M: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
7987+M: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
79877988 M: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
79887989 M: "David S. Miller" <davem@davemloft.net>
79897990 M: Masami Hiramatsu <mhiramat@kernel.org>
@@ -8627,7 +8628,7 @@ MARVELL MWIFIEX WIRELESS DRIVER · 637 unmodified lines
86278628 M: Amitkumar Karwar <amitkarwar@gmail.com>
86288629 M: Nishant Sarmukadam <nishants@marvell.com>
86298630 M: Ganapathi Bhat <gbhat@marvell.com>
8630−M: Xinming Hu <huxm@marvell.com>
8631+M: Xinming Hu <huxinming820@gmail.com>
86318632 L: linux-wireless@vger.kernel.org
86328633 S: Maintained
86338634 F: drivers/net/wireless/marvell/mwifiex/
@@ -9073,7 +9074,7 @@ S: Maintained · 439 unmodified lines
90739074 F: drivers/usb/mtu3/
90749075
90759076 MEGACHIPS STDPXXXX-GE-B850V3-FW LVDS/DP++ BRIDGES
9076−M: Peter Senna Tschudin <peter.senna@collabora.com>
9077+M: Peter Senna Tschudin <peter.senna@gmail.com>
90779078 M: Martin Donnelly <martin.donnelly@ge.com>
90789079 M: Martyn Welch <martyn.welch@collabora.co.uk>
90799080 S: Maintained
@@ -9754,6 +9755,11 @@ L: linux-scsi@vger.kernel.org · 674 unmodified lines
97549755 S: Maintained
97559756 F: drivers/scsi/NCR_D700.*
97569757
9758+NCSI LIBRARY:
9759+M: Samuel Mendoza-Jonas <sam@mendozajonas.com>
9760+S: Maintained
9761+F: net/ncsi/
9762+
97579763 NCT6775 HARDWARE MONITOR DRIVER
97589764 M: Guenter Roeck <linux@roeck-us.net>
97599765 L: linux-hwmon@vger.kernel.org
@@ -9880,6 +9886,7 @@ M: Andrew Lunn <andrew@lunn.ch> · 120 unmodified lines
98809886 M: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
98819887 M: Florian Fainelli <f.fainelli@gmail.com>
98829888 S: Maintained
9889+F: Documentation/devicetree/bindings/net/dsa/
98839890 F: net/dsa/
98849891 F: include/net/dsa.h
98859892 F: include/linux/dsa/
@@ -10206,11 +10213,13 @@ F: sound/soc/codecs/sgtl5000* · 320 unmodified lines
1020610213
1020710214 NXP TDA998X DRM DRIVER
1020810215 M: Russell King <linux@armlinux.org.uk>
10209−S: Supported
10216+S: Maintained
1021010217 T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-devel
1021110218 T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-fixes
1021210219 F: drivers/gpu/drm/i2c/tda998x_drv.c
1021310220 F: include/drm/i2c/tda998x.h
10221+F: include/dt-bindings/display/tda998x.h
10222+K: "nxp,tda998x"
1021410223
1021510224 NXP TFA9879 DRIVER
1021610225 M: Peter Rosin <peda@axentia.se>
@@ -11474,6 +11483,15 @@ W: http://wireless.kernel.org/en/users/Drivers/p54 · 1257 unmodified lines
1147411483 S: Obsolete
1147511484 F: drivers/net/wireless/intersil/prism54/
1147611485
11486+PROC FILESYSTEM
11487+R: Alexey Dobriyan <adobriyan@gmail.com>
11488+L: linux-kernel@vger.kernel.org
11489+L: linux-fsdevel@vger.kernel.org
11490+S: Maintained
11491+F: fs/proc/
11492+F: include/linux/proc_fs.h
11493+F: tools/testing/selftests/proc/
11494+
1147711495 PROC SYSCTL
1147811496 M: "Luis R. Rodriguez" <mcgrof@kernel.org>
1147911497 M: Kees Cook <keescook@chromium.org>
@@ -11806,9 +11824,9 @@ F: Documentation/devicetree/bindings/opp/kryo-cpufreq.txt · 326 unmodified lines
1180611824 F: drivers/cpufreq/qcom-cpufreq-kryo.c
1180711825
1180811826 QUALCOMM EMAC GIGABIT ETHERNET DRIVER
11809−M: Timur Tabi <timur@codeaurora.org>
11827+M: Timur Tabi <timur@kernel.org>
1181011828 L: netdev@vger.kernel.org
11811−S: Supported
11829+S: Maintained
1181211830 F: drivers/net/ethernet/qualcomm/emac/
1181311831
1181411832 QUALCOMM HEXAGON ARCHITECTURE
@@ -11819,7 +11837,7 @@ S: Supported · 4 unmodified lines
1181911837 F: arch/hexagon/
1182011838
1182111839 QUALCOMM HIDMA DRIVER
11822−M: Sinan Kaya <okaya@codeaurora.org>
11840+M: Sinan Kaya <okaya@kernel.org>
1182311841 L: linux-arm-kernel@lists.infradead.org
1182411842 L: linux-arm-msm@vger.kernel.org
1182511843 L: dmaengine@vger.kernel.org
@@ -13652,7 +13670,7 @@ M: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> · 1826 unmodified lines
1365213670 L: iommu@lists.linux-foundation.org
1365313671 T: git git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb.git
1365413672 S: Supported
13655−F: lib/swiotlb.c
13673+F: kernel/dma/swiotlb.c
1365613674 F: arch/*/kernel/pci-swiotlb.c
1365713675 F: include/linux/swiotlb.h
1365813676
@@ -15576,9 +15594,17 @@ M: x86@kernel.org · 1917 unmodified lines
1557615594 L: linux-kernel@vger.kernel.org
1557715595 T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core
1557815596 S: Maintained
15597+F: Documentation/devicetree/bindings/x86/
1557915598 F: Documentation/x86/
1558015599 F: arch/x86/
1558115600
15601+X86 ENTRY CODE
15602+M: Andy Lutomirski <luto@kernel.org>
15603+L: linux-kernel@vger.kernel.org
15604+T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/asm
15605+S: Maintained
15606+F: arch/x86/entry/
15607+
1558215608 X86 MCE INFRASTRUCTURE
1558315609 M: Tony Luck <tony.luck@intel.com>
1558415610 M: Borislav Petkov <bp@alien8.de>
@@ -15601,7 +15627,7 @@ F: drivers/platform/x86/ · 16 unmodified lines
1560115627 F: drivers/platform/olpc/
1560215628
1560315629 X86 VDSO
15604−M: Andy Lutomirski <luto@amacapital.net>
15630+M: Andy Lutomirski <luto@kernel.org>
1560515631 L: linux-kernel@vger.kernel.org
1560615632 T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/vdso
1560715633 S: Maintained
Makefile+5−10
@@ -2,7 +2,7 @@ · 1 unmodified line
22 VERSION = 4
33 PATCHLEVEL = 18
44 SUBLEVEL = 0
5−EXTRAVERSION = -rc1
5+EXTRAVERSION =
66 NAME = Merciless Moray
77
88 # *DOCUMENTATION*
@@ -353,9 +353,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · 344 unmodified lines
353353 else if [ -x /bin/bash ]; then echo /bin/bash; \
354354 else echo sh; fi ; fi)
355355
356−HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS)
357−HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS)
358−HOST_LFS_LIBS := $(shell getconf LFS_LIBS)
356+HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS 2>/dev/null)
357+HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS 2>/dev/null)
358+HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)
359359
360360 HOSTCC = gcc
361361 HOSTCXX = g++
@@ -507,11 +507,6 @@ ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLA · 145 unmodified lines
507507 KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
508508 endif
509509
510−ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/cc-can-link.sh $(CC)), y)
511− CC_CAN_LINK := y
512− export CC_CAN_LINK
513−endif
514−
515510 # The expansion should be delayed until arch/$(SRCARCH)/Makefile is included.
516511 # Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile.
517512 # CC_VERSION_TEXT is referenced from Kconfig (so it needs export),
@@ -1717,6 +1712,6 @@ endif # skip-makefile · 1199 unmodified lines
17171712 PHONY += FORCE
17181713 FORCE:
17191714
1720−# Declare the contents of the .PHONY variable as phony. We keep that
1715+# Declare the contents of the PHONY variable as phony. We keep that
17211716 # information in a variable so we can use it in if_changed and friends.
17221717 .PHONY: $(PHONY)
arch/alpha/Kconfig+0−5
@@ -555,11 +555,6 @@ config SMP · 554 unmodified lines
555555
556556 If you don't know what to do here, say N.
557557
558−config HAVE_DEC_LOCK
559− bool
560− depends on SMP
561− default y
562−
563558 config NR_CPUS
564559 int "Maximum number of CPUs (2-32)"
565560 range 2 32
arch/alpha/kernel/osf_sys.c+1−4
@@ -1180,13 +1180,10 @@ SYSCALL_DEFINE2(osf_getrusage, int, who, struct rusage32 __user *, ru) · 1179 unmodified lines
11801180 SYSCALL_DEFINE4(osf_wait4, pid_t, pid, int __user *, ustatus, int, options,
11811181 struct rusage32 __user *, ur)
11821182 {
1183− unsigned int status = 0;
11841183 struct rusage r;
1185− long err = kernel_wait4(pid, &status, options, &r);
1184+ long err = kernel_wait4(pid, ustatus, options, &r);
11861185 if (err <= 0)
11871186 return err;
1188− if (put_user(status, ustatus))
1189− return -EFAULT;
11901187 if (!ur)
11911188 return err;
11921189 if (put_tv_to_tv32(&ur->ru_utime, &r.ru_utime))
arch/alpha/lib/Makefile+0−2
@@ -35,8 +35,6 @@ lib-y = __divqu.o __remqu.o __divlu.o __remlu.o \ · 34 unmodified lines
3535 callback_srm.o srm_puts.o srm_printk.o \
3636 fls.o
3737
38−lib-$(CONFIG_SMP) += dec_and_lock.o
39−
4038 # The division routines are built from single source, with different defines.
4139 AFLAGS___divqu.o = -DDIV
4240 AFLAGS___remqu.o = -DREM
arch/alpha/lib/dec_and_lock.c+0−44
@@ -1,44 +0,0 @@
1−// SPDX-License-Identifier: GPL-2.0
2−/*
3− * arch/alpha/lib/dec_and_lock.c
4− *
5− * ll/sc version of atomic_dec_and_lock()
6− *
7− */
8−
9−#include <linux/spinlock.h>
10−#include <linux/atomic.h>
11−#include <linux/export.h>
12−
13− asm (".text \n\
14− .global _atomic_dec_and_lock \n\
15− .ent _atomic_dec_and_lock \n\
16− .align 4 \n\
17−_atomic_dec_and_lock: \n\
18− .prologue 0 \n\
19−1: ldl_l $1, 0($16) \n\
20− subl $1, 1, $1 \n\
21− beq $1, 2f \n\
22− stl_c $1, 0($16) \n\
23− beq $1, 4f \n\
24− mb \n\
25− clr $0 \n\
26− ret \n\
27−2: br $29, 3f \n\
28−3: ldgp $29, 0($29) \n\
29− br $atomic_dec_and_lock_1..ng \n\
30− .subsection 2 \n\
31−4: br 1b \n\
32− .previous \n\
33− .end _atomic_dec_and_lock");
34−
35−static int __used atomic_dec_and_lock_1(atomic_t *atomic, spinlock_t *lock)
36−{
37− /* Slow path */
38− spin_lock(lock);
39− if (atomic_dec_and_test(atomic))
40− return 1;
41− spin_unlock(lock);
42− return 0;
43−}
44−EXPORT_SYMBOL(_atomic_dec_and_lock);
arch/arc/Kconfig+4−1
@@ -50,6 +50,9 @@ config ARC · 49 unmodified lines
5050 select HAVE_KERNEL_LZMA
5151 select ARCH_HAS_PTE_SPECIAL
5252
53+config ARCH_HAS_CACHE_LINE_SIZE
54+ def_bool y
55+
5356 config MIGHT_HAVE_PCI
5457 bool
5558
@@ -413,7 +416,7 @@ config ARC_HAS_DIV_REM · 357 unmodified lines
413416
414417 config ARC_HAS_ACCL_REGS
415418 bool "Reg Pair ACCL:ACCH (FPU and/or MPY > 6)"
416− default n
419+ default y
417420 help
418421 Depending on the configuration, CPU can contain accumulator reg-pair
419422 (also referred to as r58:r59). These can also be used by gcc as GPR so
arch/arc/Makefile+1−14
@@ -16,7 +16,7 @@ endif · 15 unmodified lines
1616
1717 KBUILD_DEFCONFIG := nsim_700_defconfig
1818
19−cflags-y += -fno-common -pipe -fno-builtin -D__linux__
19+cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
2020 cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7
2121 cflags-$(CONFIG_ISA_ARCV2) += -mcpu=archs
2222
@@ -140,16 +140,3 @@ dtbs: scripts · 117 unmodified lines
140140
141141 archclean:
142142 $(Q)$(MAKE) $(clean)=$(boot)
143−
144−# Hacks to enable final link due to absence of link-time branch relexation
145−# and gcc choosing optimal(shorter) branches at -O3
146−#
147−# vineetg Feb 2010: -mlong-calls switched off for overall kernel build
148−# However lib/decompress_inflate.o (.init.text) calls
149−# zlib_inflate_workspacesize (.text) causing relocation errors.
150−# Thus forcing all exten calls in this file to be long calls
151−export CFLAGS_decompress_inflate.o = -mmedium-calls
152−export CFLAGS_initramfs.o = -mmedium-calls
153−ifdef CONFIG_SMP
154−export CFLAGS_core.o = -mmedium-calls
155−endif
arch/arc/configs/axs101_defconfig+0−1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y · 10 unmodified lines
1111 # CONFIG_UTS_NS is not set
1212 # CONFIG_PID_NS is not set
1313 CONFIG_BLK_DEV_INITRD=y
14−CONFIG_INITRAMFS_SOURCE="../arc_initramfs/"
1514 CONFIG_EMBEDDED=y
1615 CONFIG_PERF_EVENTS=y
1716 # CONFIG_VM_EVENT_COUNTERS is not set
arch/arc/configs/axs103_defconfig+0−1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y · 10 unmodified lines
1111 # CONFIG_UTS_NS is not set
1212 # CONFIG_PID_NS is not set
1313 CONFIG_BLK_DEV_INITRD=y
14−CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
1514 CONFIG_EMBEDDED=y
1615 CONFIG_PERF_EVENTS=y
1716 # CONFIG_VM_EVENT_COUNTERS is not set
arch/arc/configs/axs103_smp_defconfig+0−1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y · 10 unmodified lines
1111 # CONFIG_UTS_NS is not set
1212 # CONFIG_PID_NS is not set
1313 CONFIG_BLK_DEV_INITRD=y
14−CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
1514 CONFIG_EMBEDDED=y
1615 CONFIG_PERF_EVENTS=y
1716 # CONFIG_VM_EVENT_COUNTERS is not set
arch/arc/configs/haps_hs_defconfig+0−1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y · 10 unmodified lines
1111 # CONFIG_UTS_NS is not set
1212 # CONFIG_PID_NS is not set
1313 CONFIG_BLK_DEV_INITRD=y
14−CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
1514 CONFIG_EXPERT=y
1615 CONFIG_PERF_EVENTS=y
1716 # CONFIG_COMPAT_BRK is not set
arch/arc/configs/haps_hs_smp_defconfig+0−1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y · 10 unmodified lines
1111 # CONFIG_UTS_NS is not set
1212 # CONFIG_PID_NS is not set
1313 CONFIG_BLK_DEV_INITRD=y
14−CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
1514 CONFIG_EMBEDDED=y
1615 CONFIG_PERF_EVENTS=y
1716 # CONFIG_VM_EVENT_COUNTERS is not set
arch/arc/configs/hsdk_defconfig+0−1
@@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y · 8 unmodified lines
99 # CONFIG_UTS_NS is not set
1010 # CONFIG_PID_NS is not set
1111 CONFIG_BLK_DEV_INITRD=y
12−CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
1312 CONFIG_EMBEDDED=y
1413 CONFIG_PERF_EVENTS=y
1514 # CONFIG_VM_EVENT_COUNTERS is not set
arch/arc/configs/nsim_700_defconfig+0−1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y · 10 unmodified lines
1111 # CONFIG_UTS_NS is not set
1212 # CONFIG_PID_NS is not set
1313 CONFIG_BLK_DEV_INITRD=y
14−CONFIG_INITRAMFS_SOURCE="../arc_initramfs/"
1514 CONFIG_KALLSYMS_ALL=y
1615 CONFIG_EMBEDDED=y
1716 CONFIG_PERF_EVENTS=y
arch/arc/configs/nsim_hs_defconfig+0−1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y · 10 unmodified lines
1111 # CONFIG_UTS_NS is not set
1212 # CONFIG_PID_NS is not set
1313 CONFIG_BLK_DEV_INITRD=y
14−CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
1514 CONFIG_KALLSYMS_ALL=y
1615 CONFIG_EMBEDDED=y
1716 CONFIG_PERF_EVENTS=y
arch/arc/configs/nsim_hs_smp_defconfig+0−1
@@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y · 8 unmodified lines
99 # CONFIG_UTS_NS is not set
1010 # CONFIG_PID_NS is not set
1111 CONFIG_BLK_DEV_INITRD=y
12−CONFIG_INITRAMFS_SOURCE="../arc_initramfs_hs/"
1312 CONFIG_KALLSYMS_ALL=y
1413 CONFIG_EMBEDDED=y
1514 CONFIG_PERF_EVENTS=y
arch/arc/configs/nsimosci_defconfig+0−1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y · 10 unmodified lines
1111 # CONFIG_UTS_NS is not set
1212 # CONFIG_PID_NS is not set
1313 CONFIG_BLK_DEV_INITRD=y
14−CONFIG_INITRAMFS_SOURCE="../arc_initramfs/"
1514 CONFIG_KALLSYMS_ALL=y
1615 CONFIG_EMBEDDED=y
1716 CONFIG_PERF_EVENTS=y
arch/arc/configs/nsimosci_hs_defconfig+0−1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y · 10 unmodified lines
1111 # CONFIG_UTS_NS is not set
1212 # CONFIG_PID_NS is not set
1313 CONFIG_BLK_DEV_INITRD=y
14−CONFIG_INITRAMFS_SOURCE="../arc_initramfs_hs/"
1514 CONFIG_KALLSYMS_ALL=y
1615 CONFIG_EMBEDDED=y
1716 CONFIG_PERF_EVENTS=y
arch/arc/configs/nsimosci_hs_smp_defconfig+0−1
@@ -9,7 +9,6 @@ CONFIG_IKCONFIG_PROC=y · 8 unmodified lines
99 # CONFIG_UTS_NS is not set
1010 # CONFIG_PID_NS is not set
1111 CONFIG_BLK_DEV_INITRD=y
12−CONFIG_INITRAMFS_SOURCE="../arc_initramfs_hs/"
1312 CONFIG_PERF_EVENTS=y
1413 # CONFIG_COMPAT_BRK is not set
1514 CONFIG_KPROBES=y
arch/arc/configs/tb10x_defconfig+0−1
@@ -56,7 +56,6 @@ CONFIG_STMMAC_ETH=y · 55 unmodified lines
5656 # CONFIG_INPUT is not set
5757 # CONFIG_SERIO is not set
5858 # CONFIG_VT is not set
59−CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
6059 # CONFIG_LEGACY_PTYS is not set
6160 # CONFIG_DEVKMEM is not set
6261 CONFIG_SERIAL_8250=y
arch/arc/include/asm/cache.h+3−1
@@ -48,7 +48,9 @@ · 47 unmodified lines
4848 })
4949
5050 /* Largest line length for either L1 or L2 is 128 bytes */
51−#define ARCH_DMA_MINALIGN 128
51+#define SMP_CACHE_BYTES 128
52+#define cache_line_size() SMP_CACHE_BYTES
53+#define ARCH_DMA_MINALIGN SMP_CACHE_BYTES
5254
5355 extern void arc_cache_init(void);
5456 extern char *arc_cache_mumbojumbo(int cpu_id, char *buf, int len);
arch/arc/include/asm/delay.h+3−0
@@ -17,8 +17,11 @@ · 16 unmodified lines
1717 #ifndef __ASM_ARC_UDELAY_H
1818 #define __ASM_ARC_UDELAY_H
1919
20+#include <asm-generic/types.h>
2021 #include <asm/param.h> /* HZ */
2122
23+extern unsigned long loops_per_jiffy;
24+
2225 static inline void __delay(unsigned long loops)
2326 {
2427 __asm__ __volatile__(
arch/arc/include/asm/entry-compact.h+6−0
@@ -234,6 +234,9 @@ · 233 unmodified lines
234234 POP gp
235235 RESTORE_R12_TO_R0
236236
237+#ifdef CONFIG_ARC_CURR_IN_REG
238+ ld r25, [sp, 12]
239+#endif
237240 ld sp, [sp] /* restore original sp */
238241 /* orig_r0, ECR, user_r25 skipped automatically */
239242 .endm
@@ -315,6 +318,9 @@ · 75 unmodified lines
315318 POP gp
316319 RESTORE_R12_TO_R0
317320
321+#ifdef CONFIG_ARC_CURR_IN_REG
322+ ld r25, [sp, 12]
323+#endif
318324 ld sp, [sp] /* restore original sp */
319325 /* orig_r0, ECR, user_r25 skipped automatically */
320326 .endm
arch/arc/include/asm/entry.h+0−3
@@ -86,9 +86,6 @@ · 85 unmodified lines
8686 POP r1
8787 POP r0
8888
89−#ifdef CONFIG_ARC_CURR_IN_REG
90− ld r25, [sp, 12]
91−#endif
9289 .endm
9390
9491 /*--------------------------------------------------------------
arch/arc/include/asm/mach_desc.h+0−2
@@ -34,9 +34,7 @@ struct machine_desc { · 33 unmodified lines
3434 const char *name;
3535 const char **dt_compat;
3636 void (*init_early)(void);
37−#ifdef CONFIG_SMP
3837 void (*init_per_cpu)(unsigned int);
39−#endif
4038 void (*init_machine)(void);
4139 void (*init_late)(void);
4240
arch/arc/include/asm/page.h+1−1
@@ -105,7 +105,7 @@ typedef pte_t * pgtable_t; · 104 unmodified lines
105105 #define virt_addr_valid(kaddr) pfn_valid(virt_to_pfn(kaddr))
106106
107107 /* Default Permissions for stack/heaps pages (Non Executable) */
108−#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE)
108+#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
109109
110110 #define WANT_PAGE_VIRTUAL 1
111111
arch/arc/include/asm/pgtable.h+1−1
@@ -377,7 +377,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, · 376 unmodified lines
377377
378378 /* Decode a PTE containing swap "identifier "into constituents */
379379 #define __swp_type(pte_lookalike) (((pte_lookalike).val) & 0x1f)
380−#define __swp_offset(pte_lookalike) ((pte_lookalike).val << 13)
380+#define __swp_offset(pte_lookalike) ((pte_lookalike).val >> 13)
381381
382382 /* NOPs, to keep generic kernel happy */
383383 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
arch/arc/kernel/irq.c+1−1
@@ -31,10 +31,10 @@ void __init init_IRQ(void) · 30 unmodified lines
3131 /* a SMP H/w block could do IPI IRQ request here */
3232 if (plat_smp_ops.init_per_cpu)
3333 plat_smp_ops.init_per_cpu(smp_processor_id());
34+#endif
3435
3536 if (machine_desc->init_per_cpu)
3637 machine_desc->init_per_cpu(smp_processor_id());
37−#endif
3838 }
3939
4040 /*
arch/arc/kernel/process.c+36−11
@@ -47,7 +47,8 @@ SYSCALL_DEFINE0(arc_gettls) · 46 unmodified lines
4747 SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
4848 {
4949 struct pt_regs *regs = current_pt_regs();
50− int uval = -EFAULT;
50+ u32 uval;
51+ int ret;
5152
5253 /*
5354 * This is only for old cores lacking LLOCK/SCOND, which by defintion
@@ -60,23 +61,47 @@ SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new) · 6 unmodified lines
6061 /* Z indicates to userspace if operation succeded */
6162 regs->status32 &= ~STATUS_Z_MASK;
6263
63− if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
64− return -EFAULT;
64+ ret = access_ok(VERIFY_WRITE, uaddr, sizeof(*uaddr));
65+ if (!ret)
66+ goto fail;
6567
68+again:
6669 preempt_disable();
6770
68− if (__get_user(uval, uaddr))
69− goto done;
71+ ret = __get_user(uval, uaddr);
72+ if (ret)
73+ goto fault;
7074
71− if (uval == expected) {
72− if (!__put_user(new, uaddr))
73− regs->status32 |= STATUS_Z_MASK;
74− }
75+ if (uval != expected)
76+ goto out;
7577
76−done:
77− preempt_enable();
78+ ret = __put_user(new, uaddr);
79+ if (ret)
80+ goto fault;
81+
82+ regs->status32 |= STATUS_Z_MASK;
7883
84+out:
85+ preempt_enable();
7986 return uval;
87+
88+fault:
89+ preempt_enable();
90+
91+ if (unlikely(ret != -EFAULT))
92+ goto fail;
93+
94+ down_read(&current->mm->mmap_sem);
95+ ret = fixup_user_fault(current, current->mm, (unsigned long) uaddr,
96+ FAULT_FLAG_WRITE, NULL);
97+ up_read(&current->mm->mmap_sem);
98+
99+ if (likely(!ret))
100+ goto again;
101+
102+fail:
103+ force_sig(SIGSEGV, current);
104+ return ret;
80105 }
81106
82107 #ifdef CONFIG_ISA_ARCV2
arch/arc/mm/cache.c+14−3
@@ -1038,7 +1038,7 @@ void flush_cache_mm(struct mm_struct *mm) · 1037 unmodified lines
10381038 void flush_cache_page(struct vm_area_struct *vma, unsigned long u_vaddr,
10391039 unsigned long pfn)
10401040 {
1041− unsigned int paddr = pfn << PAGE_SHIFT;
1041+ phys_addr_t paddr = pfn << PAGE_SHIFT;
10421042
10431043 u_vaddr &= PAGE_MASK;
10441044
@@ -1058,8 +1058,9 @@ void flush_anon_page(struct vm_area_struct *vma, struct page *page, · 13 unmodified lines
10581058 unsigned long u_vaddr)
10591059 {
10601060 /* TBD: do we really need to clear the kernel mapping */
1061− __flush_dcache_page(page_address(page), u_vaddr);
1062− __flush_dcache_page(page_address(page), page_address(page));
1061+ __flush_dcache_page((phys_addr_t)page_address(page), u_vaddr);
1062+ __flush_dcache_page((phys_addr_t)page_address(page),
1063+ (phys_addr_t)page_address(page));
10631064
10641065 }
10651066
@@ -1246,6 +1247,16 @@ void __init arc_cache_init_master(void) · 180 unmodified lines
12461247 }
12471248 }
12481249
1250+ /*
1251+ * Check that SMP_CACHE_BYTES (and hence ARCH_DMA_MINALIGN) is larger
1252+ * or equal to any cache line length.
1253+ */
1254+ BUILD_BUG_ON_MSG(L1_CACHE_BYTES > SMP_CACHE_BYTES,
1255+ "SMP_CACHE_BYTES must be >= any cache line length");
1256+ if (is_isa_arcv2() && (l2_line_sz > SMP_CACHE_BYTES))
1257+ panic("L2 Cache line [%d] > kernel Config [%d]\n",
1258+ l2_line_sz, SMP_CACHE_BYTES);
1259+
12491260 /* Note that SLC disable not formally supported till HS 3.0 */
12501261 if (is_isa_arcv2() && l2_line_sz && !slc_enable)
12511262 arc_slc_disable();
arch/arc/mm/dma.c+47−2
@@ -129,14 +129,59 @@ int arch_dma_mmap(struct device *dev, struct vm_area_struct *vma, · 128 unmodified lines
129129 return ret;
130130 }
131131
132+/*
133+ * Cache operations depending on function and direction argument, inspired by
134+ * https://lkml.org/lkml/2018/5/18/979
135+ * "dma_sync_*_for_cpu and direction=TO_DEVICE (was Re: [PATCH 02/20]
136+ * dma-mapping: provide a generic dma-noncoherent implementation)"
137+ *
138+ * | map == for_device | unmap == for_cpu
139+ * |----------------------------------------------------------------
140+ * TO_DEV | writeback writeback | none none
141+ * FROM_DEV | invalidate invalidate | invalidate* invalidate*
142+ * BIDIR | writeback+inv writeback+inv | invalidate invalidate
143+ *
144+ * [*] needed for CPU speculative prefetches
145+ *
146+ * NOTE: we don't check the validity of direction argument as it is done in
147+ * upper layer functions (in include/linux/dma-mapping.h)
148+ */
149+
132150 void arch_sync_dma_for_device(struct device *dev, phys_addr_t paddr,
133151 size_t size, enum dma_data_direction dir)
134152 {
135− dma_cache_wback(paddr, size);
153+ switch (dir) {
154+ case DMA_TO_DEVICE:
155+ dma_cache_wback(paddr, size);
156+ break;
157+
158+ case DMA_FROM_DEVICE:
159+ dma_cache_inv(paddr, size);
160+ break;
161+
162+ case DMA_BIDIRECTIONAL:
163+ dma_cache_wback_inv(paddr, size);
164+ break;
165+
166+ default:
167+ break;
168+ }
136169 }
137170
138171 void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr,
139172 size_t size, enum dma_data_direction dir)
140173 {
141− dma_cache_inv(paddr, size);
174+ switch (dir) {
175+ case DMA_TO_DEVICE:
176+ break;
177+
178+ /* FROM_DEVICE invalidate needed if speculative CPU prefetch only */
179+ case DMA_FROM_DEVICE:
180+ case DMA_BIDIRECTIONAL:
181+ dma_cache_inv(paddr, size);
182+ break;
183+
184+ default:
185+ break;
186+ }
142187 }
arch/arc/plat-eznps/include/plat/ctop.h+10−0
@@ -21,6 +21,7 @@ · 20 unmodified lines
2121 #error "Incorrect ctop.h include"
2222 #endif
2323
24+#include <linux/types.h>
2425 #include <soc/nps/common.h>
2526
2627 /* core auxiliary registers */
@@ -143,6 +144,15 @@ struct nps_host_reg_gim_p_int_dst { · 116 unmodified lines
143144 };
144145
145146 /* AUX registers definition */
147+struct nps_host_reg_aux_dpc {
148+ union {
149+ struct {
150+ u32 ien:1, men:1, hen:1, reserved:29;
151+ };
152+ u32 value;
153+ };
154+};
155+
146156 struct nps_host_reg_aux_udmc {
147157 union {
148158 struct {
arch/arc/plat-eznps/mtm.c+4−2
@@ -15,6 +15,8 @@ · 14 unmodified lines
1515 */
1616
1717 #include <linux/smp.h>
18+#include <linux/init.h>
19+#include <linux/kernel.h>
1820 #include <linux/io.h>
1921 #include <linux/log2.h>
2022 #include <asm/arcregs.h>
@@ -157,10 +159,10 @@ void mtm_enable_core(unsigned int cpu) · 136 unmodified lines
157159 /* Verify and set the value of the mtm hs counter */
158160 static int __init set_mtm_hs_ctr(char *ctr_str)
159161 {
160− long hs_ctr;
162+ int hs_ctr;
161163 int ret;
162164
163− ret = kstrtol(ctr_str, 0, &hs_ctr);
165+ ret = kstrtoint(ctr_str, 0, &hs_ctr);
164166
165167 if (ret || hs_ctr > MT_HS_CNT_MAX || hs_ctr < MT_HS_CNT_MIN) {
166168 pr_err("** Invalid @nps_mtm_hs_ctr [%d] needs to be [%d:%d] (incl)\n",
arch/arc/plat-hsdk/Kconfig+3−0
@@ -7,5 +7,8 @@ · 6 unmodified lines
77
88 menuconfig ARC_SOC_HSDK
99 bool "ARC HS Development Kit SOC"
10+ depends on ISA_ARCV2
11+ select ARC_HAS_ACCL_REGS
1012 select CLK_HSDK
1113 select RESET_HSDK
14+ select MIGHT_HAVE_PCI
arch/arc/plat-hsdk/platform.c+62−0
@@ -42,6 +42,66 @@ static void __init hsdk_init_per_cpu(unsigned int cpu) · 41 unmodified lines
4242 #define SDIO_UHS_REG_EXT (SDIO_BASE + 0x108)
4343 #define SDIO_UHS_REG_EXT_DIV_2 (2 << 30)
4444
45+#define HSDK_GPIO_INTC (ARC_PERIPHERAL_BASE + 0x3000)
46+
47+static void __init hsdk_enable_gpio_intc_wire(void)
48+{
49+ /*
50+ * Peripherals on CPU Card are wired to cpu intc via intermediate
51+ * DW APB GPIO blocks (mainly for debouncing)
52+ *
53+ * ---------------------
54+ * | snps,archs-intc |
55+ * ---------------------
56+ * |
57+ * ----------------------
58+ * | snps,archs-idu-intc |
59+ * ----------------------
60+ * | | | | |
61+ * | [eth] [USB] [... other peripherals]
62+ * |
63+ * -------------------
64+ * | snps,dw-apb-intc |
65+ * -------------------
66+ * | | | |
67+ * [Bt] [HAPS] [... other peripherals]
68+ *
69+ * Current implementation of "irq-dw-apb-ictl" driver doesn't work well
70+ * with stacked INTCs. In particular problem happens if its master INTC
71+ * not yet instantiated. See discussion here -
72+ * https://lkml.org/lkml/2015/3/4/755
73+ *
74+ * So setup the first gpio block as a passive pass thru and hide it from
75+ * DT hardware topology - connect intc directly to cpu intc
76+ * The GPIO "wire" needs to be init nevertheless (here)
77+ *
78+ * One side adv is that peripheral interrupt handling avoids one nested
79+ * intc ISR hop
80+ *
81+ * According to HSDK User's Manual [1], "Table 2 Interrupt Mapping"
82+ * we have the following GPIO input lines used as sources of interrupt:
83+ * - GPIO[0] - Bluetooth interrupt of RS9113 module
84+ * - GPIO[2] - HAPS interrupt (on HapsTrak 3 connector)
85+ * - GPIO[3] - Audio codec (MAX9880A) interrupt
86+ * - GPIO[8-23] - Available on Arduino and PMOD_x headers
87+ * For now there's no use of Arduino and PMOD_x headers in Linux
88+ * use-case so we only enable lines 0, 2 and 3.
89+ *
90+ * [1] https://github.com/foss-for-synopsys-dwc-arc-processors/ARC-Development-Systems-Forum/wiki/docs/ARC_HSDK_User_Guide.pdf
91+ */
92+#define GPIO_INTEN (HSDK_GPIO_INTC + 0x30)
93+#define GPIO_INTMASK (HSDK_GPIO_INTC + 0x34)
94+#define GPIO_INTTYPE_LEVEL (HSDK_GPIO_INTC + 0x38)
95+#define GPIO_INT_POLARITY (HSDK_GPIO_INTC + 0x3c)
96+#define GPIO_INT_CONNECTED_MASK 0x0d
97+
98+ iowrite32(0xffffffff, (void __iomem *) GPIO_INTMASK);
99+ iowrite32(~GPIO_INT_CONNECTED_MASK, (void __iomem *) GPIO_INTMASK);
100+ iowrite32(0x00000000, (void __iomem *) GPIO_INTTYPE_LEVEL);
101+ iowrite32(0xffffffff, (void __iomem *) GPIO_INT_POLARITY);
102+ iowrite32(GPIO_INT_CONNECTED_MASK, (void __iomem *) GPIO_INTEN);
103+}
104+
45105 static void __init hsdk_init_early(void)
46106 {
47107 /*
@@ -62,6 +122,8 @@ static void __init hsdk_init_early(void) · 14 unmodified lines
62122 * minimum possible div-by-2.
63123 */
64124 iowrite32(SDIO_UHS_REG_EXT_DIV_2, (void __iomem *) SDIO_UHS_REG_EXT);
125+
126+ hsdk_enable_gpio_intc_wire();
65127 }
66128
67129 static const char *hsdk_compat[] __initconst = {
arch/arm/Kconfig+7−1
@@ -1245,8 +1245,14 @@ config PCI · 1244 unmodified lines
12451245 VESA. If you have PCI, say Y, otherwise N.
12461246
12471247 config PCI_DOMAINS
1248− bool
1248+ bool "Support for multiple PCI domains"
12491249 depends on PCI
1250+ help
1251+ Enable PCI domains kernel management. Say Y if your machine
1252+ has a PCI bus hierarchy that requires more than one PCI
1253+ domain (aka segment) to be correctly managed. Say N otherwise.
1254+
1255+ If you don't know what to do here, say N.
12501256
12511257 config PCI_DOMAINS_GENERIC
12521258 def_bool PCI_DOMAINS
arch/arm/boot/dts/am335x-bone-common.dtsi+0−1
@@ -168,7 +168,6 @@ · 167 unmodified lines
168168 AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
169169 AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
170170 AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_clk.mmc0_clk */
171− AM33XX_IOPAD(0x9a0, PIN_INPUT | MUX_MODE4) /* mcasp0_aclkr.mmc0_sdwp */
172171 >;
173172 };
174173
arch/arm/boot/dts/am3517.dtsi+9−0
@@ -39,6 +39,8 @@ · 38 unmodified lines
3939 ti,davinci-ctrl-ram-size = <0x2000>;
4040 ti,davinci-rmii-en = /bits/ 8 <1>;
4141 local-mac-address = [ 00 00 00 00 00 00 ];
42+ clocks = <&emac_ick>;
43+ clock-names = "ick";
4244 };
4345
4446 davinci_mdio: ethernet@5c030000 {
@@ -49,6 +51,8 @@ · 4 unmodified lines
4951 bus_freq = <1000000>;
5052 #address-cells = <1>;
5153 #size-cells = <0>;
54+ clocks = <&emac_fck>;
55+ clock-names = "fck";
5256 };
5357
5458 uart4: serial@4809e000 {
@@ -87,6 +91,11 @@ · 32 unmodified lines
8791 };
8892 };
8993
94+/* Table Table 5-79 of the TRM shows 480ab000 is reserved */
95+&usb_otg_hs {
96+ status = "disabled";
97+};
98+
9099 &iva {
91100 status = "disabled";
92101 };
arch/arm/boot/dts/am437x-sk-evm.dts+2−0
@@ -610,6 +610,8 @@ · 609 unmodified lines
610610
611611 touchscreen-size-x = <480>;
612612 touchscreen-size-y = <272>;
613+
614+ wakeup-source;
613615 };
614616
615617 tlv320aic3106: tlv320aic3106@1b {
arch/arm/boot/dts/armada-385-synology-ds116.dts+1−1
@@ -139,7 +139,7 @@ · 138 unmodified lines
139139 3700 5
140140 3900 6
141141 4000 7>;
142− cooling-cells = <2>;
142+ #cooling-cells = <2>;
143143 };
144144
145145 gpio-leds {
arch/arm/boot/dts/armada-38x.dtsi+1−1
@@ -547,7 +547,7 @@ · 546 unmodified lines
547547
548548 thermal: thermal@e8078 {
549549 compatible = "marvell,armada380-thermal";
550− reg = <0xe4078 0x4>, <0xe4074 0x4>;
550+ reg = <0xe4078 0x4>, <0xe4070 0x8>;
551551 status = "okay";
552552 };
553553
arch/arm/boot/dts/bcm-cygnus.dtsi+12−12
@@ -216,7 +216,7 @@ · 215 unmodified lines
216216 reg = <0x18008000 0x100>;
217217 #address-cells = <1>;
218218 #size-cells = <0>;
219− interrupts = <GIC_SPI 85 IRQ_TYPE_NONE>;
219+ interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
220220 clock-frequency = <100000>;
221221 status = "disabled";
222222 };
@@ -245,7 +245,7 @@ · 22 unmodified lines
245245 reg = <0x1800b000 0x100>;
246246 #address-cells = <1>;
247247 #size-cells = <0>;
248− interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
248+ interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
249249 clock-frequency = <100000>;
250250 status = "disabled";
251251 };
@@ -256,7 +256,7 @@ · 4 unmodified lines
256256
257257 #interrupt-cells = <1>;
258258 interrupt-map-mask = <0 0 0 0>;
259− interrupt-map = <0 0 0 0 &gic GIC_SPI 100 IRQ_TYPE_NONE>;
259+ interrupt-map = <0 0 0 0 &gic GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
260260
261261 linux,pci-domain = <0>;
262262
@@ -278,10 +278,10 @@ · 15 unmodified lines
278278 compatible = "brcm,iproc-msi";
279279 msi-controller;
280280 interrupt-parent = <&gic>;
281− interrupts = <GIC_SPI 96 IRQ_TYPE_NONE>,
282− <GIC_SPI 97 IRQ_TYPE_NONE>,
283− <GIC_SPI 98 IRQ_TYPE_NONE>,
284− <GIC_SPI 99 IRQ_TYPE_NONE>;
281+ interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
282+ <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
283+ <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
284+ <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
285285 };
286286 };
287287
@@ -291,7 +291,7 @@ · 3 unmodified lines
291291
292292 #interrupt-cells = <1>;
293293 interrupt-map-mask = <0 0 0 0>;
294− interrupt-map = <0 0 0 0 &gic GIC_SPI 106 IRQ_TYPE_NONE>;
294+ interrupt-map = <0 0 0 0 &gic GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
295295
296296 linux,pci-domain = <1>;
297297
@@ -313,10 +313,10 @@ · 15 unmodified lines
313313 compatible = "brcm,iproc-msi";
314314 msi-controller;
315315 interrupt-parent = <&gic>;
316− interrupts = <GIC_SPI 102 IRQ_TYPE_NONE>,
317− <GIC_SPI 103 IRQ_TYPE_NONE>,
318− <GIC_SPI 104 IRQ_TYPE_NONE>,
319− <GIC_SPI 105 IRQ_TYPE_NONE>;
316+ interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
317+ <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
318+ <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
319+ <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
320320 };
321321 };
322322
arch/arm/boot/dts/bcm-hr2.dtsi+12−12
@@ -264,7 +264,7 @@ · 263 unmodified lines
264264 reg = <0x38000 0x50>;
265265 #address-cells = <1>;
266266 #size-cells = <0>;
267− interrupts = <GIC_SPI 95 IRQ_TYPE_NONE>;
267+ interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
268268 clock-frequency = <100000>;
269269 };
270270
@@ -279,7 +279,7 @@ · 8 unmodified lines
279279 reg = <0x3b000 0x50>;
280280 #address-cells = <1>;
281281 #size-cells = <0>;
282− interrupts = <GIC_SPI 96 IRQ_TYPE_NONE>;
282+ interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
283283 clock-frequency = <100000>;
284284 };
285285 };
@@ -300,7 +300,7 @@ · 14 unmodified lines
300300
301301 #interrupt-cells = <1>;
302302 interrupt-map-mask = <0 0 0 0>;
303− interrupt-map = <0 0 0 0 &gic GIC_SPI 186 IRQ_TYPE_NONE>;
303+ interrupt-map = <0 0 0 0 &gic GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
304304
305305 linux,pci-domain = <0>;
306306
@@ -322,10 +322,10 @@ · 15 unmodified lines
322322 compatible = "brcm,iproc-msi";
323323 msi-controller;
324324 interrupt-parent = <&gic>;
325− interrupts = <GIC_SPI 182 IRQ_TYPE_NONE>,
326− <GIC_SPI 183 IRQ_TYPE_NONE>,
327− <GIC_SPI 184 IRQ_TYPE_NONE>,
328− <GIC_SPI 185 IRQ_TYPE_NONE>;
325+ interrupts = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
326+ <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
327+ <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
328+ <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>;
329329 brcm,pcie-msi-inten;
330330 };
331331 };
@@ -336,7 +336,7 @@ · 4 unmodified lines
336336
337337 #interrupt-cells = <1>;
338338 interrupt-map-mask = <0 0 0 0>;
339− interrupt-map = <0 0 0 0 &gic GIC_SPI 192 IRQ_TYPE_NONE>;
339+ interrupt-map = <0 0 0 0 &gic GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
340340
341341 linux,pci-domain = <1>;
342342
@@ -358,10 +358,10 @@ · 15 unmodified lines
358358 compatible = "brcm,iproc-msi";
359359 msi-controller;
360360 interrupt-parent = <&gic>;
361− interrupts = <GIC_SPI 188 IRQ_TYPE_NONE>,
362− <GIC_SPI 189 IRQ_TYPE_NONE>,
363− <GIC_SPI 190 IRQ_TYPE_NONE>,
364− <GIC_SPI 191 IRQ_TYPE_NONE>;
361+ interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
362+ <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
363+ <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
364+ <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>;
365365 brcm,pcie-msi-inten;
366366 };
367367 };
arch/arm/boot/dts/bcm-nsp.dtsi+16−16
@@ -391,7 +391,7 @@ · 390 unmodified lines
391391 reg = <0x38000 0x50>;
392392 #address-cells = <1>;
393393 #size-cells = <0>;
394− interrupts = <GIC_SPI 89 IRQ_TYPE_NONE>;
394+ interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
395395 clock-frequency = <100000>;
396396 dma-coherent;
397397 status = "disabled";
@@ -496,7 +496,7 @@ · 98 unmodified lines
496496
497497 #interrupt-cells = <1>;
498498 interrupt-map-mask = <0 0 0 0>;
499− interrupt-map = <0 0 0 0 &gic GIC_SPI 131 IRQ_TYPE_NONE>;
499+ interrupt-map = <0 0 0 0 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
500500
501501 linux,pci-domain = <0>;
502502
@@ -519,10 +519,10 @@ · 16 unmodified lines
519519 compatible = "brcm,iproc-msi";
520520 msi-controller;
521521 interrupt-parent = <&gic>;
522− interrupts = <GIC_SPI 127 IRQ_TYPE_NONE>,
523− <GIC_SPI 128 IRQ_TYPE_NONE>,
524− <GIC_SPI 129 IRQ_TYPE_NONE>,
525− <GIC_SPI 130 IRQ_TYPE_NONE>;
522+ interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>,
523+ <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
524+ <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
525+ <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
526526 brcm,pcie-msi-inten;
527527 };
528528 };
@@ -533,7 +533,7 @@ · 4 unmodified lines
533533
534534 #interrupt-cells = <1>;
535535 interrupt-map-mask = <0 0 0 0>;
536− interrupt-map = <0 0 0 0 &gic GIC_SPI 137 IRQ_TYPE_NONE>;
536+ interrupt-map = <0 0 0 0 &gic GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
537537
538538 linux,pci-domain = <1>;
539539
@@ -556,10 +556,10 @@ · 16 unmodified lines
556556 compatible = "brcm,iproc-msi";
557557 msi-controller;
558558 interrupt-parent = <&gic>;
559− interrupts = <GIC_SPI 133 IRQ_TYPE_NONE>,
560− <GIC_SPI 134 IRQ_TYPE_NONE>,
561− <GIC_SPI 135 IRQ_TYPE_NONE>,
562− <GIC_SPI 136 IRQ_TYPE_NONE>;
559+ interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
560+ <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
561+ <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>,
562+ <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
563563 brcm,pcie-msi-inten;
564564 };
565565 };
@@ -570,7 +570,7 @@ · 4 unmodified lines
570570
571571 #interrupt-cells = <1>;
572572 interrupt-map-mask = <0 0 0 0>;
573− interrupt-map = <0 0 0 0 &gic GIC_SPI 143 IRQ_TYPE_NONE>;
573+ interrupt-map = <0 0 0 0 &gic GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
574574
575575 linux,pci-domain = <2>;
576576
@@ -593,10 +593,10 @@ · 16 unmodified lines
593593 compatible = "brcm,iproc-msi";
594594 msi-controller;
595595 interrupt-parent = <&gic>;
596− interrupts = <GIC_SPI 139 IRQ_TYPE_NONE>,
597− <GIC_SPI 140 IRQ_TYPE_NONE>,
598− <GIC_SPI 141 IRQ_TYPE_NONE>,
599− <GIC_SPI 142 IRQ_TYPE_NONE>;
596+ interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>,
597+ <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
598+ <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
599+ <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>;
600600 brcm,pcie-msi-inten;
601601 };
602602 };
arch/arm/boot/dts/bcm5301x.dtsi+1−1
@@ -365,7 +365,7 @@ · 364 unmodified lines
365365 i2c0: i2c@18009000 {
366366 compatible = "brcm,iproc-i2c";
367367 reg = <0x18009000 0x50>;
368− interrupts = <GIC_SPI 121 IRQ_TYPE_NONE>;
368+ interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
369369 #address-cells = <1>;
370370 #size-cells = <0>;
371371 clock-frequency = <100000>;
arch/arm/boot/dts/da850.dtsi+1−5
@@ -549,11 +549,7 @@ · 548 unmodified lines
549549 gpio-controller;
550550 #gpio-cells = <2>;
551551 reg = <0x226000 0x1000>;
552− interrupts = <42 IRQ_TYPE_EDGE_BOTH
553− 43 IRQ_TYPE_EDGE_BOTH 44 IRQ_TYPE_EDGE_BOTH
554− 45 IRQ_TYPE_EDGE_BOTH 46 IRQ_TYPE_EDGE_BOTH
555− 47 IRQ_TYPE_EDGE_BOTH 48 IRQ_TYPE_EDGE_BOTH
556− 49 IRQ_TYPE_EDGE_BOTH 50 IRQ_TYPE_EDGE_BOTH>;
552+ interrupts = <42 43 44 45 46 47 48 49 50>;
557553 ti,ngpio = <144>;
558554 ti,davinci-gpio-unbanked = <0>;
559555 status = "disabled";
arch/arm/boot/dts/dra7.dtsi+1−1
@@ -1580,7 +1580,6 @@ · 1579 unmodified lines
15801580 dr_mode = "otg";
15811581 snps,dis_u3_susphy_quirk;
15821582 snps,dis_u2_susphy_quirk;
1583− snps,dis_metastability_quirk;
15841583 };
15851584 };
15861585
@@ -1608,6 +1607,7 @@ · 21 unmodified lines
16081607 dr_mode = "otg";
16091608 snps,dis_u3_susphy_quirk;
16101609 snps,dis_u2_susphy_quirk;
1610+ snps,dis_metastability_quirk;
16111611 };
16121612 };
16131613
arch/arm/boot/dts/imx51-zii-rdu1.dts+1−1
@@ -770,7 +770,7 @@ · 769 unmodified lines
770770
771771 pinctrl_ts: tsgrp {
772772 fsl,pins = <
773− MX51_PAD_CSI1_D8__GPIO3_12 0x85
773+ MX51_PAD_CSI1_D8__GPIO3_12 0x04
774774 MX51_PAD_CSI1_D9__GPIO3_13 0x85
775775 >;
776776 };
arch/arm/boot/dts/imx6q.dtsi+1−1
@@ -90,7 +90,7 @@ · 89 unmodified lines
9090 clocks = <&clks IMX6Q_CLK_ECSPI5>,
9191 <&clks IMX6Q_CLK_ECSPI5>;
9292 clock-names = "ipg", "per";
93− dmas = <&sdma 11 7 1>, <&sdma 12 7 2>;
93+ dmas = <&sdma 11 8 1>, <&sdma 12 8 2>;
9494 dma-names = "rx", "tx";
9595 status = "disabled";
9696 };
arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi+1−1
@@ -692,7 +692,7 @@ · 691 unmodified lines
692692 dsa,member = <0 0>;
693693 eeprom-length = <512>;
694694 interrupt-parent = <&gpio6>;
695− interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
695+ interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
696696 interrupt-controller;
697697 #interrupt-cells = <2>;
698698
arch/arm/boot/dts/imx6sx.dtsi+1−1
@@ -1344,7 +1344,7 @@ · 1343 unmodified lines
13441344 ranges = <0x81000000 0 0 0x08f80000 0 0x00010000 /* downstream I/O */
13451345 0x82000000 0 0x08000000 0x08000000 0 0x00f00000>; /* non-prefetchable memory */
13461346 num-lanes = <1>;
1347− interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
1347+ interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
13481348 interrupt-names = "msi";
13491349 #interrupt-cells = <1>;
13501350 interrupt-map-mask = <0 0 0 0x7>;
arch/arm/boot/dts/omap4-droid4-xt894.dts+3−6
@@ -159,13 +159,7 @@ · 158 unmodified lines
159159
160160 dais = <&mcbsp2_port>, <&mcbsp3_port>;
161161 };
162−};
163−
164−&dss {
165− status = "okay";
166−};
167162
168−&gpio6 {
169163 pwm8: dmtimer-pwm-8 {
170164 pinctrl-names = "default";
171165 pinctrl-0 = <&vibrator_direction_pin>;
@@ -192,7 +186,10 @@ · 20 unmodified lines
192186 pwm-names = "enable", "direction";
193187 direction-duty-cycle-ns = <10000000>;
194188 };
189+};
195190
191+&dss {
192+ status = "okay";
196193 };
197194
198195 &dsi1 {
arch/arm/boot/dts/socfpga.dtsi+2−2
@@ -748,13 +748,13 @@ · 747 unmodified lines
748748 nand0: nand@ff900000 {
749749 #address-cells = <0x1>;
750750 #size-cells = <0x1>;
751− compatible = "denali,denali-nand-dt";
751+ compatible = "altr,socfpga-denali-nand";
752752 reg = <0xff900000 0x100000>,
753753 <0xffb80000 0x10000>;
754754 reg-names = "nand_data", "denali_reg";
755755 interrupts = <0x0 0x90 0x4>;
756756 dma-mask = <0xffffffff>;
757− clocks = <&nand_clk>;
757+ clocks = <&nand_x_clk>;
758758 status = "disabled";
759759 };
760760
arch/arm/boot/dts/socfpga_arria10.dtsi+2−3
@@ -593,8 +593,7 @@ · 592 unmodified lines
593593 #size-cells = <0>;
594594 reg = <0xffda5000 0x100>;
595595 interrupts = <0 102 4>;
596− num-chipselect = <4>;
597− bus-num = <0>;
596+ num-cs = <4>;
598597 /*32bit_access;*/
599598 tx-dma-channel = <&pdma 16>;
600599 rx-dma-channel = <&pdma 17>;
@@ -633,7 +632,7 @@ · 32 unmodified lines
633632 nand: nand@ffb90000 {
634633 #address-cells = <1>;
635634 #size-cells = <1>;
636− compatible = "denali,denali-nand-dt", "altr,socfpga-denali-nand";
635+ compatible = "altr,socfpga-denali-nand";
637636 reg = <0xffb90000 0x72000>,
638637 <0xffb80000 0x10000>;
639638 reg-names = "nand_data", "denali_reg";
arch/arm/common/Makefile+1−1
@@ -10,7 +10,7 @@ obj-$(CONFIG_DMABOUNCE) += dmabounce.o · 9 unmodified lines
1010 obj-$(CONFIG_SHARP_LOCOMO) += locomo.o
1111 obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o
1212 obj-$(CONFIG_SHARP_SCOOP) += scoop.o
13−obj-$(CONFIG_SMP) += secure_cntvoff.o
13+obj-$(CONFIG_CPU_V7) += secure_cntvoff.o
1414 obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o
1515 obj-$(CONFIG_MCPM) += mcpm_head.o mcpm_entry.o mcpm_platsmp.o vlock.o
1616 CFLAGS_REMOVE_mcpm_entry.o = -pg
arch/arm/configs/imx_v4_v5_defconfig+2−0
@@ -141,9 +141,11 @@ CONFIG_USB_STORAGE=y · 140 unmodified lines
141141 CONFIG_USB_CHIPIDEA=y
142142 CONFIG_USB_CHIPIDEA_UDC=y
143143 CONFIG_USB_CHIPIDEA_HOST=y
144+CONFIG_USB_CHIPIDEA_ULPI=y
144145 CONFIG_NOP_USB_XCEIV=y
145146 CONFIG_USB_GADGET=y
146147 CONFIG_USB_ETH=m
148+CONFIG_USB_ULPI_BUS=y
147149 CONFIG_MMC=y
148150 CONFIG_MMC_SDHCI=y
149151 CONFIG_MMC_SDHCI_PLTFM=y
arch/arm/configs/imx_v6_v7_defconfig+2−0
@@ -302,6 +302,7 @@ CONFIG_USB_STORAGE=y · 301 unmodified lines
302302 CONFIG_USB_CHIPIDEA=y
303303 CONFIG_USB_CHIPIDEA_UDC=y
304304 CONFIG_USB_CHIPIDEA_HOST=y
305+CONFIG_USB_CHIPIDEA_ULPI=y
305306 CONFIG_USB_SERIAL=m
306307 CONFIG_USB_SERIAL_GENERIC=y
307308 CONFIG_USB_SERIAL_FTDI_SIO=m
@@ -338,6 +339,7 @@ CONFIG_USB_GADGETFS=m · 30 unmodified lines
338339 CONFIG_USB_FUNCTIONFS=m
339340 CONFIG_USB_MASS_STORAGE=m
340341 CONFIG_USB_G_SERIAL=m
342+CONFIG_USB_ULPI_BUS=y
341343 CONFIG_MMC=y
342344 CONFIG_MMC_SDHCI=y
343345 CONFIG_MMC_SDHCI_PLTFM=y
arch/arm/configs/multi_v7_defconfig+155−223
@@ -1,5 +1,4 @@
11 CONFIG_SYSVIPC=y
2−CONFIG_FHANDLE=y
32 CONFIG_NO_HZ=y
43 CONFIG_HIGH_RES_TIMERS=y
54 CONFIG_CGROUPS=y
@@ -10,20 +9,10 @@ CONFIG_MODULES=y · 4 unmodified lines
109 CONFIG_MODULE_UNLOAD=y
1110 CONFIG_PARTITION_ADVANCED=y
1211 CONFIG_CMDLINE_PARTITION=y
13−CONFIG_ARCH_MULTI_V7=y
14−# CONFIG_ARCH_MULTI_V5 is not set
15−# CONFIG_ARCH_MULTI_V4 is not set
1612 CONFIG_ARCH_VIRT=y
1713 CONFIG_ARCH_ALPINE=y
1814 CONFIG_ARCH_ARTPEC=y
1915 CONFIG_MACH_ARTPEC6=y
20−CONFIG_ARCH_MVEBU=y
21−CONFIG_MACH_ARMADA_370=y
22−CONFIG_MACH_ARMADA_375=y
23−CONFIG_MACH_ARMADA_38X=y
24−CONFIG_MACH_ARMADA_39X=y
25−CONFIG_MACH_ARMADA_XP=y
26−CONFIG_MACH_DOVE=y
2716 CONFIG_ARCH_AT91=y
2817 CONFIG_SOC_SAMA5D2=y
2918 CONFIG_SOC_SAMA5D3=y
@@ -32,9 +21,9 @@ CONFIG_ARCH_BCM=y · 2 unmodified lines
3221 CONFIG_ARCH_BCM_CYGNUS=y
3322 CONFIG_ARCH_BCM_HR2=y
3423 CONFIG_ARCH_BCM_NSP=y
35−CONFIG_ARCH_BCM_21664=y
36−CONFIG_ARCH_BCM_281XX=y
3724 CONFIG_ARCH_BCM_5301X=y
25+CONFIG_ARCH_BCM_281XX=y
26+CONFIG_ARCH_BCM_21664=y
3827 CONFIG_ARCH_BCM2835=y
3928 CONFIG_ARCH_BCM_63XX=y
4029 CONFIG_ARCH_BRCMSTB=y
@@ -43,14 +32,14 @@ CONFIG_MACH_BERLIN_BG2=y · 2 unmodified lines
4332 CONFIG_MACH_BERLIN_BG2CD=y
4433 CONFIG_MACH_BERLIN_BG2Q=y
4534 CONFIG_ARCH_DIGICOLOR=y
35+CONFIG_ARCH_EXYNOS=y
36+CONFIG_EXYNOS5420_MCPM=y
4637 CONFIG_ARCH_HIGHBANK=y
4738 CONFIG_ARCH_HISI=y
4839 CONFIG_ARCH_HI3xxx=y
49−CONFIG_ARCH_HIX5HD2=y
5040 CONFIG_ARCH_HIP01=y
5141 CONFIG_ARCH_HIP04=y
52−CONFIG_ARCH_KEYSTONE=y
53−CONFIG_ARCH_MESON=y
42+CONFIG_ARCH_HIX5HD2=y
5443 CONFIG_ARCH_MXC=y
5544 CONFIG_SOC_IMX50=y
5645 CONFIG_SOC_IMX51=y
@@ -60,29 +49,30 @@ CONFIG_SOC_IMX6SL=y · 3 unmodified lines
6049 CONFIG_SOC_IMX6SX=y
6150 CONFIG_SOC_IMX6UL=y
6251 CONFIG_SOC_IMX7D=y
63−CONFIG_SOC_VF610=y
6452 CONFIG_SOC_LS1021A=y
53+CONFIG_SOC_VF610=y
54+CONFIG_ARCH_KEYSTONE=y
55+CONFIG_ARCH_MEDIATEK=y
56+CONFIG_ARCH_MESON=y
57+CONFIG_ARCH_MVEBU=y
58+CONFIG_MACH_ARMADA_370=y
59+CONFIG_MACH_ARMADA_375=y
60+CONFIG_MACH_ARMADA_38X=y
61+CONFIG_MACH_ARMADA_39X=y
62+CONFIG_MACH_ARMADA_XP=y
63+CONFIG_MACH_DOVE=y
6564 CONFIG_ARCH_OMAP3=y
6665 CONFIG_ARCH_OMAP4=y
6766 CONFIG_SOC_OMAP5=y
6867 CONFIG_SOC_AM33XX=y
6968 CONFIG_SOC_AM43XX=y
7069 CONFIG_SOC_DRA7XX=y
70+CONFIG_ARCH_SIRF=y
7171 CONFIG_ARCH_QCOM=y
72−CONFIG_ARCH_MEDIATEK=y
7372 CONFIG_ARCH_MSM8X60=y
7473 CONFIG_ARCH_MSM8960=y
7574 CONFIG_ARCH_MSM8974=y
7675 CONFIG_ARCH_ROCKCHIP=y
77−CONFIG_ARCH_SOCFPGA=y
78−CONFIG_PLAT_SPEAR=y
79−CONFIG_ARCH_SPEAR13XX=y
80−CONFIG_MACH_SPEAR1310=y
81−CONFIG_MACH_SPEAR1340=y
82−CONFIG_ARCH_STI=y
83−CONFIG_ARCH_STM32=y
84−CONFIG_ARCH_EXYNOS=y
85−CONFIG_EXYNOS5420_MCPM=y
8676 CONFIG_ARCH_RENESAS=y
8777 CONFIG_ARCH_EMEV2=y
8878 CONFIG_ARCH_R7S72100=y
@@ -99,40 +89,33 @@ CONFIG_ARCH_R8A7792=y · 10 unmodified lines
9989 CONFIG_ARCH_R8A7793=y
10090 CONFIG_ARCH_R8A7794=y
10191 CONFIG_ARCH_SH73A0=y
92+CONFIG_ARCH_SOCFPGA=y
93+CONFIG_PLAT_SPEAR=y
94+CONFIG_ARCH_SPEAR13XX=y
95+CONFIG_MACH_SPEAR1310=y
96+CONFIG_MACH_SPEAR1340=y
97+CONFIG_ARCH_STI=y
98+CONFIG_ARCH_STM32=y
10299 CONFIG_ARCH_SUNXI=y
103−CONFIG_ARCH_SIRF=y
104100 CONFIG_ARCH_TEGRA=y
105−CONFIG_ARCH_TEGRA_2x_SOC=y
106−CONFIG_ARCH_TEGRA_3x_SOC=y
107−CONFIG_ARCH_TEGRA_114_SOC=y
108−CONFIG_ARCH_TEGRA_124_SOC=y
109101 CONFIG_ARCH_UNIPHIER=y
110102 CONFIG_ARCH_U8500=y
111−CONFIG_MACH_HREFV60=y
112−CONFIG_MACH_SNOWBALL=y
113103 CONFIG_ARCH_VEXPRESS=y
114104 CONFIG_ARCH_VEXPRESS_TC2_PM=y
115105 CONFIG_ARCH_WM8850=y
116106 CONFIG_ARCH_ZYNQ=y
117−CONFIG_TRUSTED_FOUNDATIONS=y
118−CONFIG_PCI=y
119−CONFIG_PCI_HOST_GENERIC=y
120−CONFIG_PCI_DRA7XX=y
121−CONFIG_PCI_DRA7XX_EP=y
122−CONFIG_PCI_KEYSTONE=y
123−CONFIG_PCI_MSI=y
107+CONFIG_PCIEPORTBUS=y
124108 CONFIG_PCI_MVEBU=y
125109 CONFIG_PCI_TEGRA=y
126110 CONFIG_PCI_RCAR_GEN2=y
127111 CONFIG_PCIE_RCAR=y
128−CONFIG_PCIEPORTBUS=y
112+CONFIG_PCI_DRA7XX_EP=y
113+CONFIG_PCI_KEYSTONE=y
129114 CONFIG_PCI_ENDPOINT=y
130115 CONFIG_PCI_ENDPOINT_CONFIGFS=y
131116 CONFIG_PCI_EPF_TEST=m
132117 CONFIG_SMP=y
133118 CONFIG_NR_CPUS=16
134−CONFIG_HIGHPTE=y
135−CONFIG_CMA=y
136119 CONFIG_SECCOMP=y
137120 CONFIG_ARM_APPENDED_DTB=y
138121 CONFIG_ARM_ATAG_DTB_COMPAT=y
@@ -145,14 +128,14 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=m · 6 unmodified lines
145128 CONFIG_CPU_FREQ_GOV_USERSPACE=m
146129 CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
147130 CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
131+CONFIG_CPUFREQ_DT=y
148132 CONFIG_ARM_IMX6Q_CPUFREQ=y
149133 CONFIG_QORIQ_CPUFREQ=y
150134 CONFIG_CPU_IDLE=y
151135 CONFIG_ARM_CPUIDLE=y
152−CONFIG_NEON=y
153−CONFIG_KERNEL_MODE_NEON=y
154136 CONFIG_ARM_ZYNQ_CPUIDLE=y
155137 CONFIG_ARM_EXYNOS_CPUIDLE=y
138+CONFIG_KERNEL_MODE_NEON=y
156139 CONFIG_NET=y
157140 CONFIG_PACKET=y
158141 CONFIG_UNIX=y
@@ -170,23 +153,13 @@ CONFIG_IPV6_MIP6=m · 11 unmodified lines
170153 CONFIG_IPV6_TUNNEL=m
171154 CONFIG_IPV6_MULTIPLE_TABLES=y
172155 CONFIG_NET_DSA=m
173−CONFIG_NET_SWITCHDEV=y
174156 CONFIG_CAN=y
175−CONFIG_CAN_RAW=y
176−CONFIG_CAN_BCM=y
177−CONFIG_CAN_DEV=y
178157 CONFIG_CAN_AT91=m
179158 CONFIG_CAN_FLEXCAN=m
180−CONFIG_CAN_RCAR=m
159+CONFIG_CAN_SUN4I=y
181160 CONFIG_CAN_XILINXCAN=y
161+CONFIG_CAN_RCAR=m
182162 CONFIG_CAN_MCP251X=y
183−CONFIG_NET_DSA_BCM_SF2=m
184−CONFIG_B53=m
185−CONFIG_B53_SPI_DRIVER=m
186−CONFIG_B53_MDIO_DRIVER=m
187−CONFIG_B53_MMAP_DRIVER=m
188−CONFIG_B53_SRAB_DRIVER=m
189−CONFIG_CAN_SUN4I=y
190163 CONFIG_BT=m
191164 CONFIG_BT_HCIUART=m
192165 CONFIG_BT_HCIUART_BCM=y
@@ -199,11 +172,9 @@ CONFIG_RFKILL_INPUT=y · 6 unmodified lines
199172 CONFIG_RFKILL_GPIO=y
200173 CONFIG_DEVTMPFS=y
201174 CONFIG_DEVTMPFS_MOUNT=y
202−CONFIG_DMA_CMA=y
203175 CONFIG_CMA_SIZE_MBYTES=64
204176 CONFIG_OMAP_OCP2SCP=y
205177 CONFIG_SIMPLE_PM_BUS=y
206−CONFIG_SUNXI_RSB=y
207178 CONFIG_MTD=y
208179 CONFIG_MTD_CMDLINE_PARTS=y
209180 CONFIG_MTD_BLOCK=y
@@ -236,7 +207,6 @@ CONFIG_PCI_ENDPOINT_TEST=m · 26 unmodified lines
236207 CONFIG_EEPROM_AT24=y
237208 CONFIG_BLK_DEV_SD=y
238209 CONFIG_BLK_DEV_SR=y
239−CONFIG_SCSI_MULTI_LUN=y
240210 CONFIG_ATA=y
241211 CONFIG_SATA_AHCI=y
242212 CONFIG_SATA_AHCI_PLATFORM=y
@@ -251,14 +221,20 @@ CONFIG_SATA_MV=y · 8 unmodified lines
251221 CONFIG_SATA_RCAR=y
252222 CONFIG_NETDEVICES=y
253223 CONFIG_VIRTIO_NET=y
254−CONFIG_HIX5HD2_GMAC=y
224+CONFIG_B53_SPI_DRIVER=m
225+CONFIG_B53_MDIO_DRIVER=m
226+CONFIG_B53_MMAP_DRIVER=m
227+CONFIG_B53_SRAB_DRIVER=m
228+CONFIG_NET_DSA_BCM_SF2=m
255229 CONFIG_SUN4I_EMAC=y
256−CONFIG_MACB=y
257230 CONFIG_BCMGENET=m
258231 CONFIG_BGMAC_BCMA=y
259232 CONFIG_SYSTEMPORT=m
233+CONFIG_MACB=y
260234 CONFIG_NET_CALXEDA_XGMAC=y
261235 CONFIG_GIANFAR=y
236+CONFIG_HIX5HD2_GMAC=y
237+CONFIG_E1000E=y
262238 CONFIG_IGB=y
263239 CONFIG_MV643XX_ETH=y
264240 CONFIG_MVNETA=y
@@ -268,19 +244,17 @@ CONFIG_R8169=y · 3 unmodified lines
268244 CONFIG_SH_ETH=y
269245 CONFIG_SMSC911X=y
270246 CONFIG_STMMAC_ETH=y
271−CONFIG_STMMAC_PLATFORM=y
272247 CONFIG_DWMAC_DWC_QOS_ETH=y
273248 CONFIG_TI_CPSW=y
274249 CONFIG_XILINX_EMACLITE=y
275250 CONFIG_AT803X_PHY=y
276−CONFIG_MARVELL_PHY=y
277−CONFIG_SMSC_PHY=y
278251 CONFIG_BROADCOM_PHY=y
279252 CONFIG_ICPLUS_PHY=y
280−CONFIG_REALTEK_PHY=y
253+CONFIG_MARVELL_PHY=y
281254 CONFIG_MICREL_PHY=y
282−CONFIG_FIXED_PHY=y
255+CONFIG_REALTEK_PHY=y
283256 CONFIG_ROCKCHIP_PHY=y
257+CONFIG_SMSC_PHY=y
284258 CONFIG_USB_PEGASUS=y
285259 CONFIG_USB_RTL8152=m
286260 CONFIG_USB_LAN78XX=m
@@ -288,29 +262,29 @@ CONFIG_USB_USBNET=y · 1 unmodified line
288262 CONFIG_USB_NET_SMSC75XX=y
289263 CONFIG_USB_NET_SMSC95XX=y
290264 CONFIG_BRCMFMAC=m
291−CONFIG_RT2X00=m
292−CONFIG_RT2800USB=m
293265 CONFIG_MWIFIEX=m
294266 CONFIG_MWIFIEX_SDIO=m
267+CONFIG_RT2X00=m
268+CONFIG_RT2800USB=m
295269 CONFIG_INPUT_JOYDEV=y
296270 CONFIG_INPUT_EVDEV=y
297271 CONFIG_KEYBOARD_QT1070=m
298272 CONFIG_KEYBOARD_GPIO=y
299273 CONFIG_KEYBOARD_TEGRA=y
300−CONFIG_KEYBOARD_SPEAR=y
274+CONFIG_KEYBOARD_SAMSUNG=m
301275 CONFIG_KEYBOARD_ST_KEYSCAN=y
276+CONFIG_KEYBOARD_SPEAR=y
302277 CONFIG_KEYBOARD_CROS_EC=m
303−CONFIG_KEYBOARD_SAMSUNG=m
304278 CONFIG_MOUSE_PS2_ELANTECH=y
305279 CONFIG_MOUSE_CYAPA=m
306280 CONFIG_MOUSE_ELAN_I2C=y
307281 CONFIG_INPUT_TOUCHSCREEN=y
308282 CONFIG_TOUCHSCREEN_ATMEL_MXT=m
309283 CONFIG_TOUCHSCREEN_MMS114=m
284+CONFIG_TOUCHSCREEN_WM97XX=m
310285 CONFIG_TOUCHSCREEN_ST1232=m
311286 CONFIG_TOUCHSCREEN_STMPE=y
312287 CONFIG_TOUCHSCREEN_SUN4I=y
313−CONFIG_TOUCHSCREEN_WM97XX=m
314288 CONFIG_INPUT_MISC=y
315289 CONFIG_INPUT_MAX77693_HAPTIC=m
316290 CONFIG_INPUT_MAX8997_HAPTIC=m
@@ -327,13 +301,12 @@ CONFIG_SERIAL_8250_DW=y · 10 unmodified lines
327301 CONFIG_SERIAL_8250_EM=y
328302 CONFIG_SERIAL_8250_MT6577=y
329303 CONFIG_SERIAL_8250_UNIPHIER=y
304+CONFIG_SERIAL_OF_PLATFORM=y
330305 CONFIG_SERIAL_AMBA_PL011=y
331306 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
332307 CONFIG_SERIAL_ATMEL=y
333308 CONFIG_SERIAL_ATMEL_CONSOLE=y
334309 CONFIG_SERIAL_ATMEL_TTYAT=y
335−CONFIG_SERIAL_BCM63XX=y
336−CONFIG_SERIAL_BCM63XX_CONSOLE=y
337310 CONFIG_SERIAL_MESON=y
338311 CONFIG_SERIAL_MESON_CONSOLE=y
339312 CONFIG_SERIAL_SAMSUNG=y
@@ -345,15 +318,14 @@ CONFIG_SERIAL_IMX=y · 5 unmodified lines
345318 CONFIG_SERIAL_IMX_CONSOLE=y
346319 CONFIG_SERIAL_SH_SCI=y
347320 CONFIG_SERIAL_SH_SCI_NR_UARTS=20
348−CONFIG_SERIAL_SH_SCI_CONSOLE=y
349−CONFIG_SERIAL_SH_SCI_DMA=y
350321 CONFIG_SERIAL_MSM=y
351322 CONFIG_SERIAL_MSM_CONSOLE=y
352323 CONFIG_SERIAL_VT8500=y
353324 CONFIG_SERIAL_VT8500_CONSOLE=y
354−CONFIG_SERIAL_OF_PLATFORM=y
355325 CONFIG_SERIAL_OMAP=y
356326 CONFIG_SERIAL_OMAP_CONSOLE=y
327+CONFIG_SERIAL_BCM63XX=y
328+CONFIG_SERIAL_BCM63XX_CONSOLE=y
357329 CONFIG_SERIAL_XILINX_PS_UART=y
358330 CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
359331 CONFIG_SERIAL_FSL_LPUART=y
@@ -365,12 +337,10 @@ CONFIG_SERIAL_ST_ASC_CONSOLE=y · 5 unmodified lines
365337 CONFIG_SERIAL_STM32=y
366338 CONFIG_SERIAL_STM32_CONSOLE=y
367339 CONFIG_SERIAL_DEV_BUS=y
368−CONFIG_HVC_DRIVER=y
369340 CONFIG_VIRTIO_CONSOLE=y
341+CONFIG_HW_RANDOM=y
342+CONFIG_HW_RANDOM_ST=y
370343 CONFIG_I2C_CHARDEV=y
371−CONFIG_I2C_DAVINCI=y
372−CONFIG_I2C_MESON=y
373−CONFIG_I2C_MUX=y
374344 CONFIG_I2C_ARB_GPIO_CHALLENGE=m
375345 CONFIG_I2C_MUX_PCA954x=y
376346 CONFIG_I2C_MUX_PINCTRL=y
@@ -378,12 +348,13 @@ CONFIG_I2C_DEMUX_PINCTRL=y · 1 unmodified line
378348 CONFIG_I2C_AT91=m
379349 CONFIG_I2C_BCM2835=y
380350 CONFIG_I2C_CADENCE=y
351+CONFIG_I2C_DAVINCI=y
381352 CONFIG_I2C_DESIGNWARE_PLATFORM=y
382353 CONFIG_I2C_DIGICOLOR=m
383354 CONFIG_I2C_EMEV2=m
384355 CONFIG_I2C_GPIO=m
385−CONFIG_I2C_EXYNOS5=y
386356 CONFIG_I2C_IMX=y
357+CONFIG_I2C_MESON=y
387358 CONFIG_I2C_MV64XXX=y
388359 CONFIG_I2C_RIIC=y
389360 CONFIG_I2C_RK3X=y
@@ -427,7 +398,6 @@ CONFIG_SPI_SPIDEV=y · 37 unmodified lines
427398 CONFIG_SPMI=y
428399 CONFIG_PINCTRL_AS3722=y
429400 CONFIG_PINCTRL_PALMAS=y
430−CONFIG_PINCTRL_BCM2835=y
431401 CONFIG_PINCTRL_APQ8064=y
432402 CONFIG_PINCTRL_APQ8084=y
433403 CONFIG_PINCTRL_IPQ8064=y
@@ -437,25 +407,33 @@ CONFIG_PINCTRL_MSM8X74=y · 3 unmodified lines
437407 CONFIG_PINCTRL_MSM8916=y
438408 CONFIG_PINCTRL_QCOM_SPMI_PMIC=y
439409 CONFIG_PINCTRL_QCOM_SSBI_PMIC=y
440−CONFIG_GPIO_GENERIC_PLATFORM=y
441410 CONFIG_GPIO_DAVINCI=y
442411 CONFIG_GPIO_DWAPB=y
443412 CONFIG_GPIO_EM=y
444413 CONFIG_GPIO_RCAR=y
414+CONFIG_GPIO_SYSCON=y
445415 CONFIG_GPIO_UNIPHIER=y
446416 CONFIG_GPIO_XILINX=y
447417 CONFIG_GPIO_ZYNQ=y
448418 CONFIG_GPIO_PCA953X=y
449419 CONFIG_GPIO_PCA953X_IRQ=y
450420 CONFIG_GPIO_PCF857X=y
451−CONFIG_GPIO_TWL4030=y
452421 CONFIG_GPIO_PALMAS=y
453−CONFIG_GPIO_SYSCON=y
454422 CONFIG_GPIO_TPS6586X=y
455423 CONFIG_GPIO_TPS65910=y
424+CONFIG_GPIO_TWL4030=y
425+CONFIG_POWER_AVS=y
426+CONFIG_ROCKCHIP_IODOMAIN=y
427+CONFIG_POWER_RESET_AS3722=y
428+CONFIG_POWER_RESET_GPIO=y
429+CONFIG_POWER_RESET_GPIO_RESTART=y
430+CONFIG_POWER_RESET_ST=y
431+CONFIG_POWER_RESET_KEYSTONE=y
432+CONFIG_POWER_RESET_RMOBILE=y
456433 CONFIG_BATTERY_ACT8945A=y
457434 CONFIG_BATTERY_CPCAP=m
458435 CONFIG_BATTERY_SBS=y
436+CONFIG_AXP20X_POWER=m
459437 CONFIG_BATTERY_MAX17040=m
460438 CONFIG_BATTERY_MAX17042=m
461439 CONFIG_CHARGER_CPCAP=m
@@ -464,15 +442,6 @@ CONFIG_CHARGER_MAX77693=m · 2 unmodified lines
464442 CONFIG_CHARGER_MAX8997=m
465443 CONFIG_CHARGER_MAX8998=m
466444 CONFIG_CHARGER_TPS65090=y
467−CONFIG_AXP20X_POWER=m
468−CONFIG_POWER_RESET_AS3722=y
469−CONFIG_POWER_RESET_GPIO=y
470−CONFIG_POWER_RESET_GPIO_RESTART=y
471−CONFIG_POWER_RESET_KEYSTONE=y
472−CONFIG_POWER_RESET_RMOBILE=y
473−CONFIG_POWER_RESET_ST=y
474−CONFIG_POWER_AVS=y
475−CONFIG_ROCKCHIP_IODOMAIN=y
476445 CONFIG_SENSORS_IIO_HWMON=y
477446 CONFIG_SENSORS_LM90=y
478447 CONFIG_SENSORS_LM95245=y
@@ -480,14 +449,12 @@ CONFIG_SENSORS_NTC_THERMISTOR=m · 1 unmodified line
480449 CONFIG_SENSORS_PWM_FAN=m
481450 CONFIG_SENSORS_INA2XX=m
482451 CONFIG_CPU_THERMAL=y
483−CONFIG_BCM2835_THERMAL=m
484−CONFIG_BRCMSTB_THERMAL=m
485452 CONFIG_IMX_THERMAL=y
486453 CONFIG_ROCKCHIP_THERMAL=y
487454 CONFIG_RCAR_THERMAL=y
488455 CONFIG_ARMADA_THERMAL=y
489−CONFIG_DAVINCI_WATCHDOG=m
490−CONFIG_EXYNOS_THERMAL=m
456+CONFIG_BCM2835_THERMAL=m
457+CONFIG_BRCMSTB_THERMAL=m
491458 CONFIG_ST_THERMAL_MEMMAP=y
492459 CONFIG_WATCHDOG=y
493460 CONFIG_DA9063_WATCHDOG=m
@@ -495,20 +462,24 @@ CONFIG_XILINX_WATCHDOG=y · 1 unmodified line
495462 CONFIG_ARM_SP805_WATCHDOG=y
496463 CONFIG_AT91SAM9X_WATCHDOG=y
497464 CONFIG_SAMA5D4_WATCHDOG=y
465+CONFIG_DW_WATCHDOG=y
466+CONFIG_DAVINCI_WATCHDOG=m
498467 CONFIG_ORION_WATCHDOG=y
499468 CONFIG_RN5T618_WATCHDOG=y
500−CONFIG_ST_LPC_WATCHDOG=y
501469 CONFIG_SUNXI_WATCHDOG=y
502470 CONFIG_IMX2_WDT=y
471+CONFIG_ST_LPC_WATCHDOG=y
503472 CONFIG_TEGRA_WATCHDOG=m
504473 CONFIG_MESON_WATCHDOG=y
505−CONFIG_DW_WATCHDOG=y
506474 CONFIG_DIGICOLOR_WATCHDOG=y
507475 CONFIG_RENESAS_WDT=m
508−CONFIG_BCM2835_WDT=y
509476 CONFIG_BCM47XX_WDT=y
510−CONFIG_BCM7038_WDT=m
477+CONFIG_BCM2835_WDT=y
511478 CONFIG_BCM_KONA_WDT=y
479+CONFIG_BCM7038_WDT=m
480+CONFIG_BCMA_HOST_SOC=y
481+CONFIG_BCMA_DRIVER_GMAC_CMN=y
482+CONFIG_BCMA_DRIVER_GPIO=y
512483 CONFIG_MFD_ACT8945A=y
513484 CONFIG_MFD_AS3711=y
514485 CONFIG_MFD_AS3722=y
@@ -516,7 +487,6 @@ CONFIG_MFD_ATMEL_FLEXCOM=y · 1 unmodified line
516487 CONFIG_MFD_ATMEL_HLCDC=m
517488 CONFIG_MFD_BCM590XX=y
518489 CONFIG_MFD_AC100=y
519−CONFIG_MFD_AXP20X=y
520490 CONFIG_MFD_AXP20X_I2C=y
521491 CONFIG_MFD_AXP20X_RSB=y
522492 CONFIG_MFD_CROS_EC=m
@@ -529,11 +499,11 @@ CONFIG_MFD_MAX77693=m · 6 unmodified lines
529499 CONFIG_MFD_MAX8907=y
530500 CONFIG_MFD_MAX8997=y
531501 CONFIG_MFD_MAX8998=y
532−CONFIG_MFD_RK808=y
533502 CONFIG_MFD_CPCAP=y
534503 CONFIG_MFD_PM8XXX=y
535504 CONFIG_MFD_QCOM_RPM=y
536505 CONFIG_MFD_SPMI_PMIC=y
506+CONFIG_MFD_RK808=y
537507 CONFIG_MFD_RN5T618=y
538508 CONFIG_MFD_SEC_CORE=y
539509 CONFIG_MFD_STMPE=y
@@ -543,10 +513,10 @@ CONFIG_MFD_TPS65217=y · 3 unmodified lines
543513 CONFIG_MFD_TPS65218=y
544514 CONFIG_MFD_TPS6586X=y
545515 CONFIG_MFD_TPS65910=y
546−CONFIG_REGULATOR_ACT8945A=y
547−CONFIG_REGULATOR_AB8500=y
548516 CONFIG_REGULATOR_ACT8865=y
517+CONFIG_REGULATOR_ACT8945A=y
549518 CONFIG_REGULATOR_ANATOP=y
519+CONFIG_REGULATOR_AB8500=y
550520 CONFIG_REGULATOR_AS3711=y
551521 CONFIG_REGULATOR_AS3722=y
552522 CONFIG_REGULATOR_AXP20X=y
@@ -554,10 +524,7 @@ CONFIG_REGULATOR_BCM590XX=y · 1 unmodified line
554524 CONFIG_REGULATOR_CPCAP=y
555525 CONFIG_REGULATOR_DA9210=y
556526 CONFIG_REGULATOR_FAN53555=y
557−CONFIG_REGULATOR_RK808=y
558527 CONFIG_REGULATOR_GPIO=y
559−CONFIG_MFD_SYSCON=y
560−CONFIG_POWER_RESET_SYSCON=y
561528 CONFIG_REGULATOR_LP872X=y
562529 CONFIG_REGULATOR_MAX14577=m
563530 CONFIG_REGULATOR_MAX8907=y
@@ -571,7 +538,8 @@ CONFIG_REGULATOR_PALMAS=y · 7 unmodified lines
571538 CONFIG_REGULATOR_PBIAS=y
572539 CONFIG_REGULATOR_PWM=y
573540 CONFIG_REGULATOR_QCOM_RPM=y
574−CONFIG_REGULATOR_QCOM_SMD_RPM=y
541+CONFIG_REGULATOR_QCOM_SMD_RPM=m
542+CONFIG_REGULATOR_RK808=y
575543 CONFIG_REGULATOR_RN5T618=y
576544 CONFIG_REGULATOR_S2MPS11=y
577545 CONFIG_REGULATOR_S5M8767=y
@@ -592,18 +560,17 @@ CONFIG_MEDIA_CEC_SUPPORT=y · 14 unmodified lines
592560 CONFIG_MEDIA_CONTROLLER=y
593561 CONFIG_VIDEO_V4L2_SUBDEV_API=y
594562 CONFIG_MEDIA_USB_SUPPORT=y
595−CONFIG_USB_VIDEO_CLASS=y
596−CONFIG_USB_GSPCA=y
563+CONFIG_USB_VIDEO_CLASS=m
597564 CONFIG_V4L_PLATFORM_DRIVERS=y
598565 CONFIG_SOC_CAMERA=m
599566 CONFIG_SOC_CAMERA_PLATFORM=m
600−CONFIG_VIDEO_RCAR_VIN=m
601−CONFIG_VIDEO_ATMEL_ISI=m
602567 CONFIG_VIDEO_SAMSUNG_EXYNOS4_IS=m
603568 CONFIG_VIDEO_S5P_FIMC=m
604569 CONFIG_VIDEO_S5P_MIPI_CSIS=m
605570 CONFIG_VIDEO_EXYNOS_FIMC_LITE=m
606571 CONFIG_VIDEO_EXYNOS4_FIMC_IS=m
572+CONFIG_VIDEO_RCAR_VIN=m
573+CONFIG_VIDEO_ATMEL_ISI=m
607574 CONFIG_V4L_MEM2MEM_DRIVERS=y
608575 CONFIG_VIDEO_SAMSUNG_S5P_JPEG=m
609576 CONFIG_VIDEO_SAMSUNG_S5P_MFC=m
@@ -614,19 +581,15 @@ CONFIG_VIDEO_STI_DELTA=m · 4 unmodified lines
614581 CONFIG_VIDEO_RENESAS_JPU=m
615582 CONFIG_VIDEO_RENESAS_VSP1=m
616583 CONFIG_V4L_TEST_DRIVERS=y
584+CONFIG_VIDEO_VIVID=m
617585 CONFIG_CEC_PLATFORM_DRIVERS=y
618586 CONFIG_VIDEO_SAMSUNG_S5P_CEC=m
619587 # CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
620588 CONFIG_VIDEO_ADV7180=m
621589 CONFIG_VIDEO_ML86V7667=m
622590 CONFIG_DRM=y
623−CONFIG_DRM_I2C_ADV7511=m
624−CONFIG_DRM_I2C_ADV7511_AUDIO=y
625591 # CONFIG_DRM_I2C_CH7006 is not set
626592 # CONFIG_DRM_I2C_SIL164 is not set
627−CONFIG_DRM_DUMB_VGA_DAC=m
628−CONFIG_DRM_NXP_PTN3460=m
629−CONFIG_DRM_PARADE_PS8622=m
630593 CONFIG_DRM_NOUVEAU=m
631594 CONFIG_DRM_EXYNOS=m
632595 CONFIG_DRM_EXYNOS_FIMD=y
@@ -645,13 +608,18 @@ CONFIG_DRM_RCAR_LVDS=y · 12 unmodified lines
645608 CONFIG_DRM_SUN4I=m
646609 CONFIG_DRM_FSL_DCU=m
647610 CONFIG_DRM_TEGRA=y
611+CONFIG_DRM_PANEL_SIMPLE=y
648612 CONFIG_DRM_PANEL_SAMSUNG_LD9040=m
649613 CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03=m
650614 CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=m
651−CONFIG_DRM_PANEL_SIMPLE=y
615+CONFIG_DRM_DUMB_VGA_DAC=m
616+CONFIG_DRM_NXP_PTN3460=m
617+CONFIG_DRM_PARADE_PS8622=m
652618 CONFIG_DRM_SII9234=m
619+CONFIG_DRM_I2C_ADV7511=m
620+CONFIG_DRM_I2C_ADV7511_AUDIO=y
653621 CONFIG_DRM_STI=m
654−CONFIG_DRM_VC4=y
622+CONFIG_DRM_VC4=m
655623 CONFIG_DRM_ETNAVIV=m
656624 CONFIG_DRM_MXSFB=m
657625 CONFIG_FB_ARMCLCD=y
@@ -659,8 +627,6 @@ CONFIG_FB_EFI=y · 1 unmodified line
659627 CONFIG_FB_WM8505=y
660628 CONFIG_FB_SH_MOBILE_LCDC=y
661629 CONFIG_FB_SIMPLE=y
662−CONFIG_BACKLIGHT_LCD_SUPPORT=y
663−CONFIG_BACKLIGHT_CLASS_DEVICE=y
664630 CONFIG_LCD_PLATFORM=m
665631 CONFIG_BACKLIGHT_PWM=y
666632 CONFIG_BACKLIGHT_AS3711=y
@@ -668,7 +634,6 @@ CONFIG_FRAMEBUFFER_CONSOLE=y · 1 unmodified line
668634 CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
669635 CONFIG_SOUND=m
670636 CONFIG_SND=m
671−CONFIG_SND_DYNAMIC_MINORS=y
672637 CONFIG_SND_HDA_TEGRA=m
673638 CONFIG_SND_HDA_INPUT_BEEP=y
674639 CONFIG_SND_HDA_PATCH_LOADER=y
@@ -692,7 +657,7 @@ CONFIG_SND_SOC_SNOW=m · 17 unmodified lines
692657 CONFIG_SND_SOC_ODROID=m
693658 CONFIG_SND_SOC_SH4_FSI=m
694659 CONFIG_SND_SOC_RCAR=m
695−CONFIG_SND_SIMPLE_SCU_CARD=m
660+CONFIG_SND_SOC_STI=m
696661 CONFIG_SND_SUN4I_CODEC=m
697662 CONFIG_SND_SOC_TEGRA=m
698663 CONFIG_SND_SOC_TEGRA20_I2S=m
@@ -703,31 +668,25 @@ CONFIG_SND_SOC_TEGRA_WM8903=m · 4 unmodified lines
703668 CONFIG_SND_SOC_TEGRA_WM9712=m
704669 CONFIG_SND_SOC_TEGRA_TRIMSLICE=m
705670 CONFIG_SND_SOC_TEGRA_ALC5632=m
706−CONFIG_SND_SOC_CPCAP=m
707671 CONFIG_SND_SOC_TEGRA_MAX98090=m
708672 CONFIG_SND_SOC_AK4642=m
673+CONFIG_SND_SOC_CPCAP=m
709674 CONFIG_SND_SOC_SGTL5000=m
710675 CONFIG_SND_SOC_SPDIF=m
711−CONFIG_SND_SOC_WM8978=m
712−CONFIG_SND_SOC_STI=m
713676 CONFIG_SND_SOC_STI_SAS=m
714−CONFIG_SND_SIMPLE_CARD=m
677+CONFIG_SND_SOC_WM8978=m
678+CONFIG_SND_SIMPLE_SCU_CARD=m
715679 CONFIG_USB=y
716680 CONFIG_USB_OTG=y
717681 CONFIG_USB_XHCI_HCD=y
718682 CONFIG_USB_XHCI_MVEBU=y
719−CONFIG_USB_XHCI_RCAR=m
720683 CONFIG_USB_XHCI_TEGRA=m
721684 CONFIG_USB_EHCI_HCD=y
722−CONFIG_USB_EHCI_MSM=m
723−CONFIG_USB_EHCI_EXYNOS=y
724−CONFIG_USB_EHCI_TEGRA=y
725685 CONFIG_USB_EHCI_HCD_STI=y
726−CONFIG_USB_EHCI_HCD_PLATFORM=y
727−CONFIG_USB_ISP1760=y
686+CONFIG_USB_EHCI_TEGRA=y
687+CONFIG_USB_EHCI_EXYNOS=y
728688 CONFIG_USB_OHCI_HCD=y
729689 CONFIG_USB_OHCI_HCD_STI=y
730−CONFIG_USB_OHCI_HCD_PLATFORM=y
731690 CONFIG_USB_OHCI_EXYNOS=m
732691 CONFIG_USB_R8A66597_HCD=m
733692 CONFIG_USB_RENESAS_USBHS=m
@@ -746,18 +705,18 @@ CONFIG_USB_TI_CPPI41_DMA=y · 12 unmodified lines
746705 CONFIG_USB_TUSB_OMAP_DMA=y
747706 CONFIG_USB_DWC3=y
748707 CONFIG_USB_DWC2=y
749−CONFIG_USB_HSIC_USB3503=y
750708 CONFIG_USB_CHIPIDEA=y
751709 CONFIG_USB_CHIPIDEA_UDC=y
752710 CONFIG_USB_CHIPIDEA_HOST=y
711+CONFIG_USB_ISP1760=y
712+CONFIG_USB_HSIC_USB3503=y
753713 CONFIG_AB8500_USB=y
754−CONFIG_KEYSTONE_USB_PHY=y
714+CONFIG_KEYSTONE_USB_PHY=m
755715 CONFIG_NOP_USB_XCEIV=m
756716 CONFIG_AM335X_PHY_USB=m
757717 CONFIG_TWL6030_USB=m
758718 CONFIG_USB_GPIO_VBUS=y
759719 CONFIG_USB_ISP1301=y
760−CONFIG_USB_MSM_OTG=m
761720 CONFIG_USB_MXS_PHY=y
762721 CONFIG_USB_GADGET=y
763722 CONFIG_USB_FSL_USB2=y
@@ -793,21 +752,20 @@ CONFIG_MMC_SDHCI_OF_ESDHC=y · 29 unmodified lines
793752 CONFIG_MMC_SDHCI_ESDHC_IMX=y
794753 CONFIG_MMC_SDHCI_DOVE=y
795754 CONFIG_MMC_SDHCI_TEGRA=y
755+CONFIG_MMC_SDHCI_S3C=y
796756 CONFIG_MMC_SDHCI_PXAV3=y
797757 CONFIG_MMC_SDHCI_SPEAR=y
798−CONFIG_MMC_SDHCI_S3C=y
799758 CONFIG_MMC_SDHCI_S3C_DMA=y
800759 CONFIG_MMC_SDHCI_BCM_KONA=y
760+CONFIG_MMC_MESON_MX_SDIO=y
801761 CONFIG_MMC_SDHCI_ST=y
802762 CONFIG_MMC_OMAP=y
803763 CONFIG_MMC_OMAP_HS=y
804764 CONFIG_MMC_ATMELMCI=y
805765 CONFIG_MMC_SDHCI_MSM=y
806−CONFIG_MMC_MESON_MX_SDIO=y
807766 CONFIG_MMC_MVSDIO=y
808767 CONFIG_MMC_SDHI=y
809768 CONFIG_MMC_DW=y
810−CONFIG_MMC_DW_PLTFM=y
811769 CONFIG_MMC_DW_EXYNOS=y
812770 CONFIG_MMC_DW_ROCKCHIP=y
813771 CONFIG_MMC_SH_MMCIF=y
@@ -847,94 +805,85 @@ CONFIG_RTC_DRV_MAX77686=y · 33 unmodified lines
847805 CONFIG_RTC_DRV_RK808=m
848806 CONFIG_RTC_DRV_RS5C372=m
849807 CONFIG_RTC_DRV_BQ32K=m
850−CONFIG_RTC_DRV_PALMAS=y
851−CONFIG_RTC_DRV_ST_LPC=y
852808 CONFIG_RTC_DRV_TWL4030=y
809+CONFIG_RTC_DRV_PALMAS=y
853810 CONFIG_RTC_DRV_TPS6586X=y
854811 CONFIG_RTC_DRV_TPS65910=y
855812 CONFIG_RTC_DRV_S35390A=m
856813 CONFIG_RTC_DRV_RX8581=m
857814 CONFIG_RTC_DRV_EM3027=y
815+CONFIG_RTC_DRV_S5M=m
858816 CONFIG_RTC_DRV_DA9063=m
859817 CONFIG_RTC_DRV_EFI=m
860818 CONFIG_RTC_DRV_DIGICOLOR=m
861−CONFIG_RTC_DRV_S5M=m
862819 CONFIG_RTC_DRV_S3C=m
863820 CONFIG_RTC_DRV_PL031=y
864821 CONFIG_RTC_DRV_AT91RM9200=m
865822 CONFIG_RTC_DRV_AT91SAM9=m
866823 CONFIG_RTC_DRV_VT8500=y
867−CONFIG_RTC_DRV_SUN6I=y
868824 CONFIG_RTC_DRV_SUNXI=y
869825 CONFIG_RTC_DRV_MV=y
870826 CONFIG_RTC_DRV_TEGRA=y
827+CONFIG_RTC_DRV_ST_LPC=y
871828 CONFIG_RTC_DRV_CPCAP=m
872829 CONFIG_DMADEVICES=y
873−CONFIG_DW_DMAC=y
874830 CONFIG_AT_HDMAC=y
875831 CONFIG_AT_XDMAC=y
832+CONFIG_DMA_BCM2835=y
833+CONFIG_DMA_SUN6I=y
876834 CONFIG_FSL_EDMA=y
835+CONFIG_IMX_DMA=y
836+CONFIG_IMX_SDMA=y
877837 CONFIG_MV_XOR=y
838+CONFIG_MXS_DMA=y
839+CONFIG_PL330_DMA=y
840+CONFIG_SIRF_DMA=y
841+CONFIG_STE_DMA40=y
842+CONFIG_ST_FDMA=m
878843 CONFIG_TEGRA20_APB_DMA=y
844+CONFIG_XILINX_DMA=y
845+CONFIG_QCOM_BAM_DMA=y
846+CONFIG_DW_DMAC=y
879847 CONFIG_SH_DMAE=y
880848 CONFIG_RCAR_DMAC=y
881849 CONFIG_RENESAS_USB_DMAC=m
882−CONFIG_STE_DMA40=y
883−CONFIG_SIRF_DMA=y
884−CONFIG_TI_EDMA=y
885−CONFIG_PL330_DMA=y
886−CONFIG_IMX_SDMA=y
887−CONFIG_IMX_DMA=y
888−CONFIG_MXS_DMA=y
889−CONFIG_DMA_BCM2835=y
890−CONFIG_DMA_OMAP=y
891−CONFIG_QCOM_BAM_DMA=y
892−CONFIG_XILINX_DMA=y
893−CONFIG_DMA_SUN6I=y
894−CONFIG_ST_FDMA=m
850+CONFIG_VIRTIO_PCI=y
851+CONFIG_VIRTIO_MMIO=y
895852 CONFIG_STAGING=y
896−CONFIG_SENSORS_ISL29018=y
897−CONFIG_SENSORS_ISL29028=y
898853 CONFIG_MFD_NVEC=y
899854 CONFIG_KEYBOARD_NVEC=y
900855 CONFIG_SERIO_NVEC_PS2=y
901856 CONFIG_NVEC_POWER=y
902857 CONFIG_NVEC_PAZ00=y
903−CONFIG_BCMA=y
904−CONFIG_BCMA_HOST_SOC=y
905−CONFIG_BCMA_DRIVER_GMAC_CMN=y
906−CONFIG_BCMA_DRIVER_GPIO=y
907−CONFIG_QCOM_GSBI=y
908−CONFIG_QCOM_PM=y
909−CONFIG_QCOM_SMEM=y
910−CONFIG_QCOM_SMD_RPM=y
911−CONFIG_QCOM_SMP2P=y
912−CONFIG_QCOM_SMSM=y
913−CONFIG_QCOM_WCNSS_CTRL=m
914−CONFIG_ROCKCHIP_PM_DOMAINS=y
915−CONFIG_COMMON_CLK_QCOM=y
916−CONFIG_QCOM_CLK_RPM=y
917−CONFIG_CHROME_PLATFORMS=y
918858 CONFIG_STAGING_BOARD=y
919−CONFIG_CROS_EC_CHARDEV=m
920859 CONFIG_COMMON_CLK_MAX77686=y
921860 CONFIG_COMMON_CLK_RK808=m
922861 CONFIG_COMMON_CLK_S2MPS11=m
862+CONFIG_COMMON_CLK_QCOM=y
863+CONFIG_QCOM_CLK_RPM=y
923864 CONFIG_APQ_MMCC_8084=y
924865 CONFIG_MSM_GCC_8660=y
925866 CONFIG_MSM_MMCC_8960=y
926867 CONFIG_MSM_MMCC_8974=y
927−CONFIG_HWSPINLOCK_QCOM=y
868+CONFIG_BCM2835_MBOX=y
928869 CONFIG_ROCKCHIP_IOMMU=y
929870 CONFIG_TEGRA_IOMMU_GART=y
930871 CONFIG_TEGRA_IOMMU_SMMU=y
931872 CONFIG_REMOTEPROC=m
932873 CONFIG_ST_REMOTEPROC=m
933874 CONFIG_RPMSG_VIRTIO=m
875+CONFIG_RASPBERRYPI_POWER=y
876+CONFIG_QCOM_GSBI=y
877+CONFIG_QCOM_PM=y
878+CONFIG_QCOM_SMD_RPM=m
879+CONFIG_QCOM_WCNSS_CTRL=m
880+CONFIG_ROCKCHIP_PM_DOMAINS=y
881+CONFIG_ARCH_TEGRA_2x_SOC=y
882+CONFIG_ARCH_TEGRA_3x_SOC=y
883+CONFIG_ARCH_TEGRA_114_SOC=y
884+CONFIG_ARCH_TEGRA_124_SOC=y
934885 CONFIG_PM_DEVFREQ=y
935886 CONFIG_ARM_TEGRA_DEVFREQ=m
936−CONFIG_MEMORY=y
937−CONFIG_EXTCON=y
938887 CONFIG_TI_AEMIF=y
939888 CONFIG_IIO=y
940889 CONFIG_IIO_SW_TRIGGER=y
@@ -947,56 +896,54 @@ CONFIG_VF610_ADC=m · 6 unmodified lines
947896 CONFIG_XILINX_XADC=y
948897 CONFIG_MPU3050_I2C=y
949898 CONFIG_CM36651=m
899+CONFIG_SENSORS_ISL29018=y
900+CONFIG_SENSORS_ISL29028=y
950901 CONFIG_AK8975=y
951−CONFIG_RASPBERRYPI_POWER=y
952902 CONFIG_IIO_HRTIMER_TRIGGER=y
953903 CONFIG_PWM=y
954904 CONFIG_PWM_ATMEL=m
955905 CONFIG_PWM_ATMEL_HLCDC_PWM=m
956906 CONFIG_PWM_ATMEL_TCB=m
907+CONFIG_PWM_BCM2835=y
908+CONFIG_PWM_BRCMSTB=m
957909 CONFIG_PWM_FSL_FTM=m
958910 CONFIG_PWM_MESON=m
959911 CONFIG_PWM_RCAR=m
960912 CONFIG_PWM_RENESAS_TPU=y
961913 CONFIG_PWM_ROCKCHIP=m
962914 CONFIG_PWM_SAMSUNG=m
915+CONFIG_PWM_STI=y
963916 CONFIG_PWM_SUN4I=y
964917 CONFIG_PWM_TEGRA=y
965918 CONFIG_PWM_VT8500=y
919+CONFIG_KEYSTONE_IRQ=y
920+CONFIG_PHY_SUN4I_USB=y
921+CONFIG_PHY_SUN9I_USB=y
966922 CONFIG_PHY_HIX5HD2_SATA=y
967−CONFIG_E1000E=y
968−CONFIG_PWM_STI=y
969−CONFIG_PWM_BCM2835=y
970−CONFIG_PWM_BRCMSTB=m
971−CONFIG_PHY_DM816X_USB=m
972−CONFIG_OMAP_USB2=y
973−CONFIG_TI_PIPE3=y
974−CONFIG_TWL4030_USB=m
923+CONFIG_PHY_BERLIN_SATA=y
975924 CONFIG_PHY_BERLIN_USB=y
976925 CONFIG_PHY_CPCAP_USB=m
977−CONFIG_PHY_BERLIN_SATA=y
926+CONFIG_PHY_QCOM_APQ8064_SATA=m
927+CONFIG_PHY_RCAR_GEN2=m
978928 CONFIG_PHY_ROCKCHIP_DP=m
979929 CONFIG_PHY_ROCKCHIP_USB=y
980−CONFIG_PHY_QCOM_APQ8064_SATA=m
930+CONFIG_PHY_SAMSUNG_USB2=m
981931 CONFIG_PHY_MIPHY28LP=y
982−CONFIG_PHY_RCAR_GEN2=m
983932 CONFIG_PHY_STIH407_USB=y
984933 CONFIG_PHY_STM32_USBPHYC=y
985−CONFIG_PHY_SUN4I_USB=y
986−CONFIG_PHY_SUN9I_USB=y
987−CONFIG_PHY_SAMSUNG_USB2=m
988934 CONFIG_PHY_TEGRA_XUSB=y
989−CONFIG_PHY_BRCM_SATA=y
990−CONFIG_NVMEM=y
935+CONFIG_PHY_DM816X_USB=m
936+CONFIG_OMAP_USB2=y
937+CONFIG_TI_PIPE3=y
938+CONFIG_TWL4030_USB=m
991939 CONFIG_NVMEM_IMX_OCOTP=y
992940 CONFIG_NVMEM_SUNXI_SID=y
993941 CONFIG_NVMEM_VF610_OCOTP=y
994−CONFIG_BCM2835_MBOX=y
995942 CONFIG_RASPBERRYPI_FIRMWARE=y
996−CONFIG_EFI_VARS=m
997−CONFIG_EFI_CAPSULE_LOADER=m
998943 CONFIG_BCM47XX_NVRAM=y
999944 CONFIG_BCM47XX_SPROM=y
945+CONFIG_EFI_VARS=m
946+CONFIG_EFI_CAPSULE_LOADER=m
1000947 CONFIG_EXT4_FS=y
1001948 CONFIG_AUTOFS4_FS=y
1002949 CONFIG_MSDOS_FS=y
@@ -1004,7 +951,6 @@ CONFIG_VFAT_FS=y · 1 unmodified line
1004951 CONFIG_NTFS_FS=y
1005952 CONFIG_TMPFS_POSIX_ACL=y
1006953 CONFIG_UBIFS_FS=y
1007−CONFIG_TMPFS=y
1008954 CONFIG_SQUASHFS=y
1009955 CONFIG_SQUASHFS_LZO=y
1010956 CONFIG_SQUASHFS_XZ=y
@@ -1020,13 +966,7 @@ CONFIG_NLS_CODEPAGE_437=y · 9 unmodified lines
1020966 CONFIG_NLS_ISO8859_1=y
1021967 CONFIG_NLS_UTF8=y
1022968 CONFIG_PRINTK_TIME=y
1023−CONFIG_DEBUG_FS=y
1024969 CONFIG_MAGIC_SYSRQ=y
1025−CONFIG_LOCKUP_DETECTOR=y
1026−CONFIG_CPUFREQ_DT=y
1027−CONFIG_KEYSTONE_IRQ=y
1028−CONFIG_HW_RANDOM=y
1029−CONFIG_HW_RANDOM_ST=y
1030970 CONFIG_CRYPTO_USER=m
1031971 CONFIG_CRYPTO_USER_API_HASH=m
1032972 CONFIG_CRYPTO_USER_API_SKCIPHER=m
@@ -1035,27 +975,19 @@ CONFIG_CRYPTO_USER_API_AEAD=m · 2 unmodified lines
1035975 CONFIG_CRYPTO_DEV_MARVELL_CESA=m
1036976 CONFIG_CRYPTO_DEV_EXYNOS_RNG=m
1037977 CONFIG_CRYPTO_DEV_S5P=m
978+CONFIG_CRYPTO_DEV_ATMEL_AES=m
979+CONFIG_CRYPTO_DEV_ATMEL_TDES=m
980+CONFIG_CRYPTO_DEV_ATMEL_SHA=m
1038981 CONFIG_CRYPTO_DEV_SUN4I_SS=m
1039982 CONFIG_CRYPTO_DEV_ROCKCHIP=m
1040983 CONFIG_ARM_CRYPTO=y
1041−CONFIG_CRYPTO_SHA1_ARM=m
1042984 CONFIG_CRYPTO_SHA1_ARM_NEON=m
1043985 CONFIG_CRYPTO_SHA1_ARM_CE=m
1044986 CONFIG_CRYPTO_SHA2_ARM_CE=m
1045−CONFIG_CRYPTO_SHA256_ARM=m
1046987 CONFIG_CRYPTO_SHA512_ARM=m
1047988 CONFIG_CRYPTO_AES_ARM=m
1048989 CONFIG_CRYPTO_AES_ARM_BS=m
1049990 CONFIG_CRYPTO_AES_ARM_CE=m
1050−CONFIG_CRYPTO_CHACHA20_NEON=m
1051−CONFIG_CRYPTO_CRC32_ARM_CE=m
1052−CONFIG_CRYPTO_CRCT10DIF_ARM_CE=m
1053991 CONFIG_CRYPTO_GHASH_ARM_CE=m
1054−CONFIG_CRYPTO_DEV_ATMEL_AES=m
1055−CONFIG_CRYPTO_DEV_ATMEL_TDES=m
1056−CONFIG_CRYPTO_DEV_ATMEL_SHA=m
1057−CONFIG_VIDEO_VIVID=m
1058−CONFIG_VIRTIO=y
1059−CONFIG_VIRTIO_PCI=y
1060−CONFIG_VIRTIO_PCI_LEGACY=y
1061−CONFIG_VIRTIO_MMIO=y
992+CONFIG_CRYPTO_CRC32_ARM_CE=m
993+CONFIG_CRYPTO_CHACHA20_NEON=m
arch/arm/crypto/speck-neon-core.S+4−2
@@ -272,9 +272,11 @@ · 271 unmodified lines
272272 * Allocate stack space to store 128 bytes worth of tweaks. For
273273 * performance, this space is aligned to a 16-byte boundary so that we
274274 * can use the load/store instructions that declare 16-byte alignment.
275+ * For Thumb2 compatibility, don't do the 'bic' directly on 'sp'.
275276 */
276− sub sp, #128
277− bic sp, #0xf
277+ sub r12, sp, #128
278+ bic r12, #0xf
279+ mov sp, r12
278280
279281 .if \n == 64
280282 // Load first tweak
arch/arm/firmware/Makefile+3−0
@@ -1 +1,4 @@
11 obj-$(CONFIG_TRUSTED_FOUNDATIONS) += trusted_foundations.o
2+
3+# tf_generic_smc() fails to build with -fsanitize-coverage=trace-pc
4+KCOV_INSTRUMENT := n
arch/arm/kernel/entry-common.S+3−1
@@ -48,6 +48,7 @@ saved_pc .req lr · 47 unmodified lines
4848 * from those features make this path too inefficient.
4949 */
5050 ret_fast_syscall:
51+__ret_fast_syscall:
5152 UNWIND(.fnstart )
5253 UNWIND(.cantunwind )
5354 disable_irq_notrace @ disable interrupts
@@ -78,6 +79,7 @@ fast_work_pending: · 24 unmodified lines
7879 * call.
7980 */
8081 ret_fast_syscall:
82+__ret_fast_syscall:
8183 UNWIND(.fnstart )
8284 UNWIND(.cantunwind )
8385 str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
@@ -255,7 +257,7 @@ local_restart: · 171 unmodified lines
255257 tst r10, #_TIF_SYSCALL_WORK @ are we tracing syscalls?
256258 bne __sys_trace
257259
258− invoke_syscall tbl, scno, r10, ret_fast_syscall
260+ invoke_syscall tbl, scno, r10, __ret_fast_syscall
259261
260262 add r1, sp, #S_OFF
261263 2: cmp scno, #(__ARM_NR_BASE - __NR_SYSCALL_BASE)
arch/arm/kernel/head-nommu.S+1−1
@@ -177,7 +177,7 @@ M_CLASS(streq r3, [r12, #PMSAv8_MAIR1]) · 176 unmodified lines
177177 bic r0, r0, #CR_I
178178 #endif
179179 mcr p15, 0, r0, c1, c0, 0 @ write control reg
180− isb
180+ instr_sync
181181 #elif defined (CONFIG_CPU_V7M)
182182 #ifdef CONFIG_ARM_MPU
183183 ldreq r3, [r12, MPU_CTRL]
arch/arm/kernel/process.c+1−0
@@ -338,6 +338,7 @@ static struct vm_area_struct gate_vma = { · 337 unmodified lines
338338
339339 static int __init gate_vma_init(void)
340340 {
341+ vma_init(&gate_vma, NULL);
341342 gate_vma.vm_page_prot = PAGE_READONLY_EXEC;
342343 return 0;
343344 }
arch/arm/kernel/signal.c+2−2
@@ -544,7 +544,7 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) · 543 unmodified lines
544544 * Increment event counter and perform fixup for the pre-signal
545545 * frame.
546546 */
547− rseq_signal_deliver(regs);
547+ rseq_signal_deliver(ksig, regs);
548548
549549 /*
550550 * Set up the stack frame
@@ -666,7 +666,7 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall) · 115 unmodified lines
666666 } else {
667667 clear_thread_flag(TIF_NOTIFY_RESUME);
668668 tracehook_notify_resume(regs);
669− rseq_handle_notify_resume(regs);
669+ rseq_handle_notify_resume(NULL, regs);
670670 }
671671 }
672672 local_irq_disable();
arch/arm/mach-bcm/Kconfig+1−0
@@ -20,6 +20,7 @@ config ARCH_BCM_IPROC · 19 unmodified lines
2020 select GPIOLIB
2121 select ARM_AMBA
2222 select PINCTRL
23+ select PCI_DOMAINS if PCI
2324 help
2425 This enables support for systems based on Broadcom IPROC architected SoCs.
2526 The IPROC complex contains one or more ARM CPUs along with common
arch/arm/mach-davinci/board-da850-evm.c+1−1
@@ -774,7 +774,7 @@ static struct gpiod_lookup_table mmc_gpios_table = { · 773 unmodified lines
774774 GPIO_LOOKUP("davinci_gpio.0", DA850_MMCSD_CD_PIN, "cd",
775775 GPIO_ACTIVE_LOW),
776776 GPIO_LOOKUP("davinci_gpio.0", DA850_MMCSD_WP_PIN, "wp",
777− GPIO_ACTIVE_LOW),
777+ GPIO_ACTIVE_HIGH),
778778 },
779779 };
780780
arch/arm/mach-omap2/omap-smp.c+41−0
@@ -109,6 +109,45 @@ void omap5_erratum_workaround_801819(void) · 108 unmodified lines
109109 static inline void omap5_erratum_workaround_801819(void) { }
110110 #endif
111111
112+#ifdef CONFIG_HARDEN_BRANCH_PREDICTOR
113+/*
114+ * Configure ACR and enable ACTLR[0] (Enable invalidates of BTB with
115+ * ICIALLU) to activate the workaround for secondary Core.
116+ * NOTE: it is assumed that the primary core's configuration is done
117+ * by the boot loader (kernel will detect a misconfiguration and complain
118+ * if this is not done).
119+ *
120+ * In General Purpose(GP) devices, ACR bit settings can only be done
121+ * by ROM code in "secure world" using the smc call and there is no
122+ * option to update the "firmware" on such devices. This also works for
123+ * High security(HS) devices, as a backup option in case the
124+ * "update" is not done in the "security firmware".
125+ */
126+static void omap5_secondary_harden_predictor(void)
127+{
128+ u32 acr, acr_mask;
129+
130+ asm volatile ("mrc p15, 0, %0, c1, c0, 1" : "=r" (acr));
131+
132+ /*
133+ * ACTLR[0] (Enable invalidates of BTB with ICIALLU)
134+ */
135+ acr_mask = BIT(0);
136+
137+ /* Do we already have it done.. if yes, skip expensive smc */
138+ if ((acr & acr_mask) == acr_mask)
139+ return;
140+
141+ acr |= acr_mask;
142+ omap_smc1(OMAP5_DRA7_MON_SET_ACR_INDEX, acr);
143+
144+ pr_debug("%s: ARM ACR setup for CVE_2017_5715 applied on CPU%d\n",
145+ __func__, smp_processor_id());
146+}
147+#else
148+static inline void omap5_secondary_harden_predictor(void) { }
149+#endif
150+
112151 static void omap4_secondary_init(unsigned int cpu)
113152 {
114153 /*
@@ -131,6 +170,8 @@ static void omap4_secondary_init(unsigned int cpu) · 16 unmodified lines
131170 set_cntfreq();
132171 /* Configure ACR to disable streaming WA for 801819 */
133172 omap5_erratum_workaround_801819();
173+ /* Enable ACR to allow for ICUALLU workaround */
174+ omap5_secondary_harden_predictor();
134175 }
135176
136177 /*
arch/arm/mach-pxa/irq.c+2−2
@@ -185,7 +185,7 @@ static int pxa_irq_suspend(void) · 184 unmodified lines
185185 {
186186 int i;
187187
188− for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
188+ for (i = 0; i < DIV_ROUND_UP(pxa_internal_irq_nr, 32); i++) {
189189 void __iomem *base = irq_base(i);
190190
191191 saved_icmr[i] = __raw_readl(base + ICMR);
@@ -204,7 +204,7 @@ static void pxa_irq_resume(void) · 12 unmodified lines
204204 {
205205 int i;
206206
207− for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
207+ for (i = 0; i < DIV_ROUND_UP(pxa_internal_irq_nr, 32); i++) {
208208 void __iomem *base = irq_base(i);
209209
210210 __raw_writel(saved_icmr[i], base + ICMR);
arch/arm/mach-rpc/ecard.c+1−4
@@ -212,7 +212,7 @@ static DEFINE_MUTEX(ecard_mutex); · 211 unmodified lines
212212 */
213213 static void ecard_init_pgtables(struct mm_struct *mm)
214214 {
215− struct vm_area_struct vma;
215+ struct vm_area_struct vma = TLB_FLUSH_VMA(mm, VM_EXEC);
216216
217217 /* We want to set up the page tables for the following mapping:
218218 * Virtual Physical
@@ -237,9 +237,6 @@ static void ecard_init_pgtables(struct mm_struct *mm) · 18 unmodified lines
237237
238238 memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE));
239239
240− vma.vm_flags = VM_EXEC;
241− vma.vm_mm = mm;
242−
243240 flush_tlb_range(&vma, IO_START, IO_START + IO_SIZE);
244241 flush_tlb_range(&vma, EASI_START, EASI_START + EASI_SIZE);
245242 }
arch/arm/mach-socfpga/Kconfig+1−0
@@ -10,6 +10,7 @@ menuconfig ARCH_SOCFPGA · 9 unmodified lines
1010 select HAVE_ARM_SCU
1111 select HAVE_ARM_TWD if SMP
1212 select MFD_SYSCON
13+ select PCI_DOMAINS if PCI
1314
1415 if ARCH_SOCFPGA
1516 config SOCFPGA_SUSPEND
arch/arm/mm/init.c+9−0
@@ -736,20 +736,29 @@ static int __mark_rodata_ro(void *unused) · 735 unmodified lines
736736 return 0;
737737 }
738738
739+static int kernel_set_to_readonly __read_mostly;
740+
739741 void mark_rodata_ro(void)
740742 {
743+ kernel_set_to_readonly = 1;
741744 stop_machine(__mark_rodata_ro, NULL, NULL);
742745 debug_checkwx();
743746 }
744747
745748 void set_kernel_text_rw(void)
746749 {
750+ if (!kernel_set_to_readonly)
751+ return;
752+
747753 set_section_perms(ro_perms, ARRAY_SIZE(ro_perms), false,
748754 current->active_mm);
749755 }
750756
751757 void set_kernel_text_ro(void)
752758 {
759+ if (!kernel_set_to_readonly)
760+ return;
761+
753762 set_section_perms(ro_perms, ARRAY_SIZE(ro_perms), true,
754763 current->active_mm);
755764 }
arch/arm/net/bpf_jit_32.c+1−1
@@ -1844,7 +1844,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) · 1843 unmodified lines
18441844 /* there are 2 passes here */
18451845 bpf_jit_dump(prog->len, image_size, 2, ctx.target);
18461846
1847− set_memory_ro((unsigned long)header, header->pages);
1847+ bpf_jit_binary_lock_ro(header);
18481848 prog->bpf_func = (void *)ctx.target;
18491849 prog->jited = 1;
18501850 prog->jited_len = image_size;
arch/arm/xen/enlighten.c+4−3
@@ -59,6 +59,9 @@ struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS] __initdata; · 58 unmodified lines
5959
6060 static __read_mostly unsigned int xen_events_irq;
6161
62+uint32_t xen_start_flags;
63+EXPORT_SYMBOL(xen_start_flags);
64+
6265 int xen_remap_domain_gfn_array(struct vm_area_struct *vma,
6366 unsigned long addr,
6467 xen_pfn_t *gfn, int nr,
@@ -293,9 +296,7 @@ void __init xen_early_init(void) · 228 unmodified lines
293296 xen_setup_features();
294297
295298 if (xen_feature(XENFEAT_dom0))
296− xen_start_info->flags |= SIF_INITDOMAIN|SIF_PRIVILEGED;
297− else
298− xen_start_info->flags &= ~(SIF_INITDOMAIN|SIF_PRIVILEGED);
299+ xen_start_flags |= SIF_INITDOMAIN|SIF_PRIVILEGED;
299300
300301 if (!console_set_on_cmdline && !xen_initial_domain())
301302 add_preferred_console("hvc", 0, NULL);
arch/arm64/Makefile+5−5
@@ -10,7 +10,7 @@ · 9 unmodified lines
1010 #
1111 # Copyright (C) 1995-2001 by Russell King
1212
13−LDFLAGS_vmlinux :=-p --no-undefined -X
13+LDFLAGS_vmlinux :=--no-undefined -X
1414 CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
1515 GZFLAGS :=-9
1616
@@ -60,15 +60,15 @@ ifeq ($(CONFIG_CPU_BIG_ENDIAN), y) · 43 unmodified lines
6060 KBUILD_CPPFLAGS += -mbig-endian
6161 CHECKFLAGS += -D__AARCH64EB__
6262 AS += -EB
63−LD += -EB
64−LDFLAGS += -maarch64linuxb
63+# We must use the linux target here, since distributions don't tend to package
64+# the ELF linker scripts with binutils, and this results in a build failure.
65+LDFLAGS += -EB -maarch64linuxb
6566 UTS_MACHINE := aarch64_be
6667 else
6768 KBUILD_CPPFLAGS += -mlittle-endian
6869 CHECKFLAGS += -D__AARCH64EL__
6970 AS += -EL
70−LD += -EL
71−LDFLAGS += -maarch64linux
71+LDFLAGS += -EL -maarch64linux # See comment above
7272 UTS_MACHINE := aarch64
7373 endif
7474
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi+2−4
@@ -309,8 +309,7 @@ · 308 unmodified lines
309309 interrupts = <0 99 4>;
310310 resets = <&rst SPIM0_RESET>;
311311 reg-io-width = <4>;
312− num-chipselect = <4>;
313− bus-num = <0>;
312+ num-cs = <4>;
314313 status = "disabled";
315314 };
316315
@@ -322,8 +321,7 @@ · 5 unmodified lines
322321 interrupts = <0 100 4>;
323322 resets = <&rst SPIM1_RESET>;
324323 reg-io-width = <4>;
325− num-chipselect = <4>;
326− bus-num = <0>;
324+ num-cs = <4>;
327325 status = "disabled";
328326 };
329327
arch/arm64/boot/dts/amlogic/meson-axg-s400.dts+14−1
@@ -66,9 +66,22 @@ · 65 unmodified lines
6666
6767 &ethmac {
6868 status = "okay";
69− phy-mode = "rgmii";
7069 pinctrl-0 = <&eth_rgmii_y_pins>;
7170 pinctrl-names = "default";
71+ phy-handle = <&eth_phy0>;
72+ phy-mode = "rgmii";
73+
74+ mdio {
75+ compatible = "snps,dwmac-mdio";
76+ #address-cells = <1>;
77+ #size-cells = <0>;
78+
79+ eth_phy0: ethernet-phy@0 {
80+ /* Realtek RTL8211F (0x001cc916) */
81+ reg = <0>;
82+ eee-broken-1000t;
83+ };
84+ };
7285 };
7386
7487 &uart_A {
arch/arm64/boot/dts/amlogic/meson-axg.dtsi+2−2
@@ -132,7 +132,7 @@ · 131 unmodified lines
132132
133133 sd_emmc_b: sd@5000 {
134134 compatible = "amlogic,meson-axg-mmc";
135− reg = <0x0 0x5000 0x0 0x2000>;
135+ reg = <0x0 0x5000 0x0 0x800>;
136136 interrupts = <GIC_SPI 217 IRQ_TYPE_EDGE_RISING>;
137137 status = "disabled";
138138 clocks = <&clkc CLKID_SD_EMMC_B>,
@@ -144,7 +144,7 @@ · 5 unmodified lines
144144
145145 sd_emmc_c: mmc@7000 {
146146 compatible = "amlogic,meson-axg-mmc";
147− reg = <0x0 0x7000 0x0 0x2000>;
147+ reg = <0x0 0x7000 0x0 0x800>;
148148 interrupts = <GIC_SPI 218 IRQ_TYPE_EDGE_RISING>;
149149 status = "disabled";
150150 clocks = <&clkc CLKID_SD_EMMC_C>,
arch/arm64/boot/dts/amlogic/meson-gx.dtsi+9−3
@@ -35,6 +35,12 @@ · 34 unmodified lines
3535 no-map;
3636 };
3737
38+ /* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */
39+ secmon_reserved_alt: secmon@5000000 {
40+ reg = <0x0 0x05000000 0x0 0x300000>;
41+ no-map;
42+ };
43+
3844 linux,cma {
3945 compatible = "shared-dma-pool";
4046 reusable;
@@ -457,21 +463,21 @@ · 416 unmodified lines
457463
458464 sd_emmc_a: mmc@70000 {
459465 compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc";
460− reg = <0x0 0x70000 0x0 0x2000>;
466+ reg = <0x0 0x70000 0x0 0x800>;
461467 interrupts = <GIC_SPI 216 IRQ_TYPE_EDGE_RISING>;
462468 status = "disabled";
463469 };
464470
465471 sd_emmc_b: mmc@72000 {
466472 compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc";
467− reg = <0x0 0x72000 0x0 0x2000>;
473+ reg = <0x0 0x72000 0x0 0x800>;
468474 interrupts = <GIC_SPI 217 IRQ_TYPE_EDGE_RISING>;
469475 status = "disabled";
470476 };
471477
472478 sd_emmc_c: mmc@74000 {
473479 compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc";
474− reg = <0x0 0x74000 0x0 0x2000>;
480+ reg = <0x0 0x74000 0x0 0x800>;
475481 interrupts = <GIC_SPI 218 IRQ_TYPE_EDGE_RISING>;
476482 status = "disabled";
477483 };
arch/arm64/boot/dts/amlogic/meson-gxl-mali.dtsi+1−1
@@ -6,7 +6,7 @@ · 5 unmodified lines
66
77 &apb {
88 mali: gpu@c0000 {
9− compatible = "amlogic,meson-gxbb-mali", "arm,mali-450";
9+ compatible = "amlogic,meson-gxl-mali", "arm,mali-450";
1010 reg = <0x0 0xc0000 0x0 0x40000>;
1111 interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
1212 <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts+0−3
@@ -234,9 +234,6 @@ · 233 unmodified lines
234234
235235 bus-width = <4>;
236236 cap-sd-highspeed;
237− sd-uhs-sdr12;
238− sd-uhs-sdr25;
239− sd-uhs-sdr50;
240237 max-frequency = <100000000>;
241238 disable-wp;
242239
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi+7−0
@@ -189,3 +189,10 @@ · 188 unmodified lines
189189 &usb0 {
190190 status = "okay";
191191 };
192+
193+&usb2_phy0 {
194+ /*
195+ * HDMI_5V is also used as supply for the USB VBUS.
196+ */
197+ phy-supply = <&hdmi_5v>;
198+};
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi+0−8
@@ -13,14 +13,6 @@ · 12 unmodified lines
1313 / {
1414 compatible = "amlogic,meson-gxl";
1515
16− reserved-memory {
17− /* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */
18− secmon_reserved_alt: secmon@5000000 {
19− reg = <0x0 0x05000000 0x0 0x300000>;
20− no-map;
21− };
22− };
23−
2416 soc {
2517 usb0: usb@c9000000 {
2618 status = "disabled";
arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi+4−4
@@ -118,7 +118,7 @@ · 117 unmodified lines
118118
119119 #interrupt-cells = <1>;
120120 interrupt-map-mask = <0 0 0 0>;
121− interrupt-map = <0 0 0 0 &gic 0 GIC_SPI 281 IRQ_TYPE_NONE>;
121+ interrupt-map = <0 0 0 0 &gic 0 GIC_SPI 281 IRQ_TYPE_LEVEL_HIGH>;
122122
123123 linux,pci-domain = <0>;
124124
@@ -149,7 +149,7 @@ · 24 unmodified lines
149149
150150 #interrupt-cells = <1>;
151151 interrupt-map-mask = <0 0 0 0>;
152− interrupt-map = <0 0 0 0 &gic 0 GIC_SPI 305 IRQ_TYPE_NONE>;
152+ interrupt-map = <0 0 0 0 &gic 0 GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>;
153153
154154 linux,pci-domain = <4>;
155155
@@ -566,7 +566,7 @@ · 410 unmodified lines
566566 reg = <0x66080000 0x100>;
567567 #address-cells = <1>;
568568 #size-cells = <0>;
569− interrupts = <GIC_SPI 394 IRQ_TYPE_NONE>;
569+ interrupts = <GIC_SPI 394 IRQ_TYPE_LEVEL_HIGH>;
570570 clock-frequency = <100000>;
571571 status = "disabled";
572572 };
@@ -594,7 +594,7 @@ · 21 unmodified lines
594594 reg = <0x660b0000 0x100>;
595595 #address-cells = <1>;
596596 #size-cells = <0>;
597− interrupts = <GIC_SPI 395 IRQ_TYPE_NONE>;
597+ interrupts = <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>;
598598 clock-frequency = <100000>;
599599 status = "disabled";
600600 };
arch/arm64/boot/dts/broadcom/stingray/bcm958742k.dts+4−0
@@ -43,6 +43,10 @@ · 42 unmodified lines
4343 enet-phy-lane-swap;
4444 };
4545
46+&sdio0 {
47+ mmc-ddr-1_8v;
48+};
49+
4650 &uart2 {
4751 status = "okay";
4852 };
arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dts+4−0
@@ -42,3 +42,7 @@ · 41 unmodified lines
4242 &gphy0 {
4343 enet-phy-lane-swap;
4444 };
45+
46+&sdio0 {
47+ mmc-ddr-1_8v;
48+};
arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi+2−2
@@ -409,7 +409,7 @@ · 408 unmodified lines
409409 reg = <0x000b0000 0x100>;
410410 #address-cells = <1>;
411411 #size-cells = <0>;
412− interrupts = <GIC_SPI 177 IRQ_TYPE_NONE>;
412+ interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>;
413413 clock-frequency = <100000>;
414414 status = "disabled";
415415 };
@@ -453,7 +453,7 @@ · 37 unmodified lines
453453 reg = <0x000e0000 0x100>;
454454 #address-cells = <1>;
455455 #size-cells = <0>;
456− interrupts = <GIC_SPI 178 IRQ_TYPE_NONE>;
456+ interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
457457 clock-frequency = <100000>;
458458 status = "disabled";
459459 };
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts+2−0
@@ -585,6 +585,8 @@ · 584 unmodified lines
585585 vmmc-supply = <&wlan_en>;
586586 ti,non-removable;
587587 non-removable;
588+ cap-power-off-card;
589+ keep-power-in-suspend;
588590 #address-cells = <0x1>;
589591 #size-cells = <0x0>;
590592 status = "ok";
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts+2−0
@@ -322,6 +322,8 @@ · 321 unmodified lines
322322 dwmmc_2: dwmmc2@f723f000 {
323323 bus-width = <0x4>;
324324 non-removable;
325+ cap-power-off-card;
326+ keep-power-in-suspend;
325327 vmmc-supply = <&reg_vdd_3v3>;
326328 mmc-pwrseq = <&wl1835_pwrseq>;
327329
arch/arm64/boot/dts/marvell/armada-cp110.dtsi+1−1
@@ -149,7 +149,7 @@ · 148 unmodified lines
149149
150150 CP110_LABEL(icu): interrupt-controller@1e0000 {
151151 compatible = "marvell,cp110-icu";
152− reg = <0x1e0000 0x10>;
152+ reg = <0x1e0000 0x440>;
153153 #interrupt-cells = <3>;
154154 interrupt-controller;
155155 msi-parent = <&gicp>;
arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi+1−1
@@ -75,7 +75,7 @@ · 74 unmodified lines
7575
7676 serial@75b1000 {
7777 label = "LS-UART0";
78− status = "okay";
78+ status = "disabled";
7979 pinctrl-names = "default", "sleep";
8080 pinctrl-0 = <&blsp2_uart2_4pins_default>;
8181 pinctrl-1 = <&blsp2_uart2_4pins_sleep>;
arch/arm64/boot/dts/qcom/msm8916.dtsi+2−2
@@ -1191,14 +1191,14 @@ · 1190 unmodified lines
11911191
11921192 port@0 {
11931193 reg = <0>;
1194− etf_out: endpoint {
1194+ etf_in: endpoint {
11951195 slave-mode;
11961196 remote-endpoint = <&funnel0_out>;
11971197 };
11981198 };
11991199 port@1 {
12001200 reg = <0>;
1201− etf_in: endpoint {
1201+ etf_out: endpoint {
12021202 remote-endpoint = <&replicator_in>;
12031203 };
12041204 };
arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts+1−1
@@ -54,7 +54,7 @@ · 53 unmodified lines
5454 sound {
5555 compatible = "audio-graph-card";
5656 label = "UniPhier LD11";
57− widgets = "Headphone", "Headphone Jack";
57+ widgets = "Headphone", "Headphones";
5858 dais = <&i2s_port2
5959 &i2s_port3
6060 &i2s_port4
arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts+1−1
@@ -54,7 +54,7 @@ · 53 unmodified lines
5454 sound {
5555 compatible = "audio-graph-card";
5656 label = "UniPhier LD20";
57− widgets = "Headphone", "Headphone Jack";
57+ widgets = "Headphone", "Headphones";
5858 dais = <&i2s_port2
5959 &i2s_port3
6060 &i2s_port4
arch/arm64/configs/defconfig+39−63
@@ -47,6 +47,7 @@ CONFIG_ARCH_MVEBU=y · 46 unmodified lines
4747 CONFIG_ARCH_QCOM=y
4848 CONFIG_ARCH_ROCKCHIP=y
4949 CONFIG_ARCH_SEATTLE=y
50+CONFIG_ARCH_SYNQUACER=y
5051 CONFIG_ARCH_RENESAS=y
5152 CONFIG_ARCH_R8A7795=y
5253 CONFIG_ARCH_R8A7796=y
@@ -58,7 +59,6 @@ CONFIG_ARCH_R8A77995=y · 5 unmodified lines
5859 CONFIG_ARCH_STRATIX10=y
5960 CONFIG_ARCH_TEGRA=y
6061 CONFIG_ARCH_SPRD=y
61−CONFIG_ARCH_SYNQUACER=y
6262 CONFIG_ARCH_THUNDER=y
6363 CONFIG_ARCH_THUNDER2=y
6464 CONFIG_ARCH_UNIPHIER=y
@@ -67,25 +67,23 @@ CONFIG_ARCH_XGENE=y · 2 unmodified lines
6767 CONFIG_ARCH_ZX=y
6868 CONFIG_ARCH_ZYNQMP=y
6969 CONFIG_PCI=y
70−CONFIG_HOTPLUG_PCI_PCIE=y
7170 CONFIG_PCI_IOV=y
7271 CONFIG_HOTPLUG_PCI=y
7372 CONFIG_HOTPLUG_PCI_ACPI=y
74−CONFIG_PCI_LAYERSCAPE=y
75−CONFIG_PCI_HISI=y
76−CONFIG_PCIE_QCOM=y
77−CONFIG_PCIE_KIRIN=y
78−CONFIG_PCIE_ARMADA_8K=y
79−CONFIG_PCIE_HISI_STB=y
8073 CONFIG_PCI_AARDVARK=y
8174 CONFIG_PCI_TEGRA=y
8275 CONFIG_PCIE_RCAR=y
83−CONFIG_PCIE_ROCKCHIP=y
84−CONFIG_PCIE_ROCKCHIP_HOST=m
8576 CONFIG_PCI_HOST_GENERIC=y
8677 CONFIG_PCI_XGENE=y
8778 CONFIG_PCI_HOST_THUNDER_PEM=y
8879 CONFIG_PCI_HOST_THUNDER_ECAM=y
80+CONFIG_PCIE_ROCKCHIP_HOST=m
81+CONFIG_PCI_LAYERSCAPE=y
82+CONFIG_PCI_HISI=y
83+CONFIG_PCIE_QCOM=y
84+CONFIG_PCIE_ARMADA_8K=y
85+CONFIG_PCIE_KIRIN=y
86+CONFIG_PCIE_HISI_STB=y
8987 CONFIG_ARM64_VA_BITS_48=y
9088 CONFIG_SCHED_MC=y
9189 CONFIG_NUMA=y
@@ -104,8 +102,6 @@ CONFIG_HIBERNATION=y · 12 unmodified lines
104102 CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
105103 CONFIG_ARM_CPUIDLE=y
106104 CONFIG_CPU_FREQ=y
107−CONFIG_CPU_FREQ_GOV_ATTR_SET=y
108−CONFIG_CPU_FREQ_GOV_COMMON=y
109105 CONFIG_CPU_FREQ_STAT=y
110106 CONFIG_CPU_FREQ_GOV_POWERSAVE=m
111107 CONFIG_CPU_FREQ_GOV_USERSPACE=y
@@ -113,11 +109,11 @@ CONFIG_CPU_FREQ_GOV_ONDEMAND=y · 1 unmodified line
113109 CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
114110 CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
115111 CONFIG_CPUFREQ_DT=y
112+CONFIG_ACPI_CPPC_CPUFREQ=m
116113 CONFIG_ARM_ARMADA_37XX_CPUFREQ=y
117114 CONFIG_ARM_BIG_LITTLE_CPUFREQ=y
118115 CONFIG_ARM_SCPI_CPUFREQ=y
119116 CONFIG_ARM_TEGRA186_CPUFREQ=y
120−CONFIG_ACPI_CPPC_CPUFREQ=m
121117 CONFIG_NET=y
122118 CONFIG_PACKET=y
123119 CONFIG_UNIX=y
@@ -236,11 +232,6 @@ CONFIG_SMSC911X=y · 112 unmodified lines
236232 CONFIG_SNI_AVE=y
237233 CONFIG_SNI_NETSEC=y
238234 CONFIG_STMMAC_ETH=m
239−CONFIG_DWMAC_IPQ806X=m
240−CONFIG_DWMAC_MESON=m
241−CONFIG_DWMAC_ROCKCHIP=m
242−CONFIG_DWMAC_SUNXI=m
243−CONFIG_DWMAC_SUN8I=m
244235 CONFIG_MDIO_BUS_MUX_MMIOREG=y
245236 CONFIG_AT803X_PHY=m
246237 CONFIG_MARVELL_PHY=m
@@ -269,8 +260,8 @@ CONFIG_WL18XX=m · 22 unmodified lines
269260 CONFIG_WLCORE_SDIO=m
270261 CONFIG_INPUT_EVDEV=y
271262 CONFIG_KEYBOARD_ADC=m
272−CONFIG_KEYBOARD_CROS_EC=y
273263 CONFIG_KEYBOARD_GPIO=y
264+CONFIG_KEYBOARD_CROS_EC=y
274265 CONFIG_INPUT_TOUCHSCREEN=y
275266 CONFIG_TOUCHSCREEN_ATMEL_MXT=m
276267 CONFIG_INPUT_MISC=y
@@ -296,17 +287,13 @@ CONFIG_SERIAL_SAMSUNG=y · 19 unmodified lines
296287 CONFIG_SERIAL_SAMSUNG_CONSOLE=y
297288 CONFIG_SERIAL_TEGRA=y
298289 CONFIG_SERIAL_SH_SCI=y
299−CONFIG_SERIAL_SH_SCI_NR_UARTS=11
300−CONFIG_SERIAL_SH_SCI_CONSOLE=y
301290 CONFIG_SERIAL_MSM=y
302291 CONFIG_SERIAL_MSM_CONSOLE=y
303292 CONFIG_SERIAL_XILINX_PS_UART=y
304293 CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
305294 CONFIG_SERIAL_MVEBU_UART=y
306295 CONFIG_SERIAL_DEV_BUS=y
307−CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
308296 CONFIG_VIRTIO_CONSOLE=y
309−CONFIG_I2C_HID=m
310297 CONFIG_I2C_CHARDEV=y
311298 CONFIG_I2C_MUX=y
312299 CONFIG_I2C_MUX_PCA954x=y
@@ -325,26 +312,26 @@ CONFIG_I2C_RCAR=y · 12 unmodified lines
325312 CONFIG_I2C_CROS_EC_TUNNEL=y
326313 CONFIG_SPI=y
327314 CONFIG_SPI_ARMADA_3700=y
328−CONFIG_SPI_MESON_SPICC=m
329−CONFIG_SPI_MESON_SPIFC=m
330315 CONFIG_SPI_BCM2835=m
331316 CONFIG_SPI_BCM2835AUX=m
317+CONFIG_SPI_MESON_SPICC=m
318+CONFIG_SPI_MESON_SPIFC=m
332319 CONFIG_SPI_ORION=y
333320 CONFIG_SPI_PL022=y
334−CONFIG_SPI_QUP=y
335321 CONFIG_SPI_ROCKCHIP=y
322+CONFIG_SPI_QUP=y
336323 CONFIG_SPI_S3C64XX=y
337324 CONFIG_SPI_SPIDEV=m
338325 CONFIG_SPMI=y
339−CONFIG_PINCTRL_IPQ8074=y
340326 CONFIG_PINCTRL_SINGLE=y
341327 CONFIG_PINCTRL_MAX77620=y
328+CONFIG_PINCTRL_IPQ8074=y
342329 CONFIG_PINCTRL_MSM8916=y
343330 CONFIG_PINCTRL_MSM8994=y
344331 CONFIG_PINCTRL_MSM8996=y
345−CONFIG_PINCTRL_MT7622=y
346332 CONFIG_PINCTRL_QDF2XXX=y
347333 CONFIG_PINCTRL_QCOM_SPMI_PMIC=y
334+CONFIG_PINCTRL_MT7622=y
348335 CONFIG_GPIO_DWAPB=y
349336 CONFIG_GPIO_MB86S7X=y
350337 CONFIG_GPIO_PL061=y
@@ -368,13 +355,13 @@ CONFIG_SENSORS_INA2XX=m · 17 unmodified lines
368355 CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y
369356 CONFIG_CPU_THERMAL=y
370357 CONFIG_THERMAL_EMULATION=y
358+CONFIG_ROCKCHIP_THERMAL=m
359+CONFIG_RCAR_GEN3_THERMAL=y
371360 CONFIG_ARMADA_THERMAL=y
372361 CONFIG_BRCMSTB_THERMAL=m
373362 CONFIG_EXYNOS_THERMAL=y
374−CONFIG_RCAR_GEN3_THERMAL=y
375−CONFIG_QCOM_TSENS=y
376−CONFIG_ROCKCHIP_THERMAL=m
377363 CONFIG_TEGRA_BPMP_THERMAL=m
364+CONFIG_QCOM_TSENS=y
378365 CONFIG_UNIPHIER_THERMAL=y
379366 CONFIG_WATCHDOG=y
380367 CONFIG_S3C2410_WATCHDOG=y
@@ -395,9 +382,9 @@ CONFIG_MFD_MAX77620=y · 14 unmodified lines
395382 CONFIG_MFD_SPMI_PMIC=y
396383 CONFIG_MFD_RK808=y
397384 CONFIG_MFD_SEC_CORE=y
385+CONFIG_REGULATOR_FIXED_VOLTAGE=y
398386 CONFIG_REGULATOR_AXP20X=y
399387 CONFIG_REGULATOR_FAN53555=y
400−CONFIG_REGULATOR_FIXED_VOLTAGE=y
401388 CONFIG_REGULATOR_GPIO=y
402389 CONFIG_REGULATOR_HI6421V530=y
403390 CONFIG_REGULATOR_HI655X=y
@@ -407,16 +394,15 @@ CONFIG_REGULATOR_QCOM_SMD_RPM=y · 3 unmodified lines
407394 CONFIG_REGULATOR_QCOM_SPMI=y
408395 CONFIG_REGULATOR_RK808=y
409396 CONFIG_REGULATOR_S2MPS11=y
397+CONFIG_RC_CORE=m
398+CONFIG_RC_DECODERS=y
399+CONFIG_RC_DEVICES=y
400+CONFIG_IR_MESON=m
410401 CONFIG_MEDIA_SUPPORT=m
411402 CONFIG_MEDIA_CAMERA_SUPPORT=y
412403 CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
413404 CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
414405 CONFIG_MEDIA_CONTROLLER=y
415−CONFIG_MEDIA_RC_SUPPORT=y
416−CONFIG_RC_CORE=m
417−CONFIG_RC_DEVICES=y
418−CONFIG_RC_DECODERS=y
419−CONFIG_IR_MESON=m
420406 CONFIG_VIDEO_V4L2_SUBDEV_API=y
421407 # CONFIG_DVB_NET is not set
422408 CONFIG_V4L_MEM2MEM_DRIVERS=y
@@ -441,8 +427,7 @@ CONFIG_ROCKCHIP_DW_HDMI=y · 18 unmodified lines
441427 CONFIG_ROCKCHIP_DW_MIPI_DSI=y
442428 CONFIG_ROCKCHIP_INNO_HDMI=y
443429 CONFIG_DRM_RCAR_DU=m
444−CONFIG_DRM_RCAR_LVDS=y
445−CONFIG_DRM_RCAR_VSP=y
430+CONFIG_DRM_RCAR_LVDS=m
446431 CONFIG_DRM_TEGRA=m
447432 CONFIG_DRM_PANEL_SIMPLE=m
448433 CONFIG_DRM_I2C_ADV7511=m
@@ -455,7 +440,6 @@ CONFIG_FB_ARMCLCD=y · 6 unmodified lines
455440 CONFIG_BACKLIGHT_GENERIC=m
456441 CONFIG_BACKLIGHT_PWM=m
457442 CONFIG_BACKLIGHT_LP855X=m
458−CONFIG_FRAMEBUFFER_CONSOLE=y
459443 CONFIG_LOGO=y
460444 # CONFIG_LOGO_LINUX_MONO is not set
461445 # CONFIG_LOGO_LINUX_VGA16 is not set
@@ -468,6 +452,7 @@ CONFIG_SND_SOC_RCAR=m · 6 unmodified lines
468452 CONFIG_SND_SOC_AK4613=m
469453 CONFIG_SND_SIMPLE_CARD=m
470454 CONFIG_SND_AUDIO_GRAPH_CARD=m
455+CONFIG_I2C_HID=m
471456 CONFIG_USB=y
472457 CONFIG_USB_OTG=y
473458 CONFIG_USB_XHCI_HCD=y
@@ -501,12 +486,12 @@ CONFIG_MMC_BLOCK_MINORS=32 · 27 unmodified lines
501486 CONFIG_MMC_ARMMMCI=y
502487 CONFIG_MMC_SDHCI=y
503488 CONFIG_MMC_SDHCI_ACPI=y
504−CONFIG_MMC_SDHCI_F_SDH30=y
505489 CONFIG_MMC_SDHCI_PLTFM=y
506490 CONFIG_MMC_SDHCI_OF_ARASAN=y
507491 CONFIG_MMC_SDHCI_OF_ESDHC=y
508492 CONFIG_MMC_SDHCI_CADENCE=y
509493 CONFIG_MMC_SDHCI_TEGRA=y
494+CONFIG_MMC_SDHCI_F_SDH30=y
510495 CONFIG_MMC_MESON_GX=y
511496 CONFIG_MMC_SDHCI_MSM=y
512497 CONFIG_MMC_SPI=y
@@ -524,11 +509,11 @@ CONFIG_LEDS_CLASS=y · 11 unmodified lines
524509 CONFIG_LEDS_GPIO=y
525510 CONFIG_LEDS_PWM=y
526511 CONFIG_LEDS_SYSCON=y
512+CONFIG_LEDS_TRIGGER_DISK=y
527513 CONFIG_LEDS_TRIGGER_HEARTBEAT=y
528514 CONFIG_LEDS_TRIGGER_CPU=y
529515 CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
530516 CONFIG_LEDS_TRIGGER_PANIC=y
531−CONFIG_LEDS_TRIGGER_DISK=y
532517 CONFIG_EDAC=y
533518 CONFIG_EDAC_GHES=y
534519 CONFIG_RTC_CLASS=y
@@ -537,13 +522,13 @@ CONFIG_RTC_DRV_RK808=m · 2 unmodified lines
537522 CONFIG_RTC_DRV_S5M=y
538523 CONFIG_RTC_DRV_DS3232=y
539524 CONFIG_RTC_DRV_EFI=y
525+CONFIG_RTC_DRV_CROS_EC=y
540526 CONFIG_RTC_DRV_S3C=y
541527 CONFIG_RTC_DRV_PL031=y
542528 CONFIG_RTC_DRV_SUN6I=y
543529 CONFIG_RTC_DRV_ARMADA38X=y
544530 CONFIG_RTC_DRV_TEGRA=y
545531 CONFIG_RTC_DRV_XGENE=y
546−CONFIG_RTC_DRV_CROS_EC=y
547532 CONFIG_DMADEVICES=y
548533 CONFIG_DMA_BCM2835=m
549534 CONFIG_K3_DMA=y
@@ -579,7 +564,6 @@ CONFIG_HWSPINLOCK_QCOM=y · 29 unmodified lines
579564 CONFIG_ARM_MHU=y
580565 CONFIG_PLATFORM_MHU=y
581566 CONFIG_BCM2835_MBOX=y
582−CONFIG_HI6220_MBOX=y
583567 CONFIG_QCOM_APCS_IPC=y
584568 CONFIG_ROCKCHIP_IOMMU=y
585569 CONFIG_TEGRA_IOMMU_SMMU=y
@@ -602,7 +586,6 @@ CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y · 16 unmodified lines
602586 CONFIG_EXTCON_USB_GPIO=y
603587 CONFIG_EXTCON_USBC_CROS_EC=y
604588 CONFIG_MEMORY=y
605−CONFIG_TEGRA_MC=y
606589 CONFIG_IIO=y
607590 CONFIG_EXYNOS_ADC=y
608591 CONFIG_ROCKCHIP_SARADC=m
@@ -618,27 +601,27 @@ CONFIG_PWM_RCAR=m · 9 unmodified lines
618601 CONFIG_PWM_ROCKCHIP=y
619602 CONFIG_PWM_SAMSUNG=y
620603 CONFIG_PWM_TEGRA=m
604+CONFIG_PHY_XGENE=y
605+CONFIG_PHY_SUN4I_USB=y
606+CONFIG_PHY_HI6220_USB=y
621607 CONFIG_PHY_HISTB_COMBPHY=y
622608 CONFIG_PHY_HISI_INNO_USB2=y
623−CONFIG_PHY_RCAR_GEN3_USB2=y
624−CONFIG_PHY_RCAR_GEN3_USB3=m
625−CONFIG_PHY_HI6220_USB=y
626−CONFIG_PHY_QCOM_USB_HS=y
627−CONFIG_PHY_SUN4I_USB=y
628609 CONFIG_PHY_MVEBU_CP110_COMPHY=y
629610 CONFIG_PHY_QCOM_QMP=m
630−CONFIG_PHY_ROCKCHIP_INNO_USB2=y
611+CONFIG_PHY_QCOM_USB_HS=y
612+CONFIG_PHY_RCAR_GEN3_USB2=y
613+CONFIG_PHY_RCAR_GEN3_USB3=m
631614 CONFIG_PHY_ROCKCHIP_EMMC=y
615+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
632616 CONFIG_PHY_ROCKCHIP_PCIE=m
633617 CONFIG_PHY_ROCKCHIP_TYPEC=y
634−CONFIG_PHY_XGENE=y
635618 CONFIG_PHY_TEGRA_XUSB=y
636619 CONFIG_QCOM_L2_PMU=y
637620 CONFIG_QCOM_L3_PMU=y
638−CONFIG_MESON_EFUSE=m
639621 CONFIG_QCOM_QFPROM=y
640622 CONFIG_ROCKCHIP_EFUSE=y
641623 CONFIG_UNIPHIER_EFUSE=y
624+CONFIG_MESON_EFUSE=m
642625 CONFIG_TEE=y
643626 CONFIG_OPTEE=y
644627 CONFIG_ARM_SCPI_PROTOCOL=y
@@ -647,7 +630,6 @@ CONFIG_EFI_CAPSULE_LOADER=y · 2 unmodified lines
647630 CONFIG_ACPI=y
648631 CONFIG_ACPI_APEI=y
649632 CONFIG_ACPI_APEI_GHES=y
650−CONFIG_ACPI_APEI_PCIEAER=y
651633 CONFIG_ACPI_APEI_MEMORY_FAILURE=y
652634 CONFIG_ACPI_APEI_EINJ=y
653635 CONFIG_EXT2_FS=y
@@ -682,7 +664,6 @@ CONFIG_DEBUG_INFO=y · 28 unmodified lines
682664 CONFIG_DEBUG_FS=y
683665 CONFIG_MAGIC_SYSRQ=y
684666 CONFIG_DEBUG_KERNEL=y
685−CONFIG_LOCKUP_DETECTOR=y
686667 # CONFIG_SCHED_DEBUG is not set
687668 # CONFIG_DEBUG_PREEMPT is not set
688669 # CONFIG_FTRACE is not set
@@ -691,20 +672,15 @@ CONFIG_SECURITY=y · 2 unmodified lines
691672 CONFIG_CRYPTO_ECHAINIV=y
692673 CONFIG_CRYPTO_ANSI_CPRNG=y
693674 CONFIG_ARM64_CRYPTO=y
694−CONFIG_CRYPTO_SHA256_ARM64=m
695−CONFIG_CRYPTO_SHA512_ARM64=m
696675 CONFIG_CRYPTO_SHA1_ARM64_CE=y
697676 CONFIG_CRYPTO_SHA2_ARM64_CE=y
677+CONFIG_CRYPTO_SHA512_ARM64_CE=m
678+CONFIG_CRYPTO_SHA3_ARM64=m
679+CONFIG_CRYPTO_SM3_ARM64_CE=m
698680 CONFIG_CRYPTO_GHASH_ARM64_CE=y
699681 CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=m
700682 CONFIG_CRYPTO_CRC32_ARM64_CE=m
701−CONFIG_CRYPTO_AES_ARM64=m
702−CONFIG_CRYPTO_AES_ARM64_CE=m
703683 CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
704684 CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
705−CONFIG_CRYPTO_AES_ARM64_NEON_BLK=m
706685 CONFIG_CRYPTO_CHACHA20_NEON=m
707686 CONFIG_CRYPTO_AES_ARM64_BS=m
708−CONFIG_CRYPTO_SHA512_ARM64_CE=m
709−CONFIG_CRYPTO_SHA3_ARM64=m
710−CONFIG_CRYPTO_SM3_ARM64_CE=m
arch/arm64/crypto/aes-ce-ccm-core.S+55−95
@@ -19,33 +19,24 @@ · 18 unmodified lines
1919 * u32 *macp, u8 const rk[], u32 rounds);
2020 */
2121 ENTRY(ce_aes_ccm_auth_data)
22− frame_push 7
23−
24− mov x19, x0
25− mov x20, x1
26− mov x21, x2
27− mov x22, x3
28− mov x23, x4
29− mov x24, x5
30−
31− ldr w25, [x22] /* leftover from prev round? */
22+ ldr w8, [x3] /* leftover from prev round? */
3223 ld1 {v0.16b}, [x0] /* load mac */
33− cbz w25, 1f
34− sub w25, w25, #16
24+ cbz w8, 1f
25+ sub w8, w8, #16
3526 eor v1.16b, v1.16b, v1.16b
36−0: ldrb w7, [x20], #1 /* get 1 byte of input */
37− subs w21, w21, #1
38− add w25, w25, #1
27+0: ldrb w7, [x1], #1 /* get 1 byte of input */
28+ subs w2, w2, #1
29+ add w8, w8, #1
3930 ins v1.b[0], w7
4031 ext v1.16b, v1.16b, v1.16b, #1 /* rotate in the input bytes */
4132 beq 8f /* out of input? */
42− cbnz w25, 0b
33+ cbnz w8, 0b
4334 eor v0.16b, v0.16b, v1.16b
44−1: ld1 {v3.4s}, [x23] /* load first round key */
45− prfm pldl1strm, [x20]
46− cmp w24, #12 /* which key size? */
47− add x6, x23, #16
48− sub w7, w24, #2 /* modified # of rounds */
35+1: ld1 {v3.4s}, [x4] /* load first round key */
36+ prfm pldl1strm, [x1]
37+ cmp w5, #12 /* which key size? */
38+ add x6, x4, #16
39+ sub w7, w5, #2 /* modified # of rounds */
4940 bmi 2f
5041 bne 5f
5142 mov v5.16b, v3.16b
@@ -64,43 +55,33 @@ ENTRY(ce_aes_ccm_auth_data) · 12 unmodified lines
6455 ld1 {v5.4s}, [x6], #16 /* load next round key */
6556 bpl 3b
6657 aese v0.16b, v4.16b
67− subs w21, w21, #16 /* last data? */
58+ subs w2, w2, #16 /* last data? */
6859 eor v0.16b, v0.16b, v5.16b /* final round */
6960 bmi 6f
70− ld1 {v1.16b}, [x20], #16 /* load next input block */
61+ ld1 {v1.16b}, [x1], #16 /* load next input block */
7162 eor v0.16b, v0.16b, v1.16b /* xor with mac */
72− beq 6f
73−
74− if_will_cond_yield_neon
75− st1 {v0.16b}, [x19] /* store mac */
76− do_cond_yield_neon
77− ld1 {v0.16b}, [x19] /* reload mac */
78− endif_yield_neon
79−
80− b 1b
81−6: st1 {v0.16b}, [x19] /* store mac */
63+ bne 1b
64+6: st1 {v0.16b}, [x0] /* store mac */
8265 beq 10f
83− adds w21, w21, #16
66+ adds w2, w2, #16
8467 beq 10f
85− mov w25, w21
86−7: ldrb w7, [x20], #1
68+ mov w8, w2
69+7: ldrb w7, [x1], #1
8770 umov w6, v0.b[0]
8871 eor w6, w6, w7
89− strb w6, [x19], #1
90− subs w21, w21, #1
72+ strb w6, [x0], #1
73+ subs w2, w2, #1
9174 beq 10f
9275 ext v0.16b, v0.16b, v0.16b, #1 /* rotate out the mac bytes */
9376 b 7b
94−8: mov w7, w25
95− add w25, w25, #16
77+8: mov w7, w8
78+ add w8, w8, #16
9679 9: ext v1.16b, v1.16b, v1.16b, #1
9780 adds w7, w7, #1
9881 bne 9b
9982 eor v0.16b, v0.16b, v1.16b
100− st1 {v0.16b}, [x19]
101−10: str w25, [x22]
102−
103− frame_pop
83+ st1 {v0.16b}, [x0]
84+10: str w8, [x3]
10485 ret
10586 ENDPROC(ce_aes_ccm_auth_data)
10687
@@ -145,29 +126,19 @@ ENTRY(ce_aes_ccm_final) · 38 unmodified lines
145126 ENDPROC(ce_aes_ccm_final)
146127
147128 .macro aes_ccm_do_crypt,enc
148− frame_push 8
149−
150− mov x19, x0
151− mov x20, x1
152− mov x21, x2
153− mov x22, x3
154− mov x23, x4
155− mov x24, x5
156− mov x25, x6
157−
158− ldr x26, [x25, #8] /* load lower ctr */
159− ld1 {v0.16b}, [x24] /* load mac */
160−CPU_LE( rev x26, x26 ) /* keep swabbed ctr in reg */
129+ ldr x8, [x6, #8] /* load lower ctr */
130+ ld1 {v0.16b}, [x5] /* load mac */
131+CPU_LE( rev x8, x8 ) /* keep swabbed ctr in reg */
161132 0: /* outer loop */
162− ld1 {v1.8b}, [x25] /* load upper ctr */
163− prfm pldl1strm, [x20]
164− add x26, x26, #1
165− rev x9, x26
166− cmp w23, #12 /* which key size? */
167− sub w7, w23, #2 /* get modified # of rounds */
133+ ld1 {v1.8b}, [x6] /* load upper ctr */
134+ prfm pldl1strm, [x1]
135+ add x8, x8, #1
136+ rev x9, x8
137+ cmp w4, #12 /* which key size? */
138+ sub w7, w4, #2 /* get modified # of rounds */
168139 ins v1.d[1], x9 /* no carry in lower ctr */
169− ld1 {v3.4s}, [x22] /* load first round key */
170− add x10, x22, #16
140+ ld1 {v3.4s}, [x3] /* load first round key */
141+ add x10, x3, #16
171142 bmi 1f
172143 bne 4f
173144 mov v5.16b, v3.16b
@@ -194,9 +165,9 @@ CPU_LE( rev x26, x26 ) /* keep swabbed ctr in reg */ · 20 unmodified lines
194165 bpl 2b
195166 aese v0.16b, v4.16b
196167 aese v1.16b, v4.16b
197− subs w21, w21, #16
198− bmi 7f /* partial block? */
199− ld1 {v2.16b}, [x20], #16 /* load next input block */
168+ subs w2, w2, #16
169+ bmi 6f /* partial block? */
170+ ld1 {v2.16b}, [x1], #16 /* load next input block */
200171 .if \enc == 1
201172 eor v2.16b, v2.16b, v5.16b /* final round enc+mac */
202173 eor v1.16b, v1.16b, v2.16b /* xor with crypted ctr */
@@ -205,29 +176,18 @@ CPU_LE( rev x26, x26 ) /* keep swabbed ctr in reg */ · 2 unmodified lines
205176 eor v1.16b, v2.16b, v5.16b /* final round enc */
206177 .endif
207178 eor v0.16b, v0.16b, v2.16b /* xor mac with pt ^ rk[last] */
208− st1 {v1.16b}, [x19], #16 /* write output block */
209− beq 5f
210−
211− if_will_cond_yield_neon
212− st1 {v0.16b}, [x24] /* store mac */
213− do_cond_yield_neon
214− ld1 {v0.16b}, [x24] /* reload mac */
215− endif_yield_neon
216−
217− b 0b
218−5:
219−CPU_LE( rev x26, x26 )
220− st1 {v0.16b}, [x24] /* store mac */
221− str x26, [x25, #8] /* store lsb end of ctr (BE) */
222−
223−6: frame_pop
224− ret
225−
226−7: eor v0.16b, v0.16b, v5.16b /* final round mac */
179+ st1 {v1.16b}, [x0], #16 /* write output block */
180+ bne 0b
181+CPU_LE( rev x8, x8 )
182+ st1 {v0.16b}, [x5] /* store mac */
183+ str x8, [x6, #8] /* store lsb end of ctr (BE) */
184+5: ret
185+
186+6: eor v0.16b, v0.16b, v5.16b /* final round mac */
227187 eor v1.16b, v1.16b, v5.16b /* final round enc */
228− st1 {v0.16b}, [x24] /* store mac */
229− add w21, w21, #16 /* process partial tail block */
230−8: ldrb w9, [x20], #1 /* get 1 byte of input */
188+ st1 {v0.16b}, [x5] /* store mac */
189+ add w2, w2, #16 /* process partial tail block */
190+7: ldrb w9, [x1], #1 /* get 1 byte of input */
231191 umov w6, v1.b[0] /* get top crypted ctr byte */
232192 umov w7, v0.b[0] /* get top mac byte */
233193 .if \enc == 1
@@ -237,13 +197,13 @@ CPU_LE( rev x26, x26 ) · 3 unmodified lines
237197 eor w9, w9, w6
238198 eor w7, w7, w9
239199 .endif
240− strb w9, [x19], #1 /* store out byte */
241− strb w7, [x24], #1 /* store mac byte */
242− subs w21, w21, #1
243− beq 6b
200+ strb w9, [x0], #1 /* store out byte */
201+ strb w7, [x5], #1 /* store mac byte */
202+ subs w2, w2, #1
203+ beq 5b
244204 ext v0.16b, v0.16b, v0.16b, #1 /* shift out mac byte */
245205 ext v1.16b, v1.16b, v1.16b, #1 /* shift out ctr byte */
246− b 8b
206+ b 7b
247207 .endm
248208
249209 /*
arch/arm64/crypto/aes-glue.c+1−1
@@ -223,8 +223,8 @@ static int ctr_encrypt(struct skcipher_request *req) · 222 unmodified lines
223223 kernel_neon_begin();
224224 aes_ctr_encrypt(walk.dst.virt.addr, walk.src.virt.addr,
225225 (u8 *)ctx->key_enc, rounds, blocks, walk.iv);
226− err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE);
227226 kernel_neon_end();
227+ err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE);
228228 }
229229 if (walk.nbytes) {
230230 u8 __aligned(8) tail[AES_BLOCK_SIZE];
arch/arm64/crypto/ghash-ce-core.S+25−51
@@ -322,55 +322,41 @@ ENDPROC(pmull_ghash_update_p8) · 321 unmodified lines
322322 .endm
323323
324324 .macro pmull_gcm_do_crypt, enc
325− frame_push 10
325+ ld1 {SHASH.2d}, [x4]
326+ ld1 {XL.2d}, [x1]
327+ ldr x8, [x5, #8] // load lower counter
326328
327− mov x19, x0
328− mov x20, x1
329− mov x21, x2
330− mov x22, x3
331− mov x23, x4
332− mov x24, x5
333− mov x25, x6
334− mov x26, x7
335− .if \enc == 1
336− ldr x27, [sp, #96] // first stacked arg
337− .endif
338−
339− ldr x28, [x24, #8] // load lower counter
340−CPU_LE( rev x28, x28 )
341−
342−0: mov x0, x25
343− load_round_keys w26, x0
344− ld1 {SHASH.2d}, [x23]
345− ld1 {XL.2d}, [x20]
329+ load_round_keys w7, x6
346330
347331 movi MASK.16b, #0xe1
348332 ext SHASH2.16b, SHASH.16b, SHASH.16b, #8
333+CPU_LE( rev x8, x8 )
349334 shl MASK.2d, MASK.2d, #57
350335 eor SHASH2.16b, SHASH2.16b, SHASH.16b
351336
352337 .if \enc == 1
353− ld1 {KS.16b}, [x27]
338+ ldr x10, [sp]
339+ ld1 {KS.16b}, [x10]
354340 .endif
355341
356−1: ld1 {CTR.8b}, [x24] // load upper counter
357− ld1 {INP.16b}, [x22], #16
358− rev x9, x28
359− add x28, x28, #1
360− sub w19, w19, #1
342+0: ld1 {CTR.8b}, [x5] // load upper counter
343+ ld1 {INP.16b}, [x3], #16
344+ rev x9, x8
345+ add x8, x8, #1
346+ sub w0, w0, #1
361347 ins CTR.d[1], x9 // set lower counter
362348
363349 .if \enc == 1
364350 eor INP.16b, INP.16b, KS.16b // encrypt input
365− st1 {INP.16b}, [x21], #16
351+ st1 {INP.16b}, [x2], #16
366352 .endif
367353
368354 rev64 T1.16b, INP.16b
369355
370− cmp w26, #12
371− b.ge 4f // AES-192/256?
356+ cmp w7, #12
357+ b.ge 2f // AES-192/256?
372358
373−2: enc_round CTR, v21
359+1: enc_round CTR, v21
374360
375361 ext T2.16b, XL.16b, XL.16b, #8
376362 ext IN1.16b, T1.16b, T1.16b, #8
@@ -425,39 +411,27 @@ CPU_LE( rev x28, x28 ) · 48 unmodified lines
425411
426412 .if \enc == 0
427413 eor INP.16b, INP.16b, KS.16b
428− st1 {INP.16b}, [x21], #16
414+ st1 {INP.16b}, [x2], #16
429415 .endif
430416
431− cbz w19, 3f
417+ cbnz w0, 0b
432418
433− if_will_cond_yield_neon
434− st1 {XL.2d}, [x20]
435− .if \enc == 1
436− st1 {KS.16b}, [x27]
437− .endif
438− do_cond_yield_neon
439− b 0b
440− endif_yield_neon
419+CPU_LE( rev x8, x8 )
420+ st1 {XL.2d}, [x1]
421+ str x8, [x5, #8] // store lower counter
441422
442− b 1b
443−
444−3: st1 {XL.2d}, [x20]
445423 .if \enc == 1
446− st1 {KS.16b}, [x27]
424+ st1 {KS.16b}, [x10]
447425 .endif
448426
449−CPU_LE( rev x28, x28 )
450− str x28, [x24, #8] // store lower counter
451−
452− frame_pop
453427 ret
454428
455−4: b.eq 5f // AES-192?
429+2: b.eq 3f // AES-192?
456430 enc_round CTR, v17
457431 enc_round CTR, v18
458−5: enc_round CTR, v19
432+3: enc_round CTR, v19
459433 enc_round CTR, v20
460− b 2b
434+ b 1b
461435 .endm
462436
463437 /*
arch/arm64/crypto/ghash-ce-glue.c+6−2
@@ -488,9 +488,13 @@ static int gcm_decrypt(struct aead_request *req) · 487 unmodified lines
488488 err = skcipher_walk_done(&walk,
489489 walk.nbytes % AES_BLOCK_SIZE);
490490 }
491− if (walk.nbytes)
492− pmull_gcm_encrypt_block(iv, iv, NULL,
491+ if (walk.nbytes) {
492+ kernel_neon_begin();
493+ pmull_gcm_encrypt_block(iv, iv, ctx->aes_key.key_enc,
493494 num_rounds(&ctx->aes_key));
495+ kernel_neon_end();
496+ }
497+
494498 } else {
495499 __aes_arm64_encrypt(ctx->aes_key.key_enc, tag, iv,
496500 num_rounds(&ctx->aes_key));
arch/arm64/include/asm/alternative.h+6−1
@@ -28,7 +28,12 @@ typedef void (*alternative_cb_t)(struct alt_instr *alt, · 27 unmodified lines
2828 __le32 *origptr, __le32 *updptr, int nr_inst);
2929
3030 void __init apply_alternatives_all(void);
31−void apply_alternatives(void *start, size_t length);
31+
32+#ifdef CONFIG_MODULES
33+void apply_alternatives_module(void *start, size_t length);
34+#else
35+static inline void apply_alternatives_module(void *start, size_t length) { }
36+#endif
3237
3338 #define ALTINSTR_ENTRY(feature,cb) \
3439 " .word 661b - .\n" /* label */ \
arch/arm64/include/asm/kvm_host.h+1−0
@@ -306,6 +306,7 @@ struct kvm_vcpu_arch { · 305 unmodified lines
306306 #define KVM_ARM64_FP_ENABLED (1 << 1) /* guest FP regs loaded */
307307 #define KVM_ARM64_FP_HOST (1 << 2) /* host FP regs loaded */
308308 #define KVM_ARM64_HOST_SVE_IN_USE (1 << 3) /* backup for host TIF_SVE */
309+#define KVM_ARM64_HOST_SVE_ENABLED (1 << 4) /* SVE enabled for EL0 */
309310
310311 #define vcpu_gp_regs(v) (&(v)->arch.ctxt.gp_regs)
311312
arch/arm64/include/asm/pgtable.h+1−5
@@ -224,10 +224,8 @@ static inline void set_pte(pte_t *ptep, pte_t pte) · 223 unmodified lines
224224 * Only if the new pte is valid and kernel, otherwise TLB maintenance
225225 * or update_mmu_cache() have the necessary barriers.
226226 */
227− if (pte_valid_not_user(pte)) {
227+ if (pte_valid_not_user(pte))
228228 dsb(ishst);
229− isb();
230− }
231229 }
232230
233231 extern void __sync_icache_dcache(pte_t pteval);
@@ -434,7 +432,6 @@ static inline void set_pmd(pmd_t *pmdp, pmd_t pmd) · 200 unmodified lines
434432 {
435433 WRITE_ONCE(*pmdp, pmd);
436434 dsb(ishst);
437− isb();
438435 }
439436
440437 static inline void pmd_clear(pmd_t *pmdp)
@@ -485,7 +482,6 @@ static inline void set_pud(pud_t *pudp, pud_t pud) · 44 unmodified lines
485482 {
486483 WRITE_ONCE(*pudp, pud);
487484 dsb(ishst);
488− isb();
489485 }
490486
491487 static inline void pud_clear(pud_t *pudp)
arch/arm64/include/asm/simd.h+7−12
@@ -29,20 +29,15 @@ DECLARE_PER_CPU(bool, kernel_neon_busy); · 28 unmodified lines
2929 static __must_check inline bool may_use_simd(void)
3030 {
3131 /*
32− * The raw_cpu_read() is racy if called with preemption enabled.
33− * This is not a bug: kernel_neon_busy is only set when
34− * preemption is disabled, so we cannot migrate to another CPU
35− * while it is set, nor can we migrate to a CPU where it is set.
36− * So, if we find it clear on some CPU then we're guaranteed to
37− * find it clear on any CPU we could migrate to.
38− *
39− * If we are in between kernel_neon_begin()...kernel_neon_end(),
40− * the flag will be set, but preemption is also disabled, so we
41− * can't migrate to another CPU and spuriously see it become
42− * false.
32+ * kernel_neon_busy is only set while preemption is disabled,
33+ * and is clear whenever preemption is enabled. Since
34+ * this_cpu_read() is atomic w.r.t. preemption, kernel_neon_busy
35+ * cannot change under our feet -- if it's set we cannot be
36+ * migrated, and if it's clear we cannot be migrated to a CPU
37+ * where it is set.
4338 */
4439 return !in_irq() && !irqs_disabled() && !in_nmi() &&
45− !raw_cpu_read(kernel_neon_busy);
40+ !this_cpu_read(kernel_neon_busy);
4641 }
4742
4843 #else /* ! CONFIG_KERNEL_MODE_NEON */
arch/arm64/include/asm/sysreg.h+11−0
@@ -728,6 +728,17 @@ asm( · 727 unmodified lines
728728 asm volatile("msr_s " __stringify(r) ", %x0" : : "rZ" (__val)); \
729729 } while (0)
730730
731+/*
732+ * Modify bits in a sysreg. Bits in the clear mask are zeroed, then bits in the
733+ * set mask are set. Other bits are left as-is.
734+ */
735+#define sysreg_clear_set(sysreg, clear, set) do { \
736+ u64 __scs_val = read_sysreg(sysreg); \
737+ u64 __scs_new = (__scs_val & ~(u64)(clear)) | (set); \
738+ if (__scs_new != __scs_val) \
739+ write_sysreg(__scs_new, sysreg); \
740+} while (0)
741+
731742 static inline void config_sctlr_el1(u32 clear, u32 set)
732743 {
733744 u32 val;
arch/arm64/include/asm/tlb.h+1−1
@@ -37,7 +37,7 @@ static inline void __tlb_remove_table(void *_table) · 36 unmodified lines
3737
3838 static inline void tlb_flush(struct mmu_gather *tlb)
3939 {
40− struct vm_area_struct vma = { .vm_mm = tlb->mm, };
40+ struct vm_area_struct vma = TLB_FLUSH_VMA(tlb->mm, 0);
4141
4242 /*
4343 * The ASID allocator will either invalidate the ASID or mark
arch/arm64/kernel/alternative.c+44−7
@@ -122,7 +122,30 @@ static void patch_alternative(struct alt_instr *alt, · 121 unmodified lines
122122 }
123123 }
124124
125−static void __apply_alternatives(void *alt_region, bool use_linear_alias)
125+/*
126+ * We provide our own, private D-cache cleaning function so that we don't
127+ * accidentally call into the cache.S code, which is patched by us at
128+ * runtime.
129+ */
130+static void clean_dcache_range_nopatch(u64 start, u64 end)
131+{
132+ u64 cur, d_size, ctr_el0;
133+
134+ ctr_el0 = read_sanitised_ftr_reg(SYS_CTR_EL0);
135+ d_size = 4 << cpuid_feature_extract_unsigned_field(ctr_el0,
136+ CTR_DMINLINE_SHIFT);
137+ cur = start & ~(d_size - 1);
138+ do {
139+ /*
140+ * We must clean+invalidate to the PoC in order to avoid
141+ * Cortex-A53 errata 826319, 827319, 824069 and 819472
142+ * (this corresponds to ARM64_WORKAROUND_CLEAN_CACHE)
143+ */
144+ asm volatile("dc civac, %0" : : "r" (cur) : "memory");
145+ } while (cur += d_size, cur < end);
146+}
147+
148+static void __apply_alternatives(void *alt_region, bool is_module)
126149 {
127150 struct alt_instr *alt;
128151 struct alt_region *region = alt_region;
@@ -145,7 +168,7 @@ static void __apply_alternatives(void *alt_region, bool use_linear_alias) · 16 unmodified lines
145168 pr_info_once("patching kernel code\n");
146169
147170 origptr = ALT_ORIG_PTR(alt);
148− updptr = use_linear_alias ? lm_alias(origptr) : origptr;
171+ updptr = is_module ? origptr : lm_alias(origptr);
149172 nr_inst = alt->orig_len / AARCH64_INSN_SIZE;
150173
151174 if (alt->cpufeature < ARM64_CB_PATCH)
@@ -155,8 +178,20 @@ static void __apply_alternatives(void *alt_region, bool use_linear_alias) · 3 unmodified lines
155178
156179 alt_cb(alt, origptr, updptr, nr_inst);
157180
158− flush_icache_range((uintptr_t)origptr,
159− (uintptr_t)(origptr + nr_inst));
181+ if (!is_module) {
182+ clean_dcache_range_nopatch((u64)origptr,
183+ (u64)(origptr + nr_inst));
184+ }
185+ }
186+
187+ /*
188+ * The core module code takes care of cache maintenance in
189+ * flush_module_icache().
190+ */
191+ if (!is_module) {
192+ dsb(ish);
193+ __flush_icache_all();
194+ isb();
160195 }
161196 }
162197
@@ -178,7 +213,7 @@ static int __apply_alternatives_multi_stop(void *unused) · 15 unmodified lines
178213 isb();
179214 } else {
180215 BUG_ON(alternatives_applied);
181− __apply_alternatives(&region, true);
216+ __apply_alternatives(&region, false);
182217 /* Barriers provided by the cache flushing */
183218 WRITE_ONCE(alternatives_applied, 1);
184219 }
@@ -192,12 +227,14 @@ void __init apply_alternatives_all(void) · 7 unmodified lines
192227 stop_machine(__apply_alternatives_multi_stop, NULL, cpu_online_mask);
193228 }
194229
195−void apply_alternatives(void *start, size_t length)
230+#ifdef CONFIG_MODULES
231+void apply_alternatives_module(void *start, size_t length)
196232 {
197233 struct alt_region region = {
198234 .begin = start,
199235 .end = start + length,
200236 };
201237
202− __apply_alternatives(&region, false);
238+ __apply_alternatives(&region, true);
203239 }
240+#endif
arch/arm64/kernel/cpufeature.c+3−3
@@ -937,7 +937,7 @@ static int __init parse_kpti(char *str) · 936 unmodified lines
937937 __kpti_forced = enabled ? 1 : -1;
938938 return 0;
939939 }
940−__setup("kpti=", parse_kpti);
940+early_param("kpti", parse_kpti);
941941 #endif /* CONFIG_UNMAP_KERNEL_AT_EL0 */
942942
943943 #ifdef CONFIG_ARM64_HW_AFDBM
@@ -1351,9 +1351,9 @@ static void __update_cpu_capabilities(const struct arm64_cpu_capabilities *caps, · 407 unmodified lines
13511351
13521352 static void update_cpu_capabilities(u16 scope_mask)
13531353 {
1354− __update_cpu_capabilities(arm64_features, scope_mask, "detected:");
13551354 __update_cpu_capabilities(arm64_errata, scope_mask,
13561355 "enabling workaround for");
1356+ __update_cpu_capabilities(arm64_features, scope_mask, "detected:");
13571357 }
13581358
13591359 static int __enable_cpu_capability(void *arg)
@@ -1408,8 +1408,8 @@ __enable_cpu_capabilities(const struct arm64_cpu_capabilities *caps, · 48 unmodified lines
14081408
14091409 static void __init enable_cpu_capabilities(u16 scope_mask)
14101410 {
1411− __enable_cpu_capabilities(arm64_features, scope_mask);
14121411 __enable_cpu_capabilities(arm64_errata, scope_mask);
1412+ __enable_cpu_capabilities(arm64_features, scope_mask);
14131413 }
14141414
14151415 /*
arch/arm64/kernel/module.c+2−3
@@ -448,9 +448,8 @@ int module_finalize(const Elf_Ehdr *hdr, · 447 unmodified lines
448448 const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
449449
450450 for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++) {
451− if (strcmp(".altinstructions", secstrs + s->sh_name) == 0) {
452− apply_alternatives((void *)s->sh_addr, s->sh_size);
453− }
451+ if (strcmp(".altinstructions", secstrs + s->sh_name) == 0)
452+ apply_alternatives_module((void *)s->sh_addr, s->sh_size);
454453 #ifdef CONFIG_ARM64_MODULE_PLTS
455454 if (IS_ENABLED(CONFIG_DYNAMIC_FTRACE) &&
456455 !strcmp(".text.ftrace_trampoline", secstrs + s->sh_name))
arch/arm64/kernel/smp.c+1−1
@@ -179,7 +179,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle) · 178 unmodified lines
179179 * This is the secondary CPU boot entry. We're using this CPUs
180180 * idle thread stack, but a set of temporary page tables.
181181 */
182−asmlinkage void secondary_start_kernel(void)
182+asmlinkage notrace void secondary_start_kernel(void)
183183 {
184184 u64 mpidr = read_cpuid_mpidr() & MPIDR_HWID_BITMASK;
185185 struct mm_struct *mm = &init_mm;
arch/arm64/kvm/fpsimd.c+27−9
@@ -5,13 +5,14 @@ · 4 unmodified lines
55 * Copyright 2018 Arm Limited
66 * Author: Dave Martin <Dave.Martin@arm.com>
77 */
8−#include <linux/bottom_half.h>
8+#include <linux/irqflags.h>
99 #include <linux/sched.h>
1010 #include <linux/thread_info.h>
1111 #include <linux/kvm_host.h>
1212 #include <asm/kvm_asm.h>
1313 #include <asm/kvm_host.h>
1414 #include <asm/kvm_mmu.h>
15+#include <asm/sysreg.h>
1516
1617 /*
1718 * Called on entry to KVM_RUN unless this vcpu previously ran at least
@@ -61,10 +62,16 @@ void kvm_arch_vcpu_load_fp(struct kvm_vcpu *vcpu) · 43 unmodified lines
6162 {
6263 BUG_ON(!current->mm);
6364
64− vcpu->arch.flags &= ~(KVM_ARM64_FP_ENABLED | KVM_ARM64_HOST_SVE_IN_USE);
65+ vcpu->arch.flags &= ~(KVM_ARM64_FP_ENABLED |
66+ KVM_ARM64_HOST_SVE_IN_USE |
67+ KVM_ARM64_HOST_SVE_ENABLED);
6568 vcpu->arch.flags |= KVM_ARM64_FP_HOST;
69+
6670 if (test_thread_flag(TIF_SVE))
6771 vcpu->arch.flags |= KVM_ARM64_HOST_SVE_IN_USE;
72+
73+ if (read_sysreg(cpacr_el1) & CPACR_EL1_ZEN_EL0EN)
74+ vcpu->arch.flags |= KVM_ARM64_HOST_SVE_ENABLED;
6875 }
6976
7077 /*
@@ -92,19 +99,30 @@ void kvm_arch_vcpu_ctxsync_fp(struct kvm_vcpu *vcpu) · 21 unmodified lines
9299 */
93100 void kvm_arch_vcpu_put_fp(struct kvm_vcpu *vcpu)
94101 {
95− local_bh_disable();
102+ unsigned long flags;
96103
97− update_thread_flag(TIF_SVE,
98− vcpu->arch.flags & KVM_ARM64_HOST_SVE_IN_USE);
104+ local_irq_save(flags);
99105
100106 if (vcpu->arch.flags & KVM_ARM64_FP_ENABLED) {
101107 /* Clean guest FP state to memory and invalidate cpu view */
102108 fpsimd_save();
103109 fpsimd_flush_cpu_state();
104− } else if (!test_thread_flag(TIF_FOREIGN_FPSTATE)) {
105− /* Ensure user trap controls are correctly restored */
106− fpsimd_bind_task_to_cpu();
110+ } else if (system_supports_sve()) {
111+ /*
112+ * The FPSIMD/SVE state in the CPU has not been touched, and we
113+ * have SVE (and VHE): CPACR_EL1 (alias CPTR_EL2) has been
114+ * reset to CPACR_EL1_DEFAULT by the Hyp code, disabling SVE
115+ * for EL0. To avoid spurious traps, restore the trap state
116+ * seen by kvm_arch_vcpu_load_fp():
117+ */
118+ if (vcpu->arch.flags & KVM_ARM64_HOST_SVE_ENABLED)
119+ sysreg_clear_set(CPACR_EL1, 0, CPACR_EL1_ZEN_EL0EN);
120+ else
121+ sysreg_clear_set(CPACR_EL1, CPACR_EL1_ZEN_EL0EN, 0);
107122 }
108123
109− local_bh_enable();
124+ update_thread_flag(TIF_SVE,
125+ vcpu->arch.flags & KVM_ARM64_HOST_SVE_IN_USE);
126+
127+ local_irq_restore(flags);
110128 }
arch/arm64/mm/dma-mapping.c+5−4
@@ -583,13 +583,14 @@ static void *__iommu_alloc_attrs(struct device *dev, size_t size, · 582 unmodified lines
583583 size >> PAGE_SHIFT);
584584 return NULL;
585585 }
586− if (!coherent)
587− __dma_flush_area(page_to_virt(page), iosize);
588−
589586 addr = dma_common_contiguous_remap(page, size, VM_USERMAP,
590587 prot,
591588 __builtin_return_address(0));
592− if (!addr) {
589+ if (addr) {
590+ memset(addr, 0, size);
591+ if (!coherent)
592+ __dma_flush_area(page_to_virt(page), iosize);
593+ } else {
593594 iommu_dma_unmap_page(dev, *handle, iosize, 0, attrs);
594595 dma_release_from_contiguous(dev, page,
595596 size >> PAGE_SHIFT);
arch/arm64/mm/hugetlbpage.c+4−3
@@ -108,7 +108,6 @@ static pte_t get_clear_flush(struct mm_struct *mm, · 107 unmodified lines
108108 unsigned long pgsize,
109109 unsigned long ncontig)
110110 {
111− struct vm_area_struct vma = { .vm_mm = mm };
112111 pte_t orig_pte = huge_ptep_get(ptep);
113112 bool valid = pte_valid(orig_pte);
114113 unsigned long i, saddr = addr;
@@ -125,8 +124,10 @@ static pte_t get_clear_flush(struct mm_struct *mm, · 10 unmodified lines
125124 orig_pte = pte_mkdirty(orig_pte);
126125 }
127126
128− if (valid)
127+ if (valid) {
128+ struct vm_area_struct vma = TLB_FLUSH_VMA(mm, 0);
129129 flush_tlb_range(&vma, saddr, addr);
130+ }
130131 return orig_pte;
131132 }
132133
@@ -145,7 +146,7 @@ static void clear_flush(struct mm_struct *mm, · 12 unmodified lines
145146 unsigned long pgsize,
146147 unsigned long ncontig)
147148 {
148− struct vm_area_struct vma = { .vm_mm = mm };
149+ struct vm_area_struct vma = TLB_FLUSH_VMA(mm, 0);
149150 unsigned long i, saddr = addr;
150151
151152 for (i = 0; i < ncontig; i++, addr += pgsize, ptep++)
arch/arm64/mm/init.c+3−1
@@ -611,11 +611,13 @@ void __init mem_init(void) · 610 unmodified lines
611611 BUILD_BUG_ON(TASK_SIZE_32 > TASK_SIZE_64);
612612 #endif
613613
614+#ifdef CONFIG_SPARSEMEM_VMEMMAP
614615 /*
615616 * Make sure we chose the upper bound of sizeof(struct page)
616− * correctly.
617+ * correctly when sizing the VMEMMAP array.
617618 */
618619 BUILD_BUG_ON(sizeof(struct page) > (1 << STRUCT_PAGE_MAX_SHIFT));
620+#endif
619621
620622 if (PAGE_SIZE >= 16384 && get_num_physpages() <= 128) {
621623 extern int sysctl_overcommit_memory;
arch/arm64/mm/proc.S+3−2
@@ -217,8 +217,9 @@ ENDPROC(idmap_cpu_replace_ttbr1) · 216 unmodified lines
217217
218218 .macro __idmap_kpti_put_pgtable_ent_ng, type
219219 orr \type, \type, #PTE_NG // Same bit for blocks and pages
220− str \type, [cur_\()\type\()p] // Update the entry and ensure it
221− dc civac, cur_\()\type\()p // is visible to all CPUs.
220+ str \type, [cur_\()\type\()p] // Update the entry and ensure
221+ dmb sy // that it is visible to all
222+ dc civac, cur_\()\type\()p // CPUs.
222223 .endm
223224
224225 /*
arch/ia64/include/asm/tlb.h+3−4
@@ -115,12 +115,11 @@ ia64_tlb_flush_mmu_tlbonly(struct mmu_gather *tlb, unsigned long start, unsigned · 114 unmodified lines
115115 flush_tlb_all();
116116 } else {
117117 /*
118− * XXX fix me: flush_tlb_range() should take an mm pointer instead of a
119− * vma pointer.
118+ * flush_tlb_range() takes a vma instead of a mm pointer because
119+ * some architectures want the vm_flags for ITLB/DTLB flush.
120120 */
121− struct vm_area_struct vma;
121+ struct vm_area_struct vma = TLB_FLUSH_VMA(tlb->mm, 0);
122122
123− vma.vm_mm = tlb->mm;
124123 /* flush the address range from the tlb: */
125124 flush_tlb_range(&vma, start, end);
126125 /* now flush the virt. page-table area mapping the address range: */
arch/ia64/kernel/perfmon.c+2−4
@@ -2278,17 +2278,15 @@ pfm_smpl_buffer_alloc(struct task_struct *task, struct file *filp, pfm_context_t · 2277 unmodified lines
22782278 DPRINT(("smpl_buf @%p\n", smpl_buf));
22792279
22802280 /* allocate vma */
2281− vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
2281+ vma = vm_area_alloc(mm);
22822282 if (!vma) {
22832283 DPRINT(("Cannot allocate vma\n"));
22842284 goto error_kmem;
22852285 }
2286− INIT_LIST_HEAD(&vma->anon_vma_chain);
22872286
22882287 /*
22892288 * partially initialize the vma for the sampling buffer
22902289 */
2291− vma->vm_mm = mm;
22922290 vma->vm_file = get_file(filp);
22932291 vma->vm_flags = VM_READ|VM_MAYREAD|VM_DONTEXPAND|VM_DONTDUMP;
22942292 vma->vm_page_prot = PAGE_READONLY; /* XXX may need to change */
@@ -2346,7 +2344,7 @@ pfm_smpl_buffer_alloc(struct task_struct *task, struct file *filp, pfm_context_t · 51 unmodified lines
23462344 return 0;
23472345
23482346 error:
2349− kmem_cache_free(vm_area_cachep, vma);
2347+ vm_area_free(vma);
23502348 error_kmem:
23512349 pfm_rvfree(smpl_buf, size);
23522350
arch/ia64/mm/init.c+7−9
@@ -114,10 +114,9 @@ ia64_init_addr_space (void) · 113 unmodified lines
114114 * the problem. When the process attempts to write to the register backing store
115115 * for the first time, it will get a SEGFAULT in this case.
116116 */
117− vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
117+ vma = vm_area_alloc(current->mm);
118118 if (vma) {
119− INIT_LIST_HEAD(&vma->anon_vma_chain);
120− vma->vm_mm = current->mm;
119+ vma_set_anonymous(vma);
121120 vma->vm_start = current->thread.rbs_bot & PAGE_MASK;
122121 vma->vm_end = vma->vm_start + PAGE_SIZE;
123122 vma->vm_flags = VM_DATA_DEFAULT_FLAGS|VM_GROWSUP|VM_ACCOUNT;
@@ -125,7 +124,7 @@ ia64_init_addr_space (void) · 1 unmodified line
125124 down_write(&current->mm->mmap_sem);
126125 if (insert_vm_struct(current->mm, vma)) {
127126 up_write(&current->mm->mmap_sem);
128− kmem_cache_free(vm_area_cachep, vma);
127+ vm_area_free(vma);
129128 return;
130129 }
131130 up_write(&current->mm->mmap_sem);
@@ -133,10 +132,9 @@ ia64_init_addr_space (void) · 1 unmodified line
133132
134133 /* map NaT-page at address zero to speed up speculative dereferencing of NULL: */
135134 if (!(current->personality & MMAP_PAGE_ZERO)) {
136− vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
135+ vma = vm_area_alloc(current->mm);
137136 if (vma) {
138− INIT_LIST_HEAD(&vma->anon_vma_chain);
139− vma->vm_mm = current->mm;
137+ vma_set_anonymous(vma);
140138 vma->vm_end = PAGE_SIZE;
141139 vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT);
142140 vma->vm_flags = VM_READ | VM_MAYREAD | VM_IO |
@@ -144,7 +142,7 @@ ia64_init_addr_space (void) · 1 unmodified line
144142 down_write(&current->mm->mmap_sem);
145143 if (insert_vm_struct(current->mm, vma)) {
146144 up_write(&current->mm->mmap_sem);
147− kmem_cache_free(vm_area_cachep, vma);
145+ vm_area_free(vma);
148146 return;
149147 }
150148 up_write(&current->mm->mmap_sem);
@@ -277,7 +275,7 @@ static struct vm_area_struct gate_vma; · 126 unmodified lines
277275
278276 static int __init gate_vma_init(void)
279277 {
280− gate_vma.vm_mm = NULL;
278+ vma_init(&gate_vma, NULL);
281279 gate_vma.vm_start = FIXADDR_USER_START;
282280 gate_vma.vm_end = FIXADDR_USER_END;
283281 gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC;
arch/m68k/include/asm/mcf_pgalloc.h+3−1
@@ -44,6 +44,7 @@ extern inline pmd_t *pmd_alloc_kernel(pgd_t *pgd, unsigned long address) · 43 unmodified lines
4444 static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t page,
4545 unsigned long address)
4646 {
47+ pgtable_page_dtor(page);
4748 __free_page(page);
4849 }
4950
@@ -74,8 +75,9 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, · 24 unmodified lines
7475 return page;
7576 }
7677
77−extern inline void pte_free(struct mm_struct *mm, struct page *page)
78+static inline void pte_free(struct mm_struct *mm, struct page *page)
7879 {
80+ pgtable_page_dtor(page);
7981 __free_page(page);
8082 }
8183
arch/microblaze/Kconfig.debug+0−7
@@ -8,11 +8,4 @@ config TRACE_IRQFLAGS_SUPPORT · 7 unmodified lines
88
99 source "lib/Kconfig.debug"
1010
11−config HEART_BEAT
12− bool "Heart beat function for kernel"
13− default n
14− help
15− This option turns on/off heart beat kernel functionality.
16− First GPIO node is taken.
17−
1811 endmenu
arch/microblaze/include/asm/setup.h+0−5
@@ -19,15 +19,10 @@ extern char cmd_line[COMMAND_LINE_SIZE]; · 18 unmodified lines
1919
2020 extern char *klimit;
2121
22−void microblaze_heartbeat(void);
23−void microblaze_setup_heartbeat(void);
24−
2522 # ifdef CONFIG_MMU
2623 extern void mmu_reset(void);
2724 # endif /* CONFIG_MMU */
2825
29−extern void of_platform_reset_gpio_probe(void);
30−
3126 void time_init(void);
3227 void init_IRQ(void);
3328 void machine_early_init(const char *cmdline, unsigned int ram,
arch/microblaze/include/asm/unistd.h+1−1
@@ -38,6 +38,6 @@ · 37 unmodified lines
3838
3939 #endif /* __ASSEMBLY__ */
4040
41−#define __NR_syscalls 399
41+#define __NR_syscalls 401
4242
4343 #endif /* _ASM_MICROBLAZE_UNISTD_H */
arch/microblaze/include/uapi/asm/unistd.h+2−0
@@ -415,5 +415,7 @@ · 414 unmodified lines
415415 #define __NR_pkey_alloc 396
416416 #define __NR_pkey_free 397
417417 #define __NR_statx 398
418+#define __NR_io_pgetevents 399
419+#define __NR_rseq 400
418420
419421 #endif /* _UAPI_ASM_MICROBLAZE_UNISTD_H */
arch/microblaze/kernel/Makefile+1−3
@@ -8,7 +8,6 @@ ifdef CONFIG_FUNCTION_TRACER · 7 unmodified lines
88 CFLAGS_REMOVE_timer.o = -pg
99 CFLAGS_REMOVE_intc.o = -pg
1010 CFLAGS_REMOVE_early_printk.o = -pg
11−CFLAGS_REMOVE_heartbeat.o = -pg
1211 CFLAGS_REMOVE_ftrace.o = -pg
1312 CFLAGS_REMOVE_process.o = -pg
1413 endif
@@ -17,12 +16,11 @@ extra-y := head.o vmlinux.lds · 2 unmodified lines
1716
1817 obj-y += dma.o exceptions.o \
1918 hw_exception_handler.o irq.o \
20− platform.o process.o prom.o ptrace.o \
19+ process.o prom.o ptrace.o \
2120 reset.o setup.o signal.o sys_microblaze.o timer.o traps.o unwind.o
2221
2322 obj-y += cpu/
2423
25−obj-$(CONFIG_HEART_BEAT) += heartbeat.o
2624 obj-$(CONFIG_MODULES) += microblaze_ksyms.o module.o
2725 obj-$(CONFIG_MMU) += misc.o
2826 obj-$(CONFIG_STACKTRACE) += stacktrace.o
arch/microblaze/kernel/heartbeat.c+0−72
@@ -1,72 +0,0 @@
1−/*
2− * Copyright (C) 2007-2009 Michal Simek <monstr@monstr.eu>
3− * Copyright (C) 2007-2009 PetaLogix
4− * Copyright (C) 2006 Atmark Techno, Inc.
5− *
6− * This file is subject to the terms and conditions of the GNU General Public
7− * License. See the file "COPYING" in the main directory of this archive
8− * for more details.
9− */
10−
11−#include <linux/sched.h>
12−#include <linux/sched/loadavg.h>
13−#include <linux/io.h>
14−
15−#include <asm/setup.h>
16−#include <asm/page.h>
17−#include <asm/prom.h>
18−
19−static unsigned int base_addr;
20−
21−void microblaze_heartbeat(void)
22−{
23− static unsigned int cnt, period, dist;
24−
25− if (base_addr) {
26− if (cnt == 0 || cnt == dist)
27− out_be32(base_addr, 1);
28− else if (cnt == 7 || cnt == dist + 7)
29− out_be32(base_addr, 0);
30−
31− if (++cnt > period) {
32− cnt = 0;
33− /*
34− * The hyperbolic function below modifies the heartbeat
35− * period length in dependency of the current (5min)
36− * load. It goes through the points f(0)=126, f(1)=86,
37− * f(5)=51, f(inf)->30.
38− */
39− period = ((672 << FSHIFT) / (5 * avenrun[0] +
40− (7 << FSHIFT))) + 30;
41− dist = period / 4;
42− }
43− }
44−}
45−
46−void microblaze_setup_heartbeat(void)
47−{
48− struct device_node *gpio = NULL;
49− int *prop;
50− int j;
51− const char * const gpio_list[] = {
52− "xlnx,xps-gpio-1.00.a",
53− NULL
54− };
55−
56− for (j = 0; gpio_list[j] != NULL; j++) {
57− gpio = of_find_compatible_node(NULL, NULL, gpio_list[j]);
58− if (gpio)
59− break;
60− }
61−
62− if (gpio) {
63− base_addr = be32_to_cpup(of_get_property(gpio, "reg", NULL));
64− base_addr = (unsigned long) ioremap(base_addr, PAGE_SIZE);
65− pr_notice("Heartbeat GPIO at 0x%x\n", base_addr);
66−
67− /* GPIO is configured as output */
68− prop = (int *) of_get_property(gpio, "xlnx,is-bidir", NULL);
69− if (prop)
70− out_be32(base_addr + 4, 0);
71− }
72−}
arch/microblaze/kernel/platform.c+0−29
@@ -1,29 +0,0 @@
1−/*
2− * Copyright 2008 Michal Simek <monstr@monstr.eu>
3− *
4− * based on virtex.c file
5− *
6− * Copyright 2007 Secret Lab Technologies Ltd.
7− *
8− * This file is licensed under the terms of the GNU General Public License
9− * version 2. This program is licensed "as is" without any warranty of any
10− * kind, whether express or implied.
11− */
12−
13−#include <linux/init.h>
14−#include <linux/of_platform.h>
15−#include <asm/setup.h>
16−
17−static struct of_device_id xilinx_of_bus_ids[] __initdata = {
18− { .compatible = "simple-bus", },
19− { .compatible = "xlnx,compound", },
20− {}
21−};
22−
23−static int __init microblaze_device_probe(void)
24−{
25− of_platform_bus_probe(NULL, xilinx_of_bus_ids, NULL);
26− of_platform_reset_gpio_probe();
27− return 0;
28−}
29−device_initcall(microblaze_device_probe);
arch/microblaze/kernel/reset.c+6−5
@@ -18,7 +18,7 @@ · 17 unmodified lines
1818 static int handle; /* reset pin handle */
1919 static unsigned int reset_val;
2020
21−void of_platform_reset_gpio_probe(void)
21+static int of_platform_reset_gpio_probe(void)
2222 {
2323 int ret;
2424 handle = of_get_named_gpio(of_find_node_by_path("/"),
@@ -27,13 +27,13 @@ void of_platform_reset_gpio_probe(void) · 2 unmodified lines
2727 if (!gpio_is_valid(handle)) {
2828 pr_info("Skipping unavailable RESET gpio %d (%s)\n",
2929 handle, "reset");
30− return;
30+ return -ENODEV;
3131 }
3232
3333 ret = gpio_request(handle, "reset");
3434 if (ret < 0) {
3535 pr_info("GPIO pin is already allocated\n");
36− return;
36+ return ret;
3737 }
3838
3939 /* get current setup value */
@@ -51,11 +51,12 @@ void of_platform_reset_gpio_probe(void) · 11 unmodified lines
5151
5252 pr_info("RESET: Registered gpio device: %d, current val: %d\n",
5353 handle, reset_val);
54− return;
54+ return 0;
5555 err:
5656 gpio_free(handle);
57− return;
57+ return ret;
5858 }
59+device_initcall(of_platform_reset_gpio_probe);
5960
6061
6162 static void gpio_system_reset(void)
arch/microblaze/kernel/syscall_table.S+2−0
@@ -400,3 +400,5 @@ ENTRY(sys_call_table) · 399 unmodified lines
400400 .long sys_pkey_alloc
401401 .long sys_pkey_free
402402 .long sys_statx
403+ .long sys_io_pgetevents
404+ .long sys_rseq
arch/microblaze/kernel/timer.c+0−7
@@ -156,9 +156,6 @@ static inline void timer_ack(void) · 155 unmodified lines
156156 static irqreturn_t timer_interrupt(int irq, void *dev_id)
157157 {
158158 struct clock_event_device *evt = &clockevent_xilinx_timer;
159−#ifdef CONFIG_HEART_BEAT
160− microblaze_heartbeat();
161−#endif
162159 timer_ack();
163160 evt->event_handler(evt);
164161 return IRQ_HANDLED;
@@ -318,10 +315,6 @@ static int __init xilinx_timer_init(struct device_node *timer) · 153 unmodified lines
318315 return ret;
319316 }
320317
321−#ifdef CONFIG_HEART_BEAT
322− microblaze_setup_heartbeat();
323−#endif
324−
325318 ret = xilinx_clocksource_init();
326319 if (ret)
327320 return ret;
arch/mips/Kconfig+1−0
@@ -65,6 +65,7 @@ config MIPS · 64 unmodified lines
6565 select HAVE_OPROFILE
6666 select HAVE_PERF_EVENTS
6767 select HAVE_REGS_AND_STACK_ACCESS_API
68+ select HAVE_RSEQ
6869 select HAVE_STACKPROTECTOR
6970 select HAVE_SYSCALL_TRACEPOINTS
7071 select HAVE_VIRT_CPU_ACCOUNTING_GEN if 64BIT || !SMP
arch/mips/ath79/common.c+1−1
@@ -58,7 +58,7 @@ EXPORT_SYMBOL_GPL(ath79_ddr_ctrl_init); · 57 unmodified lines
5858
5959 void ath79_ddr_wb_flush(u32 reg)
6060 {
61− void __iomem *flush_reg = ath79_ddr_wb_flush_base + reg;
61+ void __iomem *flush_reg = ath79_ddr_wb_flush_base + (reg * 4);
6262
6363 /* Flush the DDR write buffer. */
6464 __raw_writel(0x1, flush_reg);
arch/mips/ath79/mach-pb44.c+1−1
@@ -34,7 +34,7 @@ · 33 unmodified lines
3434 #define PB44_KEYS_DEBOUNCE_INTERVAL (3 * PB44_KEYS_POLL_INTERVAL)
3535
3636 static struct gpiod_lookup_table pb44_i2c_gpiod_table = {
37− .dev_id = "i2c-gpio",
37+ .dev_id = "i2c-gpio.0",
3838 .table = {
3939 GPIO_LOOKUP_IDX("ath79-gpio", PB44_GPIO_I2C_SDA,
4040 NULL, 0, GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
arch/mips/include/asm/io.h+2−0
@@ -414,6 +414,8 @@ static inline type pfx##in##bwlq##p(unsigned long port) \ · 413 unmodified lines
414414 __val = *__addr; \
415415 slow; \
416416 \
417+ /* prevent prefetching of coherent DMA data prematurely */ \
418+ rmb(); \
417419 return pfx##ioswab##bwlq(__addr, __val); \
418420 }
419421
arch/mips/include/uapi/asm/unistd.h+12−6
@@ -388,17 +388,19 @@ · 387 unmodified lines
388388 #define __NR_pkey_alloc (__NR_Linux + 364)
389389 #define __NR_pkey_free (__NR_Linux + 365)
390390 #define __NR_statx (__NR_Linux + 366)
391+#define __NR_rseq (__NR_Linux + 367)
392+#define __NR_io_pgetevents (__NR_Linux + 368)
391393
392394
393395 /*
394396 * Offset of the last Linux o32 flavoured syscall
395397 */
396−#define __NR_Linux_syscalls 366
398+#define __NR_Linux_syscalls 368
397399
398400 #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
399401
400402 #define __NR_O32_Linux 4000
401−#define __NR_O32_Linux_syscalls 366
403+#define __NR_O32_Linux_syscalls 368
402404
403405 #if _MIPS_SIM == _MIPS_SIM_ABI64
404406
@@ -733,16 +735,18 @@ · 328 unmodified lines
733735 #define __NR_pkey_alloc (__NR_Linux + 324)
734736 #define __NR_pkey_free (__NR_Linux + 325)
735737 #define __NR_statx (__NR_Linux + 326)
738+#define __NR_rseq (__NR_Linux + 327)
739+#define __NR_io_pgetevents (__NR_Linux + 328)
736740
737741 /*
738742 * Offset of the last Linux 64-bit flavoured syscall
739743 */
740−#define __NR_Linux_syscalls 326
744+#define __NR_Linux_syscalls 328
741745
742746 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
743747
744748 #define __NR_64_Linux 5000
745−#define __NR_64_Linux_syscalls 326
749+#define __NR_64_Linux_syscalls 328
746750
747751 #if _MIPS_SIM == _MIPS_SIM_NABI32
748752
@@ -1081,15 +1085,17 @@ · 332 unmodified lines
10811085 #define __NR_pkey_alloc (__NR_Linux + 328)
10821086 #define __NR_pkey_free (__NR_Linux + 329)
10831087 #define __NR_statx (__NR_Linux + 330)
1088+#define __NR_rseq (__NR_Linux + 331)
1089+#define __NR_io_pgetevents (__NR_Linux + 332)
10841090
10851091 /*
10861092 * Offset of the last N32 flavoured syscall
10871093 */
1088−#define __NR_Linux_syscalls 330
1094+#define __NR_Linux_syscalls 332
10891095
10901096 #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
10911097
10921098 #define __NR_N32_Linux 6000
1093−#define __NR_N32_Linux_syscalls 330
1099+#define __NR_N32_Linux_syscalls 332
10941100
10951101 #endif /* _UAPI_ASM_UNISTD_H */
arch/mips/kernel/entry.S+8−0
@@ -79,6 +79,10 @@ FEXPORT(ret_from_fork) · 78 unmodified lines
7979 jal schedule_tail # a0 = struct task_struct *prev
8080
8181 FEXPORT(syscall_exit)
82+#ifdef CONFIG_DEBUG_RSEQ
83+ move a0, sp
84+ jal rseq_syscall
85+#endif
8286 local_irq_disable # make sure need_resched and
8387 # signals dont change between
8488 # sampling and return
@@ -141,6 +145,10 @@ work_notifysig: # deal with pending signals and · 56 unmodified lines
141145 j resume_userspace_check
142146
143147 FEXPORT(syscall_exit_partial)
148+#ifdef CONFIG_DEBUG_RSEQ
149+ move a0, sp
150+ jal rseq_syscall
151+#endif
144152 local_irq_disable # make sure need_resched doesn't
145153 # change between and return
146154 LONG_L a2, TI_FLAGS($28) # current->work
arch/mips/kernel/mcount.S+12−15
@@ -119,10 +119,20 @@ NESTED(_mcount, PT_SIZE, ra) · 118 unmodified lines
119119 EXPORT_SYMBOL(_mcount)
120120 PTR_LA t1, ftrace_stub
121121 PTR_L t2, ftrace_trace_function /* Prepare t2 for (1) */
122− bne t1, t2, static_trace
122+ beq t1, t2, fgraph_trace
123123 nop
124124
125+ MCOUNT_SAVE_REGS
126+
127+ move a0, ra /* arg1: self return address */
128+ jalr t2 /* (1) call *ftrace_trace_function */
129+ move a1, AT /* arg2: parent's return address */
130+
131+ MCOUNT_RESTORE_REGS
132+
133+fgraph_trace:
125134 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
135+ PTR_LA t1, ftrace_stub
126136 PTR_L t3, ftrace_graph_return
127137 bne t1, t3, ftrace_graph_caller
128138 nop
@@ -131,24 +141,11 @@ EXPORT_SYMBOL(_mcount) · 2 unmodified lines
131141 bne t1, t3, ftrace_graph_caller
132142 nop
133143 #endif
134− b ftrace_stub
135−#ifdef CONFIG_32BIT
136− addiu sp, sp, 8
137−#else
138− nop
139−#endif
140144
141−static_trace:
142− MCOUNT_SAVE_REGS
143−
144− move a0, ra /* arg1: self return address */
145− jalr t2 /* (1) call *ftrace_trace_function */
146− move a1, AT /* arg2: parent's return address */
147−
148− MCOUNT_RESTORE_REGS
149145 #ifdef CONFIG_32BIT
150146 addiu sp, sp, 8
151147 #endif
148+
152149 .globl ftrace_stub
153150 ftrace_stub:
154151 RETURN_BACK
arch/mips/kernel/process.c+29−14
@@ -29,6 +29,7 @@ · 28 unmodified lines
2929 #include <linux/kallsyms.h>
3030 #include <linux/random.h>
3131 #include <linux/prctl.h>
32+#include <linux/nmi.h>
3233
3334 #include <asm/asm.h>
3435 #include <asm/bootinfo.h>
@@ -655,28 +656,42 @@ unsigned long arch_align_stack(unsigned long sp) · 620 unmodified lines
655656 return sp & ALMASK;
656657 }
657658
658−static void arch_dump_stack(void *info)
659+static DEFINE_PER_CPU(call_single_data_t, backtrace_csd);
660+static struct cpumask backtrace_csd_busy;
661+
662+static void handle_backtrace(void *info)
659663 {
660− struct pt_regs *regs;
664+ nmi_cpu_backtrace(get_irq_regs());
665+ cpumask_clear_cpu(smp_processor_id(), &backtrace_csd_busy);
666+}
661667
662− regs = get_irq_regs();
668+static void raise_backtrace(cpumask_t *mask)
669+{
670+ call_single_data_t *csd;
671+ int cpu;
663672
664− if (regs)
665− show_regs(regs);
673+ for_each_cpu(cpu, mask) {
674+ /*
675+ * If we previously sent an IPI to the target CPU & it hasn't
676+ * cleared its bit in the busy cpumask then it didn't handle
677+ * our previous IPI & it's not safe for us to reuse the
678+ * call_single_data_t.
679+ */
680+ if (cpumask_test_and_set_cpu(cpu, &backtrace_csd_busy)) {
681+ pr_warn("Unable to send backtrace IPI to CPU%u - perhaps it hung?\n",
682+ cpu);
683+ continue;
684+ }
666685
667− dump_stack();
686+ csd = &per_cpu(backtrace_csd, cpu);
687+ csd->func = handle_backtrace;
688+ smp_call_function_single_async(cpu, csd);
689+ }
668690 }
669691
670692 void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self)
671693 {
672− long this_cpu = get_cpu();
673−
674− if (cpumask_test_cpu(this_cpu, mask) && !exclude_self)
675− dump_stack();
676−
677− smp_call_function_many(mask, arch_dump_stack, NULL, 1);
678−
679− put_cpu();
694+ nmi_trigger_cpumask_backtrace(mask, exclude_self, raise_backtrace);
680695 }
681696
682697 int mips_get_process_fp_mode(struct task_struct *task)
arch/mips/kernel/scall32-o32.S+2−0
@@ -590,3 +590,5 @@ EXPORT(sys_call_table) · 589 unmodified lines
590590 PTR sys_pkey_alloc
591591 PTR sys_pkey_free /* 4365 */
592592 PTR sys_statx
593+ PTR sys_rseq
594+ PTR sys_io_pgetevents
arch/mips/kernel/scall64-64.S+2−0
@@ -439,4 +439,6 @@ EXPORT(sys_call_table) · 438 unmodified lines
439439 PTR sys_pkey_alloc
440440 PTR sys_pkey_free /* 5325 */
441441 PTR sys_statx
442+ PTR sys_rseq
443+ PTR sys_io_pgetevents
442444 .size sys_call_table,.-sys_call_table
arch/mips/kernel/scall64-n32.S+2−0
@@ -434,4 +434,6 @@ EXPORT(sysn32_call_table) · 433 unmodified lines
434434 PTR sys_pkey_alloc
435435 PTR sys_pkey_free
436436 PTR sys_statx /* 6330 */
437+ PTR sys_rseq
438+ PTR compat_sys_io_pgetevents
437439 .size sysn32_call_table,.-sysn32_call_table
arch/mips/kernel/scall64-o32.S+2−0
@@ -583,4 +583,6 @@ EXPORT(sys32_call_table) · 582 unmodified lines
583583 PTR sys_pkey_alloc
584584 PTR sys_pkey_free /* 4365 */
585585 PTR sys_statx
586+ PTR sys_rseq
587+ PTR compat_sys_io_pgetevents
586588 .size sys32_call_table,.-sys32_call_table
arch/mips/kernel/signal.c+3−0
@@ -801,6 +801,8 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) · 800 unmodified lines
801801 regs->regs[0] = 0; /* Don't deal with this again. */
802802 }
803803
804+ rseq_signal_deliver(ksig, regs);
805+
804806 if (sig_uses_siginfo(&ksig->ka, abi))
805807 ret = abi->setup_rt_frame(vdso + abi->vdso->off_rt_sigreturn,
806808 ksig, regs, oldset);
@@ -868,6 +870,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused, · 61 unmodified lines
868870 if (thread_info_flags & _TIF_NOTIFY_RESUME) {
869871 clear_thread_flag(TIF_NOTIFY_RESUME);
870872 tracehook_notify_resume(regs);
873+ rseq_handle_notify_resume(NULL, regs);
871874 }
872875
873876 user_enter();
arch/mips/kernel/traps.c+1−0
@@ -351,6 +351,7 @@ static void __show_regs(const struct pt_regs *regs) · 350 unmodified lines
351351 void show_regs(struct pt_regs *regs)
352352 {
353353 __show_regs((struct pt_regs *)regs);
354+ dump_stack();
354355 }
355356
356357 void show_registers(struct pt_regs *regs)
arch/mips/mm/ioremap.c+25−12
@@ -9,6 +9,7 @@ · 8 unmodified lines
99 #include <linux/export.h>
1010 #include <asm/addrspace.h>
1111 #include <asm/byteorder.h>
12+#include <linux/ioport.h>
1213 #include <linux/sched.h>
1314 #include <linux/slab.h>
1415 #include <linux/vmalloc.h>
@@ -98,6 +99,20 @@ static int remap_area_pages(unsigned long address, phys_addr_t phys_addr, · 83 unmodified lines
9899 return error;
99100 }
100101
102+static int __ioremap_check_ram(unsigned long start_pfn, unsigned long nr_pages,
103+ void *arg)
104+{
105+ unsigned long i;
106+
107+ for (i = 0; i < nr_pages; i++) {
108+ if (pfn_valid(start_pfn + i) &&
109+ !PageReserved(pfn_to_page(start_pfn + i)))
110+ return 1;
111+ }
112+
113+ return 0;
114+}
115+
101116 /*
102117 * Generic mapping function (not visible outside):
103118 */
@@ -116,8 +131,8 @@ static int remap_area_pages(unsigned long address, phys_addr_t phys_addr, · 12 unmodified lines
116131
117132 void __iomem * __ioremap(phys_addr_t phys_addr, phys_addr_t size, unsigned long flags)
118133 {
134+ unsigned long offset, pfn, last_pfn;
119135 struct vm_struct * area;
120− unsigned long offset;
121136 phys_addr_t last_addr;
122137 void * addr;
123138
@@ -137,18 +152,16 @@ void __iomem * __ioremap(phys_addr_t phys_addr, phys_addr_t size, unsigned long · 13 unmodified lines
137152 return (void __iomem *) CKSEG1ADDR(phys_addr);
138153
139154 /*
140− * Don't allow anybody to remap normal RAM that we're using..
155+ * Don't allow anybody to remap RAM that may be allocated by the page
156+ * allocator, since that could lead to races & data clobbering.
141157 */
142− if (phys_addr < virt_to_phys(high_memory)) {
143− char *t_addr, *t_end;
144− struct page *page;
145−
146− t_addr = __va(phys_addr);
147− t_end = t_addr + (size - 1);
148−
149− for(page = virt_to_page(t_addr); page <= virt_to_page(t_end); page++)
150− if(!PageReserved(page))
151− return NULL;
158+ pfn = PFN_DOWN(phys_addr);
159+ last_pfn = PFN_DOWN(last_addr);
160+ if (walk_system_ram_range(pfn, last_pfn - pfn + 1, NULL,
161+ __ioremap_check_ram) == 1) {
162+ WARN_ONCE(1, "ioremap on RAM at %pa - %pa\n",
163+ &phys_addr, &last_addr);
164+ return NULL;
152165 }
153166
154167 /*
arch/mips/pci/pci.c+1−1
@@ -54,5 +54,5 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar, · 53 unmodified lines
5454 phys_addr_t size = resource_size(rsrc);
5555
5656 *start = fixup_bigphys_addr(rsrc->start, size);
57− *end = rsrc->start + size;
57+ *end = rsrc->start + size - 1;
5858 }
arch/nds32/Kconfig+6−6
@@ -12,17 +12,17 @@ config NDS32 · 11 unmodified lines
1212 select CLONE_BACKWARDS
1313 select COMMON_CLK
1414 select DMA_NONCOHERENT_OPS
15− select GENERIC_ASHLDI3
16− select GENERIC_ASHRDI3
17− select GENERIC_LSHRDI3
18− select GENERIC_CMPDI2
19− select GENERIC_MULDI3
20− select GENERIC_UCMPDI2
2115 select GENERIC_ATOMIC64
2216 select GENERIC_CPU_DEVICES
2317 select GENERIC_CLOCKEVENTS
2418 select GENERIC_IRQ_CHIP
2519 select GENERIC_IRQ_SHOW
20+ select GENERIC_LIB_ASHLDI3
21+ select GENERIC_LIB_ASHRDI3
22+ select GENERIC_LIB_CMPDI2
23+ select GENERIC_LIB_LSHRDI3
24+ select GENERIC_LIB_MULDI3
25+ select GENERIC_LIB_UCMPDI2
2626 select GENERIC_STRNCPY_FROM_USER
2727 select GENERIC_STRNLEN_USER
2828 select GENERIC_TIME_VSYSCALL
arch/nds32/Makefile+2−0
@@ -34,10 +34,12 @@ ifdef CONFIG_CPU_LITTLE_ENDIAN · 33 unmodified lines
3434 KBUILD_CFLAGS += $(call cc-option, -EL)
3535 KBUILD_AFLAGS += $(call cc-option, -EL)
3636 LDFLAGS += $(call cc-option, -EL)
37+CHECKFLAGS += -D__NDS32_EL__
3738 else
3839 KBUILD_CFLAGS += $(call cc-option, -EB)
3940 KBUILD_AFLAGS += $(call cc-option, -EB)
4041 LDFLAGS += $(call cc-option, -EB)
42+CHECKFLAGS += -D__NDS32_EB__
4143 endif
4244
4345 boot := arch/nds32/boot
arch/nds32/include/asm/cacheflush.h+7−2
@@ -8,6 +8,8 @@ · 7 unmodified lines
88
99 #define PG_dcache_dirty PG_arch_1
1010
11+void flush_icache_range(unsigned long start, unsigned long end);
12+void flush_icache_page(struct vm_area_struct *vma, struct page *page);
1113 #ifdef CONFIG_CPU_CACHE_ALIASING
1214 void flush_cache_mm(struct mm_struct *mm);
1315 void flush_cache_dup_mm(struct mm_struct *mm);
@@ -34,13 +36,16 @@ void flush_anon_page(struct vm_area_struct *vma, · 20 unmodified lines
3436 void flush_kernel_dcache_page(struct page *page);
3537 void flush_kernel_vmap_range(void *addr, int size);
3638 void invalidate_kernel_vmap_range(void *addr, int size);
37−void flush_icache_range(unsigned long start, unsigned long end);
38−void flush_icache_page(struct vm_area_struct *vma, struct page *page);
3939 #define flush_dcache_mmap_lock(mapping) xa_lock_irq(&(mapping)->i_pages)
4040 #define flush_dcache_mmap_unlock(mapping) xa_unlock_irq(&(mapping)->i_pages)
4141
4242 #else
4343 #include <asm-generic/cacheflush.h>
44+#undef flush_icache_range
45+#undef flush_icache_page
46+#undef flush_icache_user_range
47+void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
48+ unsigned long addr, int len);
4449 #endif
4550
4651 #endif /* __NDS32_CACHEFLUSH_H__ */
arch/nds32/include/asm/futex.h+1−1
@@ -16,7 +16,7 @@ · 15 unmodified lines
1616 " .popsection\n" \
1717 " .pushsection .fixup,\"ax\"\n" \
1818 "4: move %0, " err_reg "\n" \
19− " j 3b\n" \
19+ " b 3b\n" \
2020 " .popsection"
2121
2222 #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \
arch/nds32/kernel/setup.c+2−1
@@ -278,7 +278,8 @@ static void __init setup_memory(void) · 277 unmodified lines
278278
279279 void __init setup_arch(char **cmdline_p)
280280 {
281− early_init_devtree( __dtb_start);
281+ early_init_devtree(__atags_pointer ? \
282+ phys_to_virt(__atags_pointer) : __dtb_start);
282283
283284 setup_cpuinfo();
284285
arch/nds32/mm/cacheflush.c+40−60
@@ -13,7 +13,39 @@ · 12 unmodified lines
1313
1414 extern struct cache_info L1_cache_info[2];
1515
16−#ifndef CONFIG_CPU_CACHE_ALIASING
16+void flush_icache_range(unsigned long start, unsigned long end)
17+{
18+ unsigned long line_size, flags;
19+ line_size = L1_cache_info[DCACHE].line_size;
20+ start = start & ~(line_size - 1);
21+ end = (end + line_size - 1) & ~(line_size - 1);
22+ local_irq_save(flags);
23+ cpu_cache_wbinval_range(start, end, 1);
24+ local_irq_restore(flags);
25+}
26+EXPORT_SYMBOL(flush_icache_range);
27+
28+void flush_icache_page(struct vm_area_struct *vma, struct page *page)
29+{
30+ unsigned long flags;
31+ unsigned long kaddr;
32+ local_irq_save(flags);
33+ kaddr = (unsigned long)kmap_atomic(page);
34+ cpu_cache_wbinval_page(kaddr, vma->vm_flags & VM_EXEC);
35+ kunmap_atomic((void *)kaddr);
36+ local_irq_restore(flags);
37+}
38+EXPORT_SYMBOL(flush_icache_page);
39+
40+void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
41+ unsigned long addr, int len)
42+{
43+ unsigned long kaddr;
44+ kaddr = (unsigned long)kmap_atomic(page) + (addr & ~PAGE_MASK);
45+ flush_icache_range(kaddr, kaddr + len);
46+ kunmap_atomic((void *)kaddr);
47+}
48+
1749 void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr,
1850 pte_t * pte)
1951 {
@@ -35,19 +67,15 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, · 15 unmodified lines
3567
3668 if ((test_and_clear_bit(PG_dcache_dirty, &page->flags)) ||
3769 (vma->vm_flags & VM_EXEC)) {
38−
39− if (!PageHighMem(page)) {
40− cpu_cache_wbinval_page((unsigned long)
41− page_address(page),
42− vma->vm_flags & VM_EXEC);
43− } else {
44− unsigned long kaddr = (unsigned long)kmap_atomic(page);
45− cpu_cache_wbinval_page(kaddr, vma->vm_flags & VM_EXEC);
46− kunmap_atomic((void *)kaddr);
47− }
70+ unsigned long kaddr;
71+ local_irq_save(flags);
72+ kaddr = (unsigned long)kmap_atomic(page);
73+ cpu_cache_wbinval_page(kaddr, vma->vm_flags & VM_EXEC);
74+ kunmap_atomic((void *)kaddr);
75+ local_irq_restore(flags);
4876 }
4977 }
50−#else
78+#ifdef CONFIG_CPU_CACHE_ALIASING
5179 extern pte_t va_present(struct mm_struct *mm, unsigned long addr);
5280
5381 static inline unsigned long aliasing(unsigned long addr, unsigned long page)
@@ -317,52 +345,4 @@ void invalidate_kernel_vmap_range(void *addr, int size) · 263 unmodified lines
317345 local_irq_restore(flags);
318346 }
319347 EXPORT_SYMBOL(invalidate_kernel_vmap_range);
320−
321−void flush_icache_range(unsigned long start, unsigned long end)
322−{
323− unsigned long line_size, flags;
324− line_size = L1_cache_info[DCACHE].line_size;
325− start = start & ~(line_size - 1);
326− end = (end + line_size - 1) & ~(line_size - 1);
327− local_irq_save(flags);
328− cpu_cache_wbinval_range(start, end, 1);
329− local_irq_restore(flags);
330−}
331−EXPORT_SYMBOL(flush_icache_range);
332−
333−void flush_icache_page(struct vm_area_struct *vma, struct page *page)
334−{
335− unsigned long flags;
336− local_irq_save(flags);
337− cpu_cache_wbinval_page((unsigned long)page_address(page),
338− vma->vm_flags & VM_EXEC);
339− local_irq_restore(flags);
340−}
341−
342−void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr,
343− pte_t * pte)
344−{
345− struct page *page;
346− unsigned long flags;
347− unsigned long pfn = pte_pfn(*pte);
348−
349− if (!pfn_valid(pfn))
350− return;
351−
352− if (vma->vm_mm == current->active_mm) {
353− local_irq_save(flags);
354− __nds32__mtsr_dsb(addr, NDS32_SR_TLB_VPN);
355− __nds32__tlbop_rwr(*pte);
356− __nds32__isb();
357− local_irq_restore(flags);
358− }
359−
360− page = pfn_to_page(pfn);
361− if (test_and_clear_bit(PG_dcache_dirty, &page->flags) ||
362− (vma->vm_flags & VM_EXEC)) {
363− local_irq_save(flags);
364− cpu_dcache_wbinval_page((unsigned long)page_address(page));
365− local_irq_restore(flags);
366− }
367−}
368348 #endif
arch/openrisc/include/asm/pgalloc.h+5−1
@@ -98,8 +98,12 @@ static inline void pte_free(struct mm_struct *mm, struct page *pte) · 97 unmodified lines
9898 __free_page(pte);
9999 }
100100
101+#define __pte_free_tlb(tlb, pte, addr) \
102+do { \
103+ pgtable_page_dtor(pte); \
104+ tlb_remove_page((tlb), (pte)); \
105+} while (0)
101106
102−#define __pte_free_tlb(tlb, pte, addr) tlb_remove_page((tlb), (pte))
103107 #define pmd_pgtable(pmd) pmd_page(pmd)
104108
105109 #define check_pgt_cache() do { } while (0)
arch/openrisc/kernel/entry.S+1−7
@@ -277,12 +277,6 @@ EXCEPTION_ENTRY(_data_page_fault_handler) · 276 unmodified lines
277277 l.addi r3,r1,0 // pt_regs
278278 /* r4 set be EXCEPTION_HANDLE */ // effective address of fault
279279
280− /*
281− * __PHX__: TODO
282− *
283− * all this can be written much simpler. look at
284− * DTLB miss handler in the CONFIG_GUARD_PROTECTED_CORE part
285− */
286280 #ifdef CONFIG_OPENRISC_NO_SPR_SR_DSX
287281 l.lwz r6,PT_PC(r3) // address of an offending insn
288282 l.lwz r6,0(r6) // instruction that caused pf
@@ -314,7 +308,7 @@ EXCEPTION_ENTRY(_data_page_fault_handler) · 25 unmodified lines
314308
315309 #else
316310
317− l.lwz r6,PT_SR(r3) // SR
311+ l.mfspr r6,r0,SPR_SR // SR
318312 l.andi r6,r6,SPR_SR_DSX // check for delay slot exception
319313 l.sfne r6,r0 // exception happened in delay slot
320314 l.bnf 7f
arch/openrisc/kernel/head.S+6−3
@@ -210,8 +210,7 @@ · 209 unmodified lines
210210 * r4 - EEAR exception EA
211211 * r10 - current pointing to current_thread_info struct
212212 * r12 - syscall 0, since we didn't come from syscall
213− * r13 - temp it actually contains new SR, not needed anymore
214− * r31 - handler address of the handler we'll jump to
213+ * r30 - handler address of the handler we'll jump to
215214 *
216215 * handler has to save remaining registers to the exception
217216 * ksp frame *before* tainting them!
@@ -244,6 +243,7 @@ · 26 unmodified lines
244243 /* r1 is KSP, r30 is __pa(KSP) */ ;\
245244 tophys (r30,r1) ;\
246245 l.sw PT_GPR12(r30),r12 ;\
246+ /* r4 use for tmp before EA */ ;\
247247 l.mfspr r12,r0,SPR_EPCR_BASE ;\
248248 l.sw PT_PC(r30),r12 ;\
249249 l.mfspr r12,r0,SPR_ESR_BASE ;\
@@ -263,7 +263,10 @@ · 13 unmodified lines
263263 /* r12 == 1 if we come from syscall */ ;\
264264 CLEAR_GPR(r12) ;\
265265 /* ----- turn on MMU ----- */ ;\
266− l.ori r30,r0,(EXCEPTION_SR) ;\
266+ /* Carry DSX into exception SR */ ;\
267+ l.mfspr r30,r0,SPR_SR ;\
268+ l.andi r30,r30,SPR_SR_DSX ;\
269+ l.ori r30,r30,(EXCEPTION_SR) ;\
267270 l.mtspr r0,r30,SPR_ESR_BASE ;\
268271 /* r30: EA address of handler */ ;\
269272 LOAD_SYMBOL_2_GPR(r30,handler) ;\
arch/openrisc/kernel/traps.c+1−1
@@ -300,7 +300,7 @@ static inline int in_delay_slot(struct pt_regs *regs) · 299 unmodified lines
300300 return 0;
301301 }
302302 #else
303− return regs->sr & SPR_SR_DSX;
303+ return mfspr(SPR_SR) & SPR_SR_DSX;
304304 #endif
305305 }
306306
arch/parisc/Kconfig+4−5
@@ -11,7 +11,6 @@ config PARISC · 10 unmodified lines
1111 select ARCH_HAS_ELF_RANDOMIZE
1212 select ARCH_HAS_STRICT_KERNEL_RWX
1313 select ARCH_HAS_UBSAN_SANITIZE_ALL
14− select ARCH_WANTS_UBSAN_NO_NULL
1514 select ARCH_SUPPORTS_MEMORY_FAILURE
1615 select RTC_CLASS
1716 select RTC_DRV_GENERIC
@@ -195,7 +194,7 @@ config PREFETCH · 177 unmodified lines
195194
196195 config MLONGCALLS
197196 bool "Enable the -mlong-calls compiler option for big kernels"
198− def_bool y if (!MODULES)
197+ default y
199198 depends on PA8X00
200199 help
201200 If you configure the kernel to include many drivers built-in instead
@@ -244,11 +243,11 @@ config PARISC_PAGE_SIZE_4KB · 42 unmodified lines
244243
245244 config PARISC_PAGE_SIZE_16KB
246245 bool "16KB"
247− depends on PA8X00
246+ depends on PA8X00 && BROKEN
248247
249248 config PARISC_PAGE_SIZE_64KB
250249 bool "64KB"
251− depends on PA8X00
250+ depends on PA8X00 && BROKEN
252251
253252 endchoice
254253
@@ -347,7 +346,7 @@ config NR_CPUS · 92 unmodified lines
347346 int "Maximum number of CPUs (2-32)"
348347 range 2 32
349348 depends on SMP
350− default "32"
349+ default "4"
351350
352351 endmenu
353352
arch/parisc/Makefile+0−4
@@ -65,10 +65,6 @@ endif · 64 unmodified lines
6565 # kernel.
6666 cflags-y += -mdisable-fpregs
6767
68−# Without this, "ld -r" results in .text sections that are too big
69−# (> 0x40000) for branches to reach stubs.
70−cflags-y += -ffunction-sections
71−
7268 # Use long jumps instead of long branches (needed if your linker fails to
7369 # link a too big vmlinux executable). Not enabled for building modules.
7470 ifdef CONFIG_MLONGCALLS
arch/parisc/include/asm/barrier.h+32−0
@@ -0,0 +1,32 @@
1+/* SPDX-License-Identifier: GPL-2.0 */
2+#ifndef __ASM_BARRIER_H
3+#define __ASM_BARRIER_H
4+
5+#ifndef __ASSEMBLY__
6+
7+/* The synchronize caches instruction executes as a nop on systems in
8+ which all memory references are performed in order. */
9+#define synchronize_caches() __asm__ __volatile__ ("sync" : : : "memory")
10+
11+#if defined(CONFIG_SMP)
12+#define mb() do { synchronize_caches(); } while (0)
13+#define rmb() mb()
14+#define wmb() mb()
15+#define dma_rmb() mb()
16+#define dma_wmb() mb()
17+#else
18+#define mb() barrier()
19+#define rmb() barrier()
20+#define wmb() barrier()
21+#define dma_rmb() barrier()
22+#define dma_wmb() barrier()
23+#endif
24+
25+#define __smp_mb() mb()
26+#define __smp_rmb() mb()
27+#define __smp_wmb() mb()
28+
29+#include <asm-generic/barrier.h>
30+
31+#endif /* !__ASSEMBLY__ */
32+#endif /* __ASM_BARRIER_H */
arch/parisc/include/asm/signal.h+0−8
@@ -21,14 +21,6 @@ typedef struct { · 20 unmodified lines
2121 unsigned long sig[_NSIG_WORDS];
2222 } sigset_t;
2323
24−#ifndef __KERNEL__
25−struct sigaction {
26− __sighandler_t sa_handler;
27− unsigned long sa_flags;
28− sigset_t sa_mask; /* mask last for extensibility */
29−};
30−#endif
31−
3224 #include <asm/sigcontext.h>
3325
3426 #endif /* !__ASSEMBLY */
arch/parisc/include/uapi/asm/unistd.h+2−1
@@ -364,8 +364,9 @@ · 363 unmodified lines
364364 #define __NR_preadv2 (__NR_Linux + 347)
365365 #define __NR_pwritev2 (__NR_Linux + 348)
366366 #define __NR_statx (__NR_Linux + 349)
367+#define __NR_io_pgetevents (__NR_Linux + 350)
367368
368−#define __NR_Linux_syscalls (__NR_statx + 1)
369+#define __NR_Linux_syscalls (__NR_io_pgetevents + 1)
369370
370371
371372 #define __IGNORE_select /* newselect */
arch/parisc/kernel/drivers.c+9−16
@@ -154,17 +154,14 @@ int register_parisc_driver(struct parisc_driver *driver) · 153 unmodified lines
154154 {
155155 /* FIXME: we need this because apparently the sti
156156 * driver can be registered twice */
157− if(driver->drv.name) {
158− printk(KERN_WARNING
159− "BUG: skipping previously registered driver %s\n",
160− driver->name);
157+ if (driver->drv.name) {
158+ pr_warn("BUG: skipping previously registered driver %s\n",
159+ driver->name);
161160 return 1;
162161 }
163162
164163 if (!driver->probe) {
165− printk(KERN_WARNING
166− "BUG: driver %s has no probe routine\n",
167− driver->name);
164+ pr_warn("BUG: driver %s has no probe routine\n", driver->name);
168165 return 1;
169166 }
170167
@@ -491,12 +488,9 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path) · 320 unmodified lines
491488
492489 dev = create_parisc_device(mod_path);
493490 if (dev->id.hw_type != HPHW_FAULTY) {
494− printk(KERN_ERR "Two devices have hardware path [%s]. "
495− "IODC data for second device: "
496− "%02x%02x%02x%02x%02x%02x\n"
497− "Rearranging GSC cards sometimes helps\n",
498− parisc_pathname(dev), iodc_data[0], iodc_data[1],
499− iodc_data[3], iodc_data[4], iodc_data[5], iodc_data[6]);
491+ pr_err("Two devices have hardware path [%s]. IODC data for second device: %7phN\n"
492+ "Rearranging GSC cards sometimes helps\n",
493+ parisc_pathname(dev), iodc_data);
500494 return NULL;
501495 }
502496
@@ -528,8 +522,7 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path) · 25 unmodified lines
528522 * the keyboard controller
529523 */
530524 if ((hpa & 0xfff) == 0 && insert_resource(&iomem_resource, &dev->hpa))
531− printk("Unable to claim HPA %lx for device %s\n",
532− hpa, name);
525+ pr_warn("Unable to claim HPA %lx for device %s\n", hpa, name);
533526
534527 return dev;
535528 }
@@ -875,7 +868,7 @@ static void print_parisc_device(struct parisc_device *dev) · 339 unmodified lines
875868 static int count;
876869
877870 print_pa_hwpath(dev, hw_path);
878− printk(KERN_INFO "%d. %s at 0x%px [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
871+ pr_info("%d. %s at 0x%px [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
879872 ++count, dev->name, (void*) dev->hpa.start, hw_path, dev->id.hw_type,
880873 dev->id.hversion_rev, dev->id.hversion, dev->id.sversion);
881874
arch/parisc/kernel/entry.S+2−0
@@ -481,6 +481,8 @@ · 480 unmodified lines
481481 /* Release pa_tlb_lock lock without reloading lock address. */
482482 .macro tlb_unlock0 spc,tmp
483483 #ifdef CONFIG_SMP
484+ or,COND(=) %r0,\spc,%r0
485+ sync
484486 or,COND(=) %r0,\spc,%r0
485487 stw \spc,0(\tmp)
486488 #endif
arch/parisc/kernel/pacache.S+1−0
@@ -353,6 +353,7 @@ ENDPROC_CFI(flush_data_cache_local) · 352 unmodified lines
353353 .macro tlb_unlock la,flags,tmp
354354 #ifdef CONFIG_SMP
355355 ldi 1,\tmp
356+ sync
356357 stw \tmp,0(\la)
357358 mtsm \flags
358359 #endif
arch/parisc/kernel/syscall.S+4−0
@@ -633,6 +633,7 @@ cas_action: · 632 unmodified lines
633633 sub,<> %r28, %r25, %r0
634634 2: stw,ma %r24, 0(%r26)
635635 /* Free lock */
636+ sync
636637 stw,ma %r20, 0(%sr2,%r20)
637638 #if ENABLE_LWS_DEBUG
638639 /* Clear thread register indicator */
@@ -647,6 +648,7 @@ cas_action: · 8 unmodified lines
647648 3:
648649 /* Error occurred on load or store */
649650 /* Free lock */
651+ sync
650652 stw %r20, 0(%sr2,%r20)
651653 #if ENABLE_LWS_DEBUG
652654 stw %r0, 4(%sr2,%r20)
@@ -848,6 +850,7 @@ cas2_action: · 195 unmodified lines
848850
849851 cas2_end:
850852 /* Free lock */
853+ sync
851854 stw,ma %r20, 0(%sr2,%r20)
852855 /* Enable interrupts */
853856 ssm PSW_SM_I, %r0
@@ -858,6 +861,7 @@ cas2_end: · 4 unmodified lines
858861 22:
859862 /* Error occurred on load or store */
860863 /* Free lock */
864+ sync
861865 stw %r20, 0(%sr2,%r20)
862866 ssm PSW_SM_I, %r0
863867 ldo 1(%r0),%r28
arch/parisc/kernel/syscall_table.S+1−0
@@ -445,6 +445,7 @@ · 444 unmodified lines
445445 ENTRY_COMP(preadv2)
446446 ENTRY_COMP(pwritev2)
447447 ENTRY_SAME(statx)
448+ ENTRY_COMP(io_pgetevents) /* 350 */
448449
449450
450451 .ifne (. - 90b) - (__NR_Linux_syscalls * (91b - 90b))
arch/parisc/kernel/unwind.c+2−2
@@ -25,7 +25,7 @@ · 24 unmodified lines
2525
2626 /* #define DEBUG 1 */
2727 #ifdef DEBUG
28−#define dbg(x...) printk(x)
28+#define dbg(x...) pr_debug(x)
2929 #else
3030 #define dbg(x...)
3131 #endif
@@ -182,7 +182,7 @@ int __init unwind_init(void) · 150 unmodified lines
182182 start = (long)&__start___unwind[0];
183183 stop = (long)&__stop___unwind[0];
184184
185− printk("unwind_init: start = 0x%lx, end = 0x%lx, entries = %lu\n",
185+ dbg("unwind_init: start = 0x%lx, end = 0x%lx, entries = %lu\n",
186186 start, stop,
187187 (stop - start) / sizeof(struct unwind_table_entry));
188188
arch/powerpc/Makefile+2−0
@@ -243,7 +243,9 @@ endif · 242 unmodified lines
243243 cpu-as-$(CONFIG_4xx) += -Wa,-m405
244244 cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec)
245245 cpu-as-$(CONFIG_E200) += -Wa,-me200
246+cpu-as-$(CONFIG_E500) += -Wa,-me500
246247 cpu-as-$(CONFIG_PPC_BOOK3S_64) += -Wa,-mpower4
248+cpu-as-$(CONFIG_PPC_E500MC) += $(call as-option,-Wa$(comma)-me500mc)
247249
248250 KBUILD_AFLAGS += $(cpu-as-y)
249251 KBUILD_CFLAGS += $(cpu-as-y)
arch/powerpc/include/asm/book3s/32/pgalloc.h+1−1
@@ -108,6 +108,7 @@ static inline void pgtable_free(void *table, unsigned index_size) · 107 unmodified lines
108108 }
109109
110110 #define check_pgt_cache() do { } while (0)
111+#define get_hugepd_cache_index(x) (x)
111112
112113 #ifdef CONFIG_SMP
113114 static inline void pgtable_free_tlb(struct mmu_gather *tlb,
@@ -137,7 +138,6 @@ static inline void pgtable_free_tlb(struct mmu_gather *tlb, · 23 unmodified lines
137138 static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table,
138139 unsigned long address)
139140 {
140− pgtable_page_dtor(table);
141141 pgtable_free_tlb(tlb, page_address(table), 0);
142142 }
143143 #endif /* _ASM_POWERPC_BOOK3S_32_PGALLOC_H */
arch/powerpc/include/asm/book3s/64/pgtable-4k.h+21−0
@@ -49,6 +49,27 @@ static inline int hugepd_ok(hugepd_t hpd) · 48 unmodified lines
4949 }
5050 #define is_hugepd(hpd) (hugepd_ok(hpd))
5151
52+/*
53+ * 16M and 16G huge page directory tables are allocated from slab cache
54+ *
55+ */
56+#define H_16M_CACHE_INDEX (PAGE_SHIFT + H_PTE_INDEX_SIZE + H_PMD_INDEX_SIZE - 24)
57+#define H_16G_CACHE_INDEX \
58+ (PAGE_SHIFT + H_PTE_INDEX_SIZE + H_PMD_INDEX_SIZE + H_PUD_INDEX_SIZE - 34)
59+
60+static inline int get_hugepd_cache_index(int index)
61+{
62+ switch (index) {
63+ case H_16M_CACHE_INDEX:
64+ return HTLB_16M_INDEX;
65+ case H_16G_CACHE_INDEX:
66+ return HTLB_16G_INDEX;
67+ default:
68+ BUG();
69+ }
70+ /* should not reach */
71+}
72+
5273 #else /* !CONFIG_HUGETLB_PAGE */
5374 static inline int pmd_huge(pmd_t pmd) { return 0; }
5475 static inline int pud_huge(pud_t pud) { return 0; }
arch/powerpc/include/asm/book3s/64/pgtable-64k.h+9−0
@@ -45,8 +45,17 @@ static inline int hugepd_ok(hugepd_t hpd) · 44 unmodified lines
4545 {
4646 return 0;
4747 }
48+
4849 #define is_hugepd(pdep) 0
4950
51+/*
52+ * This should never get called
53+ */
54+static inline int get_hugepd_cache_index(int index)
55+{
56+ BUG();
57+}
58+
5059 #else /* !CONFIG_HUGETLB_PAGE */
5160 static inline int pmd_huge(pmd_t pmd) { return 0; }
5261 static inline int pud_huge(pud_t pud) { return 0; }
arch/powerpc/include/asm/book3s/64/pgtable.h+5−0
@@ -287,6 +287,11 @@ enum pgtable_index { · 286 unmodified lines
287287 PMD_INDEX,
288288 PUD_INDEX,
289289 PGD_INDEX,
290+ /*
291+ * Below are used with 4k page size and hugetlb
292+ */
293+ HTLB_16M_INDEX,
294+ HTLB_16G_INDEX,
290295 };
291296
292297 extern unsigned long __vmalloc_start;
arch/powerpc/include/asm/mmu_context.h+23−14
@@ -35,9 +35,9 @@ extern struct mm_iommu_table_group_mem_t *mm_iommu_lookup_rm( · 34 unmodified lines
3535 extern struct mm_iommu_table_group_mem_t *mm_iommu_find(struct mm_struct *mm,
3636 unsigned long ua, unsigned long entries);
3737 extern long mm_iommu_ua_to_hpa(struct mm_iommu_table_group_mem_t *mem,
38− unsigned long ua, unsigned long *hpa);
38+ unsigned long ua, unsigned int pageshift, unsigned long *hpa);
3939 extern long mm_iommu_ua_to_hpa_rm(struct mm_iommu_table_group_mem_t *mem,
40− unsigned long ua, unsigned long *hpa);
40+ unsigned long ua, unsigned int pageshift, unsigned long *hpa);
4141 extern long mm_iommu_mapped_inc(struct mm_iommu_table_group_mem_t *mem);
4242 extern void mm_iommu_mapped_dec(struct mm_iommu_table_group_mem_t *mem);
4343 #endif
@@ -143,24 +143,33 @@ static inline void mm_context_remove_copro(struct mm_struct *mm) · 99 unmodified lines
143143 {
144144 int c;
145145
146− c = atomic_dec_if_positive(&mm->context.copros);
147−
148− /* Detect imbalance between add and remove */
149− WARN_ON(c < 0);
150−
151146 /*
152− * Need to broadcast a global flush of the full mm before
153− * decrementing active_cpus count, as the next TLBI may be
154− * local and the nMMU and/or PSL need to be cleaned up.
155− * Should be rare enough so that it's acceptable.
147+ * When removing the last copro, we need to broadcast a global
148+ * flush of the full mm, as the next TLBI may be local and the
149+ * nMMU and/or PSL need to be cleaned up.
150+ *
151+ * Both the 'copros' and 'active_cpus' counts are looked at in
152+ * flush_all_mm() to determine the scope (local/global) of the
153+ * TLBIs, so we need to flush first before decrementing
154+ * 'copros'. If this API is used by several callers for the
155+ * same context, it can lead to over-flushing. It's hopefully
156+ * not common enough to be a problem.
156157 *
157158 * Skip on hash, as we don't know how to do the proper flush
158159 * for the time being. Invalidations will remain global if
159− * used on hash.
160+ * used on hash. Note that we can't drop 'copros' either, as
161+ * it could make some invalidations local with no flush
162+ * in-between.
160163 */
161− if (c == 0 && radix_enabled()) {
164+ if (radix_enabled()) {
162165 flush_all_mm(mm);
163− dec_mm_active_cpus(mm);
166+
167+ c = atomic_dec_if_positive(&mm->context.copros);
168+ /* Detect imbalance between add and remove */
169+ WARN_ON(c < 0);
170+
171+ if (c == 0)
172+ dec_mm_active_cpus(mm);
164173 }
165174 }
166175 #else
arch/powerpc/include/asm/nmi.h+1−1
@@ -8,7 +8,7 @@ extern void arch_touch_nmi_watchdog(void); · 7 unmodified lines
88 static inline void arch_touch_nmi_watchdog(void) {}
99 #endif
1010
11−#if defined(CONFIG_PPC_BOOK3S_64) && defined(CONFIG_STACKTRACE)
11+#if defined(CONFIG_NMI_IPI) && defined(CONFIG_STACKTRACE)
1212 extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,
1313 bool exclude_self);
1414 #define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
arch/powerpc/include/asm/nohash/32/pgalloc.h+1−1
@@ -109,6 +109,7 @@ static inline void pgtable_free(void *table, unsigned index_size) · 108 unmodified lines
109109 }
110110
111111 #define check_pgt_cache() do { } while (0)
112+#define get_hugepd_cache_index(x) (x)
112113
113114 #ifdef CONFIG_SMP
114115 static inline void pgtable_free_tlb(struct mmu_gather *tlb,
@@ -139,7 +140,6 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table, · 24 unmodified lines
139140 unsigned long address)
140141 {
141142 tlb_flush_pgtable(tlb, address);
142− pgtable_page_dtor(table);
143143 pgtable_free_tlb(tlb, page_address(table), 0);
144144 }
145145 #endif /* _ASM_POWERPC_PGALLOC_32_H */
arch/powerpc/include/asm/nohash/64/pgalloc.h+1−0
@@ -141,6 +141,7 @@ static inline void pgtable_free(void *table, int shift) · 140 unmodified lines
141141 }
142142 }
143143
144+#define get_hugepd_cache_index(x) (x)
144145 #ifdef CONFIG_SMP
145146 static inline void pgtable_free_tlb(struct mmu_gather *tlb, void *table, int shift)
146147 {
arch/powerpc/include/asm/systbl.h+1−0
@@ -393,3 +393,4 @@ SYSCALL(pkey_alloc) · 392 unmodified lines
393393 SYSCALL(pkey_free)
394394 SYSCALL(pkey_mprotect)
395395 SYSCALL(rseq)
396+COMPAT_SYS(io_pgetevents)
arch/powerpc/include/asm/unistd.h+1−1
@@ -12,7 +12,7 @@ · 11 unmodified lines
1212 #include <uapi/asm/unistd.h>
1313
1414
15−#define NR_syscalls 388
15+#define NR_syscalls 389
1616
1717 #define __NR__exit __NR_exit
1818
arch/powerpc/include/uapi/asm/unistd.h+1−0
@@ -399,5 +399,6 @@ · 398 unmodified lines
399399 #define __NR_pkey_free 385
400400 #define __NR_pkey_mprotect 386
401401 #define __NR_rseq 387
402+#define __NR_io_pgetevents 388
402403
403404 #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */
arch/powerpc/kernel/dt_cpu_ftrs.c+2−1
@@ -711,7 +711,8 @@ static __init void cpufeatures_cpu_quirks(void) · 710 unmodified lines
711711 cur_cpu_spec->cpu_features |= CPU_FTR_P9_TM_HV_ASSIST;
712712 cur_cpu_spec->cpu_features |= CPU_FTR_P9_TM_XER_SO_BUG;
713713 cur_cpu_spec->cpu_features |= CPU_FTR_POWER9_DD2_1;
714− } else /* DD2.1 and up have DD2_1 */
714+ } else if ((version & 0xffff0000) == 0x004e0000)
715+ /* DD2.1 and up have DD2_1 */
715716 cur_cpu_spec->cpu_features |= CPU_FTR_POWER9_DD2_1;
716717
717718 if ((version & 0xffff0000) == 0x004e0000) {
arch/powerpc/kernel/idle_book3s.S+2−0
@@ -144,7 +144,9 @@ power9_restore_additional_sprs: · 143 unmodified lines
144144 mtspr SPRN_MMCR1, r4
145145
146146 ld r3, STOP_MMCR2(r13)
147+ ld r4, PACA_SPRG_VDSO(r13)
147148 mtspr SPRN_MMCR2, r3
149+ mtspr SPRN_SPRG3, r4
148150 blr
149151
150152 /*
arch/powerpc/kernel/pci-common.c+3−1
@@ -42,6 +42,8 @@ · 41 unmodified lines
4242 #include <asm/ppc-pci.h>
4343 #include <asm/eeh.h>
4444
45+#include "../../../drivers/pci/pci.h"
46+
4547 /* hose_spinlock protects accesses to the the phb_bitmap. */
4648 static DEFINE_SPINLOCK(hose_spinlock);
4749 LIST_HEAD(hose_list);
@@ -1014,7 +1016,7 @@ void pcibios_setup_bus_devices(struct pci_bus *bus) · 966 unmodified lines
10141016 /* Cardbus can call us to add new devices to a bus, so ignore
10151017 * those who are already fully discovered
10161018 */
1017− if (dev->is_added)
1019+ if (pci_dev_is_added(dev))
10181020 continue;
10191021
10201022 pcibios_setup_device(dev);
arch/powerpc/kernel/pci_32.c+0−4
@@ -285,9 +285,6 @@ pci_bus_to_hose(int bus) · 284 unmodified lines
285285 * Note that the returned IO or memory base is a physical address
286286 */
287287
288−#pragma GCC diagnostic push
289−#pragma GCC diagnostic ignored "-Wpragmas"
290−#pragma GCC diagnostic ignored "-Wattribute-alias"
291288 SYSCALL_DEFINE3(pciconfig_iobase, long, which,
292289 unsigned long, bus, unsigned long, devfn)
293290 {
@@ -313,4 +310,3 @@ SYSCALL_DEFINE3(pciconfig_iobase, long, which, · 19 unmodified lines
313310
314311 return result;
315312 }
316−#pragma GCC diagnostic pop
arch/powerpc/kernel/pci_64.c+0−4
@@ -203,9 +203,6 @@ void pcibios_setup_phb_io_space(struct pci_controller *hose) · 202 unmodified lines
203203 #define IOBASE_ISA_IO 3
204204 #define IOBASE_ISA_MEM 4
205205
206−#pragma GCC diagnostic push
207−#pragma GCC diagnostic ignored "-Wpragmas"
208−#pragma GCC diagnostic ignored "-Wattribute-alias"
209206 SYSCALL_DEFINE3(pciconfig_iobase, long, which, unsigned long, in_bus,
210207 unsigned long, in_devfn)
211208 {
@@ -259,7 +256,6 @@ SYSCALL_DEFINE3(pciconfig_iobase, long, which, unsigned long, in_bus, · 47 unmodified lines
259256
260257 return -EOPNOTSUPP;
261258 }
262−#pragma GCC diagnostic pop
263259
264260 #ifdef CONFIG_NUMA
265261 int pcibus_to_node(struct pci_bus *bus)
arch/powerpc/kernel/rtas.c+0−4
@@ -1051,9 +1051,6 @@ struct pseries_errorlog *get_pseries_errorlog(struct rtas_error_log *log, · 1050 unmodified lines
10511051 }
10521052
10531053 /* We assume to be passed big endian arguments */
1054−#pragma GCC diagnostic push
1055−#pragma GCC diagnostic ignored "-Wpragmas"
1056−#pragma GCC diagnostic ignored "-Wattribute-alias"
10571054 SYSCALL_DEFINE1(rtas, struct rtas_args __user *, uargs)
10581055 {
10591056 struct rtas_args args;
@@ -1140,7 +1137,6 @@ SYSCALL_DEFINE1(rtas, struct rtas_args __user *, uargs) · 80 unmodified lines
11401137
11411138 return 0;
11421139 }
1143−#pragma GCC diagnostic pop
11441140
11451141 /*
11461142 * Call early during boot, before mem init, to retrieve the RTAS
arch/powerpc/kernel/setup-common.c+10−2
@@ -700,12 +700,19 @@ EXPORT_SYMBOL(check_legacy_ioport); · 699 unmodified lines
700700 static int ppc_panic_event(struct notifier_block *this,
701701 unsigned long event, void *ptr)
702702 {
703+ /*
704+ * panic does a local_irq_disable, but we really
705+ * want interrupts to be hard disabled.
706+ */
707+ hard_irq_disable();
708+
703709 /*
704710 * If firmware-assisted dump has been registered then trigger
705711 * firmware-assisted dump and let firmware handle everything else.
706712 */
707713 crash_fadump(NULL, ptr);
708− ppc_md.panic(ptr); /* May not return */
714+ if (ppc_md.panic)
715+ ppc_md.panic(ptr); /* May not return */
709716 return NOTIFY_DONE;
710717 }
711718
@@ -716,7 +723,8 @@ static struct notifier_block ppc_panic_block = { · 4 unmodified lines
716723
717724 void __init setup_panic(void)
718725 {
719− if (!ppc_md.panic)
726+ /* PPC64 always does a hard irq disable in its panic handler */
727+ if (!IS_ENABLED(CONFIG_PPC64) && !ppc_md.panic)
720728 return;
721729 atomic_notifier_chain_register(&panic_notifier_list, &ppc_panic_block);
722730 }
arch/powerpc/kernel/setup_64.c+8−0
@@ -387,6 +387,14 @@ void early_setup_secondary(void) · 386 unmodified lines
387387
388388 #endif /* CONFIG_SMP */
389389
390+void panic_smp_self_stop(void)
391+{
392+ hard_irq_disable();
393+ spin_begin();
394+ while (1)
395+ spin_cpu_relax();
396+}
397+
390398 #if defined(CONFIG_SMP) || defined(CONFIG_KEXEC_CORE)
391399 static bool use_spinloop(void)
392400 {
arch/powerpc/kernel/signal.c+2−2
@@ -134,7 +134,7 @@ static void do_signal(struct task_struct *tsk) · 133 unmodified lines
134134 /* Re-enable the breakpoints for the signal stack */
135135 thread_change_pc(tsk, tsk->thread.regs);
136136
137− rseq_signal_deliver(tsk->thread.regs);
137+ rseq_signal_deliver(&ksig, tsk->thread.regs);
138138
139139 if (is32) {
140140 if (ksig.ka.sa.sa_flags & SA_SIGINFO)
@@ -170,7 +170,7 @@ void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags) · 29 unmodified lines
170170 if (thread_info_flags & _TIF_NOTIFY_RESUME) {
171171 clear_thread_flag(TIF_NOTIFY_RESUME);
172172 tracehook_notify_resume(regs);
173− rseq_handle_notify_resume(regs);
173+ rseq_handle_notify_resume(NULL, regs);
174174 }
175175
176176 user_enter();
arch/powerpc/kernel/signal_32.c+0−8
@@ -1038,9 +1038,6 @@ static int do_setcontext_tm(struct ucontext __user *ucp, · 1037 unmodified lines
10381038 }
10391039 #endif
10401040
1041−#pragma GCC diagnostic push
1042−#pragma GCC diagnostic ignored "-Wpragmas"
1043−#pragma GCC diagnostic ignored "-Wattribute-alias"
10441041 #ifdef CONFIG_PPC64
10451042 COMPAT_SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx,
10461043 struct ucontext __user *, new_ctx, int, ctx_size)
@@ -1134,7 +1131,6 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx, · 87 unmodified lines
11341131 set_thread_flag(TIF_RESTOREALL);
11351132 return 0;
11361133 }
1137−#pragma GCC diagnostic pop
11381134
11391135 #ifdef CONFIG_PPC64
11401136 COMPAT_SYSCALL_DEFINE0(rt_sigreturn)
@@ -1231,9 +1227,6 @@ SYSCALL_DEFINE0(rt_sigreturn) · 90 unmodified lines
12311227 return 0;
12321228 }
12331229
1234−#pragma GCC diagnostic push
1235−#pragma GCC diagnostic ignored "-Wpragmas"
1236−#pragma GCC diagnostic ignored "-Wattribute-alias"
12371230 #ifdef CONFIG_PPC32
12381231 SYSCALL_DEFINE3(debug_setcontext, struct ucontext __user *, ctx,
12391232 int, ndbg, struct sig_dbg_op __user *, dbg)
@@ -1337,7 +1330,6 @@ SYSCALL_DEFINE3(debug_setcontext, struct ucontext __user *, ctx, · 97 unmodified lines
13371330 return 0;
13381331 }
13391332 #endif
1340−#pragma GCC diagnostic pop
13411333
13421334 /*
13431335 * OK, we're invoking a handler
arch/powerpc/kernel/signal_64.c+0−4
@@ -625,9 +625,6 @@ static long setup_trampoline(unsigned int syscall, unsigned int __user *tramp) · 624 unmodified lines
625625 /*
626626 * Handle {get,set,swap}_context operations
627627 */
628−#pragma GCC diagnostic push
629−#pragma GCC diagnostic ignored "-Wpragmas"
630−#pragma GCC diagnostic ignored "-Wattribute-alias"
631628 SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx,
632629 struct ucontext __user *, new_ctx, long, ctx_size)
633630 {
@@ -693,7 +690,6 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx, · 59 unmodified lines
693690 set_thread_flag(TIF_RESTOREALL);
694691 return 0;
695692 }
696−#pragma GCC diagnostic pop
697693
698694
699695 /*
arch/powerpc/kernel/smp.c+0−6
@@ -600,9 +600,6 @@ static void nmi_stop_this_cpu(struct pt_regs *regs) · 599 unmodified lines
600600 nmi_ipi_busy_count--;
601601 nmi_ipi_unlock();
602602
603− /* Remove this CPU */
604− set_cpu_online(smp_processor_id(), false);
605−
606603 spin_begin();
607604 while (1)
608605 spin_cpu_relax();
@@ -617,9 +614,6 @@ void smp_send_stop(void) · 8 unmodified lines
617614
618615 static void stop_this_cpu(void *dummy)
619616 {
620− /* Remove this CPU */
621− set_cpu_online(smp_processor_id(), false);
622−
623617 hard_irq_disable();
624618 spin_begin();
625619 while (1)
arch/powerpc/kernel/stacktrace.c+2−2
@@ -196,7 +196,7 @@ save_stack_trace_tsk_reliable(struct task_struct *tsk, · 195 unmodified lines
196196 EXPORT_SYMBOL_GPL(save_stack_trace_tsk_reliable);
197197 #endif /* CONFIG_HAVE_RELIABLE_STACKTRACE */
198198
199−#ifdef CONFIG_PPC_BOOK3S_64
199+#if defined(CONFIG_PPC_BOOK3S_64) && defined(CONFIG_NMI_IPI)
200200 static void handle_backtrace_ipi(struct pt_regs *regs)
201201 {
202202 nmi_cpu_backtrace(regs);
@@ -242,4 +242,4 @@ void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self) · 39 unmodified lines
242242 {
243243 nmi_trigger_cpumask_backtrace(mask, exclude_self, raise_backtrace_ipi);
244244 }
245−#endif /* CONFIG_PPC64 */
245+#endif /* defined(CONFIG_PPC_BOOK3S_64) && defined(CONFIG_NMI_IPI) */
arch/powerpc/kernel/syscalls.c+0−4
@@ -62,9 +62,6 @@ out: · 61 unmodified lines
6262 return ret;
6363 }
6464
65−#pragma GCC diagnostic push
66−#pragma GCC diagnostic ignored "-Wpragmas"
67−#pragma GCC diagnostic ignored "-Wattribute-alias"
6865 SYSCALL_DEFINE6(mmap2, unsigned long, addr, size_t, len,
6966 unsigned long, prot, unsigned long, flags,
7067 unsigned long, fd, unsigned long, pgoff)
@@ -78,7 +75,6 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, size_t, len, · 7 unmodified lines
7875 {
7976 return do_mmap2(addr, len, prot, flags, fd, offset, PAGE_SHIFT);
8077 }
81−#pragma GCC diagnostic pop
8278
8379 #ifdef CONFIG_PPC32
8480 /*
arch/powerpc/kvm/book3s_64_vio.c+1−1
@@ -449,7 +449,7 @@ long kvmppc_tce_iommu_do_map(struct kvm *kvm, struct iommu_table *tbl, · 448 unmodified lines
449449 /* This only handles v2 IOMMU type, v1 is handled via ioctl() */
450450 return H_TOO_HARD;
451451
452− if (WARN_ON_ONCE(mm_iommu_ua_to_hpa(mem, ua, &hpa)))
452+ if (WARN_ON_ONCE(mm_iommu_ua_to_hpa(mem, ua, tbl->it_page_shift, &hpa)))
453453 return H_HARDWARE;
454454
455455 if (mm_iommu_mapped_inc(mem))
arch/powerpc/kvm/book3s_64_vio_hv.c+4−2
@@ -279,7 +279,8 @@ static long kvmppc_rm_tce_iommu_do_map(struct kvm *kvm, struct iommu_table *tbl, · 278 unmodified lines
279279 if (!mem)
280280 return H_TOO_HARD;
281281
282− if (WARN_ON_ONCE_RM(mm_iommu_ua_to_hpa_rm(mem, ua, &hpa)))
282+ if (WARN_ON_ONCE_RM(mm_iommu_ua_to_hpa_rm(mem, ua, tbl->it_page_shift,
283+ &hpa)))
283284 return H_HARDWARE;
284285
285286 pua = (void *) vmalloc_to_phys(pua);
@@ -469,7 +470,8 @@ long kvmppc_rm_h_put_tce_indirect(struct kvm_vcpu *vcpu, · 183 unmodified lines
469470
470471 mem = mm_iommu_lookup_rm(vcpu->kvm->mm, ua, IOMMU_PAGE_SIZE_4K);
471472 if (mem)
472− prereg = mm_iommu_ua_to_hpa_rm(mem, ua, &tces) == 0;
473+ prereg = mm_iommu_ua_to_hpa_rm(mem, ua,
474+ IOMMU_PAGE_SHIFT_4K, &tces) == 0;
473475 }
474476
475477 if (!prereg) {
arch/powerpc/mm/hugetlbpage.c+2−1
@@ -337,7 +337,8 @@ static void free_hugepd_range(struct mmu_gather *tlb, hugepd_t *hpdp, int pdshif · 336 unmodified lines
337337 if (shift >= pdshift)
338338 hugepd_free(tlb, hugepte);
339339 else
340− pgtable_free_tlb(tlb, hugepte, pdshift - shift);
340+ pgtable_free_tlb(tlb, hugepte,
341+ get_hugepd_cache_index(pdshift - shift));
341342 }
342343
343344 static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
arch/powerpc/mm/mmu_context_iommu.c+35−2
@@ -19,6 +19,7 @@ · 18 unmodified lines
1919 #include <linux/hugetlb.h>
2020 #include <linux/swap.h>
2121 #include <asm/mmu_context.h>
22+#include <asm/pte-walk.h>
2223
2324 static DEFINE_MUTEX(mem_list_mutex);
2425
@@ -27,6 +28,7 @@ struct mm_iommu_table_group_mem_t { · 2 unmodified lines
2728 struct rcu_head rcu;
2829 unsigned long used;
2930 atomic64_t mapped;
31+ unsigned int pageshift;
3032 u64 ua; /* userspace address */
3133 u64 entries; /* number of entries in hpas[] */
3234 u64 *hpas; /* vmalloc'ed */
@@ -125,6 +127,8 @@ long mm_iommu_get(struct mm_struct *mm, unsigned long ua, unsigned long entries, · 92 unmodified lines
125127 {
126128 struct mm_iommu_table_group_mem_t *mem;
127129 long i, j, ret = 0, locked_entries = 0;
130+ unsigned int pageshift;
131+ unsigned long flags;
128132 struct page *page = NULL;
129133
130134 mutex_lock(&mem_list_mutex);
@@ -159,6 +163,12 @@ long mm_iommu_get(struct mm_struct *mm, unsigned long ua, unsigned long entries, · 28 unmodified lines
159163 goto unlock_exit;
160164 }
161165
166+ /*
167+ * For a starting point for a maximum page size calculation
168+ * we use @ua and @entries natural alignment to allow IOMMU pages
169+ * smaller than huge pages but still bigger than PAGE_SIZE.
170+ */
171+ mem->pageshift = __ffs(ua | (entries << PAGE_SHIFT));
162172 mem->hpas = vzalloc(array_size(entries, sizeof(mem->hpas[0])));
163173 if (!mem->hpas) {
164174 kfree(mem);
@@ -199,6 +209,23 @@ long mm_iommu_get(struct mm_struct *mm, unsigned long ua, unsigned long entries, · 34 unmodified lines
199209 }
200210 }
201211 populate:
212+ pageshift = PAGE_SHIFT;
213+ if (PageCompound(page)) {
214+ pte_t *pte;
215+ struct page *head = compound_head(page);
216+ unsigned int compshift = compound_order(head);
217+
218+ local_irq_save(flags); /* disables as well */
219+ pte = find_linux_pte(mm->pgd, ua, NULL, &pageshift);
220+ local_irq_restore(flags);
221+
222+ /* Double check it is still the same pinned page */
223+ if (pte && pte_page(*pte) == head &&
224+ pageshift == compshift)
225+ pageshift = max_t(unsigned int, pageshift,
226+ PAGE_SHIFT);
227+ }
228+ mem->pageshift = min(mem->pageshift, pageshift);
202229 mem->hpas[i] = page_to_pfn(page) << PAGE_SHIFT;
203230 }
204231
@@ -349,7 +376,7 @@ struct mm_iommu_table_group_mem_t *mm_iommu_find(struct mm_struct *mm, · 144 unmodified lines
349376 EXPORT_SYMBOL_GPL(mm_iommu_find);
350377
351378 long mm_iommu_ua_to_hpa(struct mm_iommu_table_group_mem_t *mem,
352− unsigned long ua, unsigned long *hpa)
379+ unsigned long ua, unsigned int pageshift, unsigned long *hpa)
353380 {
354381 const long entry = (ua - mem->ua) >> PAGE_SHIFT;
355382 u64 *va = &mem->hpas[entry];
@@ -357,6 +384,9 @@ long mm_iommu_ua_to_hpa(struct mm_iommu_table_group_mem_t *mem, · 1 unmodified line
357384 if (entry >= mem->entries)
358385 return -EFAULT;
359386
387+ if (pageshift > mem->pageshift)
388+ return -EFAULT;
389+
360390 *hpa = *va | (ua & ~PAGE_MASK);
361391
362392 return 0;
@@ -364,7 +394,7 @@ long mm_iommu_ua_to_hpa(struct mm_iommu_table_group_mem_t *mem, · 1 unmodified line
364394 EXPORT_SYMBOL_GPL(mm_iommu_ua_to_hpa);
365395
366396 long mm_iommu_ua_to_hpa_rm(struct mm_iommu_table_group_mem_t *mem,
367− unsigned long ua, unsigned long *hpa)
397+ unsigned long ua, unsigned int pageshift, unsigned long *hpa)
368398 {
369399 const long entry = (ua - mem->ua) >> PAGE_SHIFT;
370400 void *va = &mem->hpas[entry];
@@ -373,6 +403,9 @@ long mm_iommu_ua_to_hpa_rm(struct mm_iommu_table_group_mem_t *mem, · 2 unmodified lines
373403 if (entry >= mem->entries)
374404 return -EFAULT;
375405
406+ if (pageshift > mem->pageshift)
407+ return -EFAULT;
408+
376409 pa = (void *) vmalloc_to_phys(va);
377410 if (!pa)
378411 return -EFAULT;
arch/powerpc/mm/pgtable-book3s64.c+12−0
@@ -409,6 +409,18 @@ static inline void pgtable_free(void *table, int index) · 408 unmodified lines
409409 case PUD_INDEX:
410410 kmem_cache_free(PGT_CACHE(PUD_CACHE_INDEX), table);
411411 break;
412+#if defined(CONFIG_PPC_4K_PAGES) && defined(CONFIG_HUGETLB_PAGE)
413+ /* 16M hugepd directory at pud level */
414+ case HTLB_16M_INDEX:
415+ BUILD_BUG_ON(H_16M_CACHE_INDEX <= 0);
416+ kmem_cache_free(PGT_CACHE(H_16M_CACHE_INDEX), table);
417+ break;
418+ /* 16G hugepd directory at the pgd level */
419+ case HTLB_16G_INDEX:
420+ BUILD_BUG_ON(H_16G_CACHE_INDEX <= 0);
421+ kmem_cache_free(PGT_CACHE(H_16G_CACHE_INDEX), table);
422+ break;
423+#endif
412424 /* We don't free pgd table via RCU callback */
413425 default:
414426 BUG();
arch/powerpc/mm/subpage-prot.c+0−4
@@ -186,9 +186,6 @@ static void subpage_mark_vma_nohuge(struct mm_struct *mm, unsigned long addr, · 185 unmodified lines
186186 * in a 2-bit field won't allow writes to a page that is otherwise
187187 * write-protected.
188188 */
189−#pragma GCC diagnostic push
190−#pragma GCC diagnostic ignored "-Wpragmas"
191−#pragma GCC diagnostic ignored "-Wattribute-alias"
192189 SYSCALL_DEFINE3(subpage_prot, unsigned long, addr,
193190 unsigned long, len, u32 __user *, map)
194191 {
@@ -272,4 +269,3 @@ SYSCALL_DEFINE3(subpage_prot, unsigned long, addr, · 77 unmodified lines
272269 up_write(&mm->mmap_sem);
273270 return err;
274271 }
275−#pragma GCC diagnostic pop
arch/powerpc/mm/tlb-radix.c+77−21
@@ -689,22 +689,17 @@ EXPORT_SYMBOL(radix__flush_tlb_kernel_range); · 688 unmodified lines
689689 static unsigned long tlb_single_page_flush_ceiling __read_mostly = 33;
690690 static unsigned long tlb_local_single_page_flush_ceiling __read_mostly = POWER9_TLB_SETS_RADIX * 2;
691691
692−void radix__flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
693− unsigned long end)
692+static inline void __radix__flush_tlb_range(struct mm_struct *mm,
693+ unsigned long start, unsigned long end,
694+ bool flush_all_sizes)
694695
695696 {
696− struct mm_struct *mm = vma->vm_mm;
697697 unsigned long pid;
698698 unsigned int page_shift = mmu_psize_defs[mmu_virtual_psize].shift;
699699 unsigned long page_size = 1UL << page_shift;
700700 unsigned long nr_pages = (end - start) >> page_shift;
701701 bool local, full;
702702
703−#ifdef CONFIG_HUGETLB_PAGE
704− if (is_vm_hugetlb_page(vma))
705− return radix__flush_hugetlb_tlb_range(vma, start, end);
706−#endif
707−
708703 pid = mm->context.id;
709704 if (unlikely(pid == MMU_NO_CONTEXT))
710705 return;
@@ -738,37 +733,64 @@ is_local: · 27 unmodified lines
738733 _tlbie_pid(pid, RIC_FLUSH_TLB);
739734 }
740735 } else {
741− bool hflush = false;
736+ bool hflush = flush_all_sizes;
737+ bool gflush = flush_all_sizes;
742738 unsigned long hstart, hend;
739+ unsigned long gstart, gend;
743740
744−#ifdef CONFIG_TRANSPARENT_HUGEPAGE
745− hstart = (start + HPAGE_PMD_SIZE - 1) >> HPAGE_PMD_SHIFT;
746− hend = end >> HPAGE_PMD_SHIFT;
747− if (hstart < hend) {
748− hstart <<= HPAGE_PMD_SHIFT;
749− hend <<= HPAGE_PMD_SHIFT;
741+ if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE))
750742 hflush = true;
743+
744+ if (hflush) {
745+ hstart = (start + PMD_SIZE - 1) & PMD_MASK;
746+ hend = end & PMD_MASK;
747+ if (hstart == hend)
748+ hflush = false;
749+ }
750+
751+ if (gflush) {
752+ gstart = (start + PUD_SIZE - 1) & PUD_MASK;
753+ gend = end & PUD_MASK;
754+ if (gstart == gend)
755+ gflush = false;
751756 }
752−#endif
753757
754758 asm volatile("ptesync": : :"memory");
755759 if (local) {
756760 __tlbiel_va_range(start, end, pid, page_size, mmu_virtual_psize);
757761 if (hflush)
758762 __tlbiel_va_range(hstart, hend, pid,
759− HPAGE_PMD_SIZE, MMU_PAGE_2M);
763+ PMD_SIZE, MMU_PAGE_2M);
764+ if (gflush)
765+ __tlbiel_va_range(gstart, gend, pid,
766+ PUD_SIZE, MMU_PAGE_1G);
760767 asm volatile("ptesync": : :"memory");
761768 } else {
762769 __tlbie_va_range(start, end, pid, page_size, mmu_virtual_psize);
763770 if (hflush)
764771 __tlbie_va_range(hstart, hend, pid,
765− HPAGE_PMD_SIZE, MMU_PAGE_2M);
772+ PMD_SIZE, MMU_PAGE_2M);
773+ if (gflush)
774+ __tlbie_va_range(gstart, gend, pid,
775+ PUD_SIZE, MMU_PAGE_1G);
766776 fixup_tlbie();
767777 asm volatile("eieio; tlbsync; ptesync": : :"memory");
768778 }
769779 }
770780 preempt_enable();
771781 }
782+
783+void radix__flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
784+ unsigned long end)
785+
786+{
787+#ifdef CONFIG_HUGETLB_PAGE
788+ if (is_vm_hugetlb_page(vma))
789+ return radix__flush_hugetlb_tlb_range(vma, start, end);
790+#endif
791+
792+ __radix__flush_tlb_range(vma->vm_mm, start, end, false);
793+}
772794 EXPORT_SYMBOL(radix__flush_tlb_range);
773795
774796 static int radix_get_mmu_psize(int page_size)
@@ -837,6 +859,8 @@ void radix__tlb_flush(struct mmu_gather *tlb) · 62 unmodified lines
837859 int psize = 0;
838860 struct mm_struct *mm = tlb->mm;
839861 int page_size = tlb->page_size;
862+ unsigned long start = tlb->start;
863+ unsigned long end = tlb->end;
840864
841865 /*
842866 * if page size is not something we understand, do a full mm flush
@@ -847,15 +871,45 @@ void radix__tlb_flush(struct mmu_gather *tlb) · 4 unmodified lines
847871 */
848872 if (tlb->fullmm) {
849873 __flush_all_mm(mm, true);
874+#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLB_PAGE)
875+ } else if (mm_tlb_flush_nested(mm)) {
876+ /*
877+ * If there is a concurrent invalidation that is clearing ptes,
878+ * then it's possible this invalidation will miss one of those
879+ * cleared ptes and miss flushing the TLB. If this invalidate
880+ * returns before the other one flushes TLBs, that can result
881+ * in it returning while there are still valid TLBs inside the
882+ * range to be invalidated.
883+ *
884+ * See mm/memory.c:tlb_finish_mmu() for more details.
885+ *
886+ * The solution to this is ensure the entire range is always
887+ * flushed here. The problem for powerpc is that the flushes
888+ * are page size specific, so this "forced flush" would not
889+ * do the right thing if there are a mix of page sizes in
890+ * the range to be invalidated. So use __flush_tlb_range
891+ * which invalidates all possible page sizes in the range.
892+ *
893+ * PWC flush probably is not be required because the core code
894+ * shouldn't free page tables in this path, but accounting
895+ * for the possibility makes us a bit more robust.
896+ *
897+ * need_flush_all is an uncommon case because page table
898+ * teardown should be done with exclusive locks held (but
899+ * after locks are dropped another invalidate could come
900+ * in), it could be optimized further if necessary.
901+ */
902+ if (!tlb->need_flush_all)
903+ __radix__flush_tlb_range(mm, start, end, true);
904+ else
905+ radix__flush_all_mm(mm);
906+#endif
850907 } else if ( (psize = radix_get_mmu_psize(page_size)) == -1) {
851908 if (!tlb->need_flush_all)
852909 radix__flush_tlb_mm(mm);
853910 else
854911 radix__flush_all_mm(mm);
855912 } else {
856− unsigned long start = tlb->start;
857− unsigned long end = tlb->end;
858−
859913 if (!tlb->need_flush_all)
860914 radix__flush_tlb_range_psize(mm, start, end, psize);
861915 else
@@ -1043,6 +1097,8 @@ extern void radix_kvm_prefetch_workaround(struct mm_struct *mm) · 181 unmodified lines
10431097 for (; sib <= cpu_last_thread_sibling(cpu) && !flush; sib++) {
10441098 if (sib == cpu)
10451099 continue;
1100+ if (!cpu_possible(sib))
1101+ continue;
10461102 if (paca_ptrs[sib]->kvm_hstate.kvm_vcpu)
10471103 flush = true;
10481104 }
arch/powerpc/net/bpf_jit_comp64.c+5−24
@@ -286,6 +286,7 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, · 285 unmodified lines
286286 u64 imm64;
287287 u8 *func;
288288 u32 true_cond;
289+ u32 tmp_idx;
289290
290291 /*
291292 * addrs[] maps a BPF bytecode address into a real offset from
@@ -637,11 +638,7 @@ emit_clear: · 345 unmodified lines
637638 case BPF_STX | BPF_XADD | BPF_W:
638639 /* Get EA into TMP_REG_1 */
639640 PPC_ADDI(b2p[TMP_REG_1], dst_reg, off);
640− /* error if EA is not word-aligned */
641− PPC_ANDI(b2p[TMP_REG_2], b2p[TMP_REG_1], 0x03);
642− PPC_BCC_SHORT(COND_EQ, (ctx->idx * 4) + 12);
643− PPC_LI(b2p[BPF_REG_0], 0);
644− PPC_JMP(exit_addr);
641+ tmp_idx = ctx->idx * 4;
645642 /* load value from memory into TMP_REG_2 */
646643 PPC_BPF_LWARX(b2p[TMP_REG_2], 0, b2p[TMP_REG_1], 0);
647644 /* add value from src_reg into this */
@@ -649,32 +646,16 @@ emit_clear: · 1 unmodified line
649646 /* store result back */
650647 PPC_BPF_STWCX(b2p[TMP_REG_2], 0, b2p[TMP_REG_1]);
651648 /* we're done if this succeeded */
652− PPC_BCC_SHORT(COND_EQ, (ctx->idx * 4) + (7*4));
653− /* otherwise, let's try once more */
654− PPC_BPF_LWARX(b2p[TMP_REG_2], 0, b2p[TMP_REG_1], 0);
655− PPC_ADD(b2p[TMP_REG_2], b2p[TMP_REG_2], src_reg);
656− PPC_BPF_STWCX(b2p[TMP_REG_2], 0, b2p[TMP_REG_1]);
657− /* exit if the store was not successful */
658− PPC_LI(b2p[BPF_REG_0], 0);
659− PPC_BCC(COND_NE, exit_addr);
649+ PPC_BCC_SHORT(COND_NE, tmp_idx);
660650 break;
661651 /* *(u64 *)(dst + off) += src */
662652 case BPF_STX | BPF_XADD | BPF_DW:
663653 PPC_ADDI(b2p[TMP_REG_1], dst_reg, off);
664− /* error if EA is not doubleword-aligned */
665− PPC_ANDI(b2p[TMP_REG_2], b2p[TMP_REG_1], 0x07);
666− PPC_BCC_SHORT(COND_EQ, (ctx->idx * 4) + (3*4));
667− PPC_LI(b2p[BPF_REG_0], 0);
668− PPC_JMP(exit_addr);
669− PPC_BPF_LDARX(b2p[TMP_REG_2], 0, b2p[TMP_REG_1], 0);
670− PPC_ADD(b2p[TMP_REG_2], b2p[TMP_REG_2], src_reg);
671− PPC_BPF_STDCX(b2p[TMP_REG_2], 0, b2p[TMP_REG_1]);
672− PPC_BCC_SHORT(COND_EQ, (ctx->idx * 4) + (7*4));
654+ tmp_idx = ctx->idx * 4;
673655 PPC_BPF_LDARX(b2p[TMP_REG_2], 0, b2p[TMP_REG_1], 0);
674656 PPC_ADD(b2p[TMP_REG_2], b2p[TMP_REG_2], src_reg);
675657 PPC_BPF_STDCX(b2p[TMP_REG_2], 0, b2p[TMP_REG_1]);
676− PPC_LI(b2p[BPF_REG_0], 0);
677− PPC_BCC(COND_NE, exit_addr);
658+ PPC_BCC_SHORT(COND_NE, tmp_idx);
678659 break;
679660
680661 /*
arch/powerpc/platforms/powermac/time.c+20−9
@@ -42,7 +42,11 @@ · 41 unmodified lines
4242 #define DBG(x...)
4343 #endif
4444
45−/* Apparently the RTC stores seconds since 1 Jan 1904 */
45+/*
46+ * Offset between Unix time (1970-based) and Mac time (1904-based). Cuda and PMU
47+ * times wrap in 2040. If we need to handle later times, the read_time functions
48+ * need to be changed to interpret wrapped times as post-2040.
49+ */
4650 #define RTC_OFFSET 2082844800
4751
4852 /*
@@ -97,8 +101,11 @@ static time64_t cuda_get_time(void) · 48 unmodified lines
97101 if (req.reply_len != 7)
98102 printk(KERN_ERR "cuda_get_time: got %d byte reply\n",
99103 req.reply_len);
100− now = (req.reply[3] << 24) + (req.reply[4] << 16)
101− + (req.reply[5] << 8) + req.reply[6];
104+ now = (u32)((req.reply[3] << 24) + (req.reply[4] << 16) +
105+ (req.reply[5] << 8) + req.reply[6]);
106+ /* it's either after year 2040, or the RTC has gone backwards */
107+ WARN_ON(now < RTC_OFFSET);
108+
102109 return now - RTC_OFFSET;
103110 }
104111
@@ -106,10 +113,10 @@ static time64_t cuda_get_time(void) · 1 unmodified line
106113
107114 static int cuda_set_rtc_time(struct rtc_time *tm)
108115 {
109− time64_t nowtime;
116+ u32 nowtime;
110117 struct adb_request req;
111118
112− nowtime = rtc_tm_to_time64(tm) + RTC_OFFSET;
119+ nowtime = lower_32_bits(rtc_tm_to_time64(tm) + RTC_OFFSET);
113120 if (cuda_request(&req, NULL, 6, CUDA_PACKET, CUDA_SET_TIME,
114121 nowtime >> 24, nowtime >> 16, nowtime >> 8,
115122 nowtime) < 0)
@@ -140,8 +147,12 @@ static time64_t pmu_get_time(void) · 24 unmodified lines
140147 if (req.reply_len != 4)
141148 printk(KERN_ERR "pmu_get_time: got %d byte reply from PMU\n",
142149 req.reply_len);
143− now = (req.reply[0] << 24) + (req.reply[1] << 16)
144− + (req.reply[2] << 8) + req.reply[3];
150+ now = (u32)((req.reply[0] << 24) + (req.reply[1] << 16) +
151+ (req.reply[2] << 8) + req.reply[3]);
152+
153+ /* it's either after year 2040, or the RTC has gone backwards */
154+ WARN_ON(now < RTC_OFFSET);
155+
145156 return now - RTC_OFFSET;
146157 }
147158
@@ -149,10 +160,10 @@ static time64_t pmu_get_time(void) · 1 unmodified line
149160
150161 static int pmu_set_rtc_time(struct rtc_time *tm)
151162 {
152− time64_t nowtime;
163+ u32 nowtime;
153164 struct adb_request req;
154165
155− nowtime = rtc_tm_to_time64(tm) + RTC_OFFSET;
166+ nowtime = lower_32_bits(rtc_tm_to_time64(tm) + RTC_OFFSET);
156167 if (pmu_request(&req, NULL, 5, PMU_SET_RTC, nowtime >> 24,
157168 nowtime >> 16, nowtime >> 8, nowtime) < 0)
158169 return -ENXIO;
arch/powerpc/platforms/powernv/pci-ioda.c+2−1
@@ -46,6 +46,7 @@ · 45 unmodified lines
4646
4747 #include "powernv.h"
4848 #include "pci.h"
49+#include "../../../../drivers/pci/pci.h"
4950
5051 #define PNV_IODA1_M64_NUM 16 /* Number of M64 BARs */
5152 #define PNV_IODA1_M64_SEGS 8 /* Segments per M64 BAR */
@@ -3138,7 +3139,7 @@ static void pnv_pci_ioda_fixup_iov_resources(struct pci_dev *pdev) · 3086 unmodified lines
31383139 struct pci_dn *pdn;
31393140 int mul, total_vfs;
31403141
3141− if (!pdev->is_physfn || pdev->is_added)
3142+ if (!pdev->is_physfn || pci_dev_is_added(pdev))
31423143 return;
31433144
31443145 pdn = pci_get_pdn(pdev);
arch/powerpc/platforms/pseries/setup.c+2−1
@@ -71,6 +71,7 @@ · 70 unmodified lines
7171 #include <asm/security_features.h>
7272
7373 #include "pseries.h"
74+#include "../../../../drivers/pci/pci.h"
7475
7576 int CMO_PrPSP = -1;
7677 int CMO_SecPSP = -1;
@@ -664,7 +665,7 @@ static void pseries_pci_fixup_iov_resources(struct pci_dev *pdev) · 587 unmodified lines
664665 const int *indexes;
665666 struct device_node *dn = pci_device_to_OF_node(pdev);
666667
667− if (!pdev->is_physfn || pdev->is_added)
668+ if (!pdev->is_physfn || pci_dev_is_added(pdev))
668669 return;
669670 /*Firmware must support open sriov otherwise dont configure*/
670671 indexes = of_get_property(dn, "ibm,open-sriov-vf-bar-info", NULL);
arch/powerpc/xmon/xmon.c+2−2
@@ -2734,7 +2734,7 @@ generic_inst_dump(unsigned long adr, long count, int praddr, · 2733 unmodified lines
27342734 {
27352735 int nr, dotted;
27362736 unsigned long first_adr;
2737− unsigned long inst, last_inst = 0;
2737+ unsigned int inst, last_inst = 0;
27382738 unsigned char val[4];
27392739
27402740 dotted = 0;
@@ -2758,7 +2758,7 @@ generic_inst_dump(unsigned long adr, long count, int praddr, · 17 unmodified lines
27582758 dotted = 0;
27592759 last_inst = inst;
27602760 if (praddr)
2761− printf(REG" %.8lx", adr, inst);
2761+ printf(REG" %.8x", adr, inst);
27622762 printf("\t");
27632763 dump_func(inst, adr);
27642764 printf("\n");
arch/riscv/Kconfig+1−0
@@ -107,6 +107,7 @@ config ARCH_RV32I · 106 unmodified lines
107107 select GENERIC_LIB_ASHLDI3
108108 select GENERIC_LIB_ASHRDI3
109109 select GENERIC_LIB_LSHRDI3
110+ select GENERIC_LIB_UCMPDI2
110111
111112 config ARCH_RV64I
112113 bool "RV64I"
arch/riscv/include/uapi/asm/elf.h+7−2
@@ -21,8 +21,13 @@ typedef struct user_regs_struct elf_gregset_t; · 20 unmodified lines
2121
2222 typedef union __riscv_fp_state elf_fpregset_t;
2323
24−#define ELF_RISCV_R_SYM(r_info) ((r_info) >> 32)
25−#define ELF_RISCV_R_TYPE(r_info) ((r_info) & 0xffffffff)
24+#if __riscv_xlen == 64
25+#define ELF_RISCV_R_SYM(r_info) ELF64_R_SYM(r_info)
26+#define ELF_RISCV_R_TYPE(r_info) ELF64_R_TYPE(r_info)
27+#else
28+#define ELF_RISCV_R_SYM(r_info) ELF32_R_SYM(r_info)
29+#define ELF_RISCV_R_TYPE(r_info) ELF32_R_TYPE(r_info)
30+#endif
2631
2732 /*
2833 * RISC-V relocation types
arch/riscv/kernel/irq.c+0−4
@@ -16,10 +16,6 @@ · 15 unmodified lines
1616 #include <linux/irqchip.h>
1717 #include <linux/irqdomain.h>
1818
19−#ifdef CONFIG_RISCV_INTC
20−#include <linux/irqchip/irq-riscv-intc.h>
21−#endif
22−
2319 void __init init_IRQ(void)
2420 {
2521 irqchip_init();
arch/riscv/kernel/module.c+13−13
@@ -37,7 +37,7 @@ static int apply_r_riscv_64_rela(struct module *me, u32 *location, Elf_Addr v) · 36 unmodified lines
3737 static int apply_r_riscv_branch_rela(struct module *me, u32 *location,
3838 Elf_Addr v)
3939 {
40− s64 offset = (void *)v - (void *)location;
40+ ptrdiff_t offset = (void *)v - (void *)location;
4141 u32 imm12 = (offset & 0x1000) << (31 - 12);
4242 u32 imm11 = (offset & 0x800) >> (11 - 7);
4343 u32 imm10_5 = (offset & 0x7e0) << (30 - 10);
@@ -50,7 +50,7 @@ static int apply_r_riscv_branch_rela(struct module *me, u32 *location, · 6 unmodified lines
5050 static int apply_r_riscv_jal_rela(struct module *me, u32 *location,
5151 Elf_Addr v)
5252 {
53− s64 offset = (void *)v - (void *)location;
53+ ptrdiff_t offset = (void *)v - (void *)location;
5454 u32 imm20 = (offset & 0x100000) << (31 - 20);
5555 u32 imm19_12 = (offset & 0xff000);
5656 u32 imm11 = (offset & 0x800) << (20 - 11);
@@ -63,7 +63,7 @@ static int apply_r_riscv_jal_rela(struct module *me, u32 *location, · 6 unmodified lines
6363 static int apply_r_riscv_rcv_branch_rela(struct module *me, u32 *location,
6464 Elf_Addr v)
6565 {
66− s64 offset = (void *)v - (void *)location;
66+ ptrdiff_t offset = (void *)v - (void *)location;
6767 u16 imm8 = (offset & 0x100) << (12 - 8);
6868 u16 imm7_6 = (offset & 0xc0) >> (6 - 5);
6969 u16 imm5 = (offset & 0x20) >> (5 - 2);
@@ -78,7 +78,7 @@ static int apply_r_riscv_rcv_branch_rela(struct module *me, u32 *location, · 8 unmodified lines
7878 static int apply_r_riscv_rvc_jump_rela(struct module *me, u32 *location,
7979 Elf_Addr v)
8080 {
81− s64 offset = (void *)v - (void *)location;
81+ ptrdiff_t offset = (void *)v - (void *)location;
8282 u16 imm11 = (offset & 0x800) << (12 - 11);
8383 u16 imm10 = (offset & 0x400) >> (10 - 8);
8484 u16 imm9_8 = (offset & 0x300) << (12 - 11);
@@ -96,7 +96,7 @@ static int apply_r_riscv_rvc_jump_rela(struct module *me, u32 *location, · 11 unmodified lines
9696 static int apply_r_riscv_pcrel_hi20_rela(struct module *me, u32 *location,
9797 Elf_Addr v)
9898 {
99− s64 offset = (void *)v - (void *)location;
99+ ptrdiff_t offset = (void *)v - (void *)location;
100100 s32 hi20;
101101
102102 if (offset != (s32)offset) {
@@ -178,7 +178,7 @@ static int apply_r_riscv_lo12_s_rela(struct module *me, u32 *location, · 75 unmodified lines
178178 static int apply_r_riscv_got_hi20_rela(struct module *me, u32 *location,
179179 Elf_Addr v)
180180 {
181− s64 offset = (void *)v - (void *)location;
181+ ptrdiff_t offset = (void *)v - (void *)location;
182182 s32 hi20;
183183
184184 /* Always emit the got entry */
@@ -200,7 +200,7 @@ static int apply_r_riscv_got_hi20_rela(struct module *me, u32 *location, · 15 unmodified lines
200200 static int apply_r_riscv_call_plt_rela(struct module *me, u32 *location,
201201 Elf_Addr v)
202202 {
203− s64 offset = (void *)v - (void *)location;
203+ ptrdiff_t offset = (void *)v - (void *)location;
204204 s32 fill_v = offset;
205205 u32 hi20, lo12;
206206
@@ -227,7 +227,7 @@ static int apply_r_riscv_call_plt_rela(struct module *me, u32 *location, · 20 unmodified lines
227227 static int apply_r_riscv_call_rela(struct module *me, u32 *location,
228228 Elf_Addr v)
229229 {
230− s64 offset = (void *)v - (void *)location;
230+ ptrdiff_t offset = (void *)v - (void *)location;
231231 s32 fill_v = offset;
232232 u32 hi20, lo12;
233233
@@ -263,14 +263,14 @@ static int apply_r_riscv_align_rela(struct module *me, u32 *location, · 29 unmodified lines
263263 static int apply_r_riscv_add32_rela(struct module *me, u32 *location,
264264 Elf_Addr v)
265265 {
266− *(u32 *)location += (*(u32 *)v);
266+ *(u32 *)location += (u32)v;
267267 return 0;
268268 }
269269
270270 static int apply_r_riscv_sub32_rela(struct module *me, u32 *location,
271271 Elf_Addr v)
272272 {
273− *(u32 *)location -= (*(u32 *)v);
273+ *(u32 *)location -= (u32)v;
274274 return 0;
275275 }
276276
@@ -347,7 +347,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, · 70 unmodified lines
347347 unsigned int j;
348348
349349 for (j = 0; j < sechdrs[relsec].sh_size / sizeof(*rel); j++) {
350− u64 hi20_loc =
350+ unsigned long hi20_loc =
351351 sechdrs[sechdrs[relsec].sh_info].sh_addr
352352 + rel[j].r_offset;
353353 u32 hi20_type = ELF_RISCV_R_TYPE(rel[j].r_info);
@@ -360,12 +360,12 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, · 6 unmodified lines
360360 Elf_Sym *hi20_sym =
361361 (Elf_Sym *)sechdrs[symindex].sh_addr
362362 + ELF_RISCV_R_SYM(rel[j].r_info);
363− u64 hi20_sym_val =
363+ unsigned long hi20_sym_val =
364364 hi20_sym->st_value
365365 + rel[j].r_addend;
366366
367367 /* Calculate lo12 */
368− u64 offset = hi20_sym_val - hi20_loc;
368+ size_t offset = hi20_sym_val - hi20_loc;
369369 if (IS_ENABLED(CONFIG_MODULE_SECTIONS)
370370 && hi20_type == R_RISCV_GOT_HI20) {
371371 offset = module_emit_got_entry(
arch/riscv/kernel/ptrace.c+1−1
@@ -50,7 +50,7 @@ static int riscv_gpr_set(struct task_struct *target, · 49 unmodified lines
5050 struct pt_regs *regs;
5151
5252 regs = task_pt_regs(target);
53− ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &regs, 0, -1);
53+ ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1);
5454 return ret;
5555 }
5656
arch/riscv/kernel/setup.c+0−5
@@ -220,8 +220,3 @@ void __init setup_arch(char **cmdline_p) · 219 unmodified lines
220220 riscv_fill_hwcap();
221221 }
222222
223−static int __init riscv_device_init(void)
224−{
225− return of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
226−}
227−subsys_initcall_sync(riscv_device_init);
arch/riscv/mm/init.c+2−0
@@ -28,7 +28,9 @@ static void __init zone_sizes_init(void) · 27 unmodified lines
2828 {
2929 unsigned long max_zone_pfns[MAX_NR_ZONES] = { 0, };
3030
31+#ifdef CONFIG_ZONE_DMA32
3132 max_zone_pfns[ZONE_DMA32] = PFN_DOWN(min(4UL * SZ_1G, max_low_pfn));
33+#endif
3234 max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
3335
3436 free_area_init_nodes(max_zone_pfns);
arch/s390/Kconfig+2−2
@@ -106,7 +106,6 @@ config S390 · 105 unmodified lines
106106 select ARCH_USE_BUILTIN_BSWAP
107107 select ARCH_USE_CMPXCHG_LOCKREF
108108 select ARCH_WANTS_DYNAMIC_TASK_STRUCT
109− select ARCH_WANTS_UBSAN_NO_NULL
110109 select ARCH_WANT_IPC_PARSE_VERSION
111110 select BUILDTIME_EXTABLE_SORT
112111 select CLONE_BACKWARDS2
@@ -140,7 +139,7 @@ config S390 · 27 unmodified lines
140139 select HAVE_FUNCTION_GRAPH_TRACER
141140 select HAVE_FUNCTION_TRACER
142141 select HAVE_FUTEX_CMPXCHG if FUTEX
143− select HAVE_GCC_PLUGINS
142+ select HAVE_GCC_PLUGINS if BROKEN
144143 select HAVE_KERNEL_BZIP2
145144 select HAVE_KERNEL_GZIP
146145 select HAVE_KERNEL_LZ4
@@ -160,6 +159,7 @@ config S390 · 13 unmodified lines
160159 select HAVE_OPROFILE
161160 select HAVE_PERF_EVENTS
162161 select HAVE_REGS_AND_STACK_ACCESS_API
162+ select HAVE_RSEQ
163163 select HAVE_SYSCALL_TRACEPOINTS
164164 select HAVE_VIRT_CPU_ACCOUNTING
165165 select MODULES_USE_ELF_RELA
arch/s390/include/asm/css_chars.h+32−30
@@ -6,36 +6,38 @@ · 5 unmodified lines
66
77 struct css_general_char {
88 u64 : 12;
9− u32 dynio : 1; /* bit 12 */
10− u32 : 4;
11− u32 eadm : 1; /* bit 17 */
12− u32 : 23;
13− u32 aif : 1; /* bit 41 */
14− u32 : 3;
15− u32 mcss : 1; /* bit 45 */
16− u32 fcs : 1; /* bit 46 */
17− u32 : 1;
18− u32 ext_mb : 1; /* bit 48 */
19− u32 : 7;
20− u32 aif_tdd : 1; /* bit 56 */
21− u32 : 1;
22− u32 qebsm : 1; /* bit 58 */
23− u32 : 2;
24− u32 aiv : 1; /* bit 61 */
25− u32 : 5;
26− u32 aif_osa : 1; /* bit 67 */
27− u32 : 12;
28− u32 eadm_rf : 1; /* bit 80 */
29− u32 : 1;
30− u32 cib : 1; /* bit 82 */
31− u32 : 5;
32− u32 fcx : 1; /* bit 88 */
33− u32 : 19;
34− u32 alt_ssi : 1; /* bit 108 */
35− u32 : 1;
36− u32 narf : 1; /* bit 110 */
37− u32 : 12;
38− u32 util_str : 1;/* bit 123 */
9+ u64 dynio : 1; /* bit 12 */
10+ u64 : 4;
11+ u64 eadm : 1; /* bit 17 */
12+ u64 : 23;
13+ u64 aif : 1; /* bit 41 */
14+ u64 : 3;
15+ u64 mcss : 1; /* bit 45 */
16+ u64 fcs : 1; /* bit 46 */
17+ u64 : 1;
18+ u64 ext_mb : 1; /* bit 48 */
19+ u64 : 7;
20+ u64 aif_tdd : 1; /* bit 56 */
21+ u64 : 1;
22+ u64 qebsm : 1; /* bit 58 */
23+ u64 : 2;
24+ u64 aiv : 1; /* bit 61 */
25+ u64 : 2;
26+
27+ u64 : 3;
28+ u64 aif_osa : 1; /* bit 67 */
29+ u64 : 12;
30+ u64 eadm_rf : 1; /* bit 80 */
31+ u64 : 1;
32+ u64 cib : 1; /* bit 82 */
33+ u64 : 5;
34+ u64 fcx : 1; /* bit 88 */
35+ u64 : 19;
36+ u64 alt_ssi : 1; /* bit 108 */
37+ u64 : 1;
38+ u64 narf : 1; /* bit 110 */
39+ u64 : 12;
40+ u64 util_str : 1;/* bit 123 */
3941 } __packed;
4042
4143 extern struct css_general_char css_general_characteristics;
arch/s390/kernel/compat_wrapper.c+1−0
@@ -183,3 +183,4 @@ COMPAT_SYSCALL_WRAP2(s390_guarded_storage, int, command, struct gs_cb *, gs_cb); · 182 unmodified lines
183183 COMPAT_SYSCALL_WRAP5(statx, int, dfd, const char __user *, path, unsigned, flags, unsigned, mask, struct statx __user *, buffer);
184184 COMPAT_SYSCALL_WRAP4(s390_sthyi, unsigned long, code, void __user *, info, u64 __user *, rc, unsigned long, flags);
185185 COMPAT_SYSCALL_WRAP5(kexec_file_load, int, kernel_fd, int, initrd_fd, unsigned long, cmdline_len, const char __user *, cmdline_ptr, unsigned long, flags)
186+COMPAT_SYSCALL_WRAP4(rseq, struct rseq __user *, rseq, u32, rseq_len, int, flags, u32, sig)
arch/s390/kernel/entry.S+6−2
@@ -357,6 +357,10 @@ ENTRY(system_call) · 356 unmodified lines
357357 stg %r2,__PT_R2(%r11) # store return value
358358
359359 .Lsysc_return:
360+#ifdef CONFIG_DEBUG_RSEQ
361+ lgr %r2,%r11
362+ brasl %r14,rseq_syscall
363+#endif
360364 LOCKDEP_SYS_EXIT
361365 .Lsysc_tif:
362366 TSTMSK __PT_FLAGS(%r11),_PIF_WORK
@@ -1265,7 +1269,7 @@ cleanup_critical: · 902 unmodified lines
12651269 jl 0f
12661270 clg %r9,BASED(.Lcleanup_table+104) # .Lload_fpu_regs_end
12671271 jl .Lcleanup_load_fpu_regs
1268−0: BR_EX %r14
1272+0: BR_EX %r14,%r11
12691273
12701274 .align 8
12711275 .Lcleanup_table:
@@ -1301,7 +1305,7 @@ cleanup_critical: · 29 unmodified lines
13011305 ni __SIE_PROG0C+3(%r9),0xfe # no longer in SIE
13021306 lctlg %c1,%c1,__LC_USER_ASCE # load primary asce
13031307 larl %r9,sie_exit # skip forward to sie_exit
1304− BR_EX %r14
1308+ BR_EX %r14,%r11
13051309 #endif
13061310
13071311 .Lcleanup_system_call:
arch/s390/kernel/signal.c+2−1
@@ -498,7 +498,7 @@ void do_signal(struct pt_regs *regs) · 497 unmodified lines
498498 }
499499 /* No longer in a system call */
500500 clear_pt_regs_flag(regs, PIF_SYSCALL);
501−
501+ rseq_signal_deliver(&ksig, regs);
502502 if (is_compat_task())
503503 handle_signal32(&ksig, oldset, regs);
504504 else
@@ -537,4 +537,5 @@ void do_notify_resume(struct pt_regs *regs) · 32 unmodified lines
537537 {
538538 clear_thread_flag(TIF_NOTIFY_RESUME);
539539 tracehook_notify_resume(regs);
540+ rseq_handle_notify_resume(NULL, regs);
540541 }
arch/s390/kernel/syscalls/syscall.tbl+2−0
@@ -389,3 +389,5 @@ · 388 unmodified lines
389389 379 common statx sys_statx compat_sys_statx
390390 380 common s390_sthyi sys_s390_sthyi compat_sys_s390_sthyi
391391 381 common kexec_file_load sys_kexec_file_load compat_sys_kexec_file_load
392+382 common io_pgetevents sys_io_pgetevents compat_sys_io_pgetevents
393+383 common rseq sys_rseq compat_sys_rseq
arch/s390/mm/pgalloc.c+4−0
@@ -252,6 +252,8 @@ void page_table_free(struct mm_struct *mm, unsigned long *table) · 251 unmodified lines
252252 spin_unlock_bh(&mm->context.lock);
253253 if (mask != 0)
254254 return;
255+ } else {
256+ atomic_xor_bits(&page->_refcount, 3U << 24);
255257 }
256258
257259 pgtable_page_dtor(page);
@@ -304,6 +306,8 @@ static void __tlb_remove_table(void *_table) · 46 unmodified lines
304306 break;
305307 /* fallthrough */
306308 case 3: /* 4K page table with pgstes */
309+ if (mask & 3)
310+ atomic_xor_bits(&page->_refcount, 3 << 24);
307311 pgtable_page_dtor(page);
308312 __free_page(page);
309313 break;
arch/s390/net/bpf_jit_comp.c+1−0
@@ -1286,6 +1286,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp) · 1285 unmodified lines
12861286 goto free_addrs;
12871287 }
12881288 if (bpf_jit_prog(&jit, fp)) {
1289+ bpf_jit_binary_free(header);
12891290 fp = orig_fp;
12901291 goto free_addrs;
12911292 }
arch/sparc/include/asm/Kbuild+1−0
@@ -13,6 +13,7 @@ generic-y += local64.h · 12 unmodified lines
1313 generic-y += mcs_spinlock.h
1414 generic-y += mm-arch-hooks.h
1515 generic-y += module.h
16+generic-y += msi.h
1617 generic-y += preempt.h
1718 generic-y += rwsem.h
1819 generic-y += serial.h
arch/sparc/include/asm/msi.h+0−32
@@ -1,32 +0,0 @@
1−/* SPDX-License-Identifier: GPL-2.0 */
2−/*
3− * msi.h: Defines specific to the MBus - Sbus - Interface.
4− *
5− * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
6− * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
7− */
8−
9−#ifndef _SPARC_MSI_H
10−#define _SPARC_MSI_H
11−
12−/*
13− * Locations of MSI Registers.
14− */
15−#define MSI_MBUS_ARBEN 0xe0001008 /* MBus Arbiter Enable register */
16−
17−/*
18− * Useful bits in the MSI Registers.
19− */
20−#define MSI_ASYNC_MODE 0x80000000 /* Operate the MSI asynchronously */
21−
22−
23−static inline void msi_set_sync(void)
24−{
25− __asm__ __volatile__ ("lda [%0] %1, %%g3\n\t"
26− "andn %%g3, %2, %%g3\n\t"
27− "sta %%g3, [%0] %1\n\t" : :
28− "r" (MSI_MBUS_ARBEN),
29− "i" (ASI_M_CTL), "r" (MSI_ASYNC_MODE) : "g3");
30−}
31−
32−#endif /* !(_SPARC_MSI_H) */
arch/sparc/kernel/time_64.c+1−1
@@ -814,7 +814,7 @@ static void __init get_tick_patch(void) · 813 unmodified lines
814814 }
815815 }
816816
817−static void init_tick_ops(struct sparc64_tick_ops *ops)
817+static void __init init_tick_ops(struct sparc64_tick_ops *ops)
818818 {
819819 unsigned long freq, quotient, tick;
820820
arch/sparc/mm/srmmu.c+19−1
@@ -37,7 +37,6 @@ · 36 unmodified lines
3737 #include <asm/mbus.h>
3838 #include <asm/page.h>
3939 #include <asm/asi.h>
40−#include <asm/msi.h>
4140 #include <asm/smp.h>
4241 #include <asm/io.h>
4342
@@ -116,6 +115,25 @@ static inline void srmmu_ctxd_set(ctxd_t *ctxp, pgd_t *pgdp) · 72 unmodified lines
116115 set_pte((pte_t *)ctxp, pte);
117116 }
118117
118+/*
119+ * Locations of MSI Registers.
120+ */
121+#define MSI_MBUS_ARBEN 0xe0001008 /* MBus Arbiter Enable register */
122+
123+/*
124+ * Useful bits in the MSI Registers.
125+ */
126+#define MSI_ASYNC_MODE 0x80000000 /* Operate the MSI asynchronously */
127+
128+static void msi_set_sync(void)
129+{
130+ __asm__ __volatile__ ("lda [%0] %1, %%g3\n\t"
131+ "andn %%g3, %2, %%g3\n\t"
132+ "sta %%g3, [%0] %1\n\t" : :
133+ "r" (MSI_MBUS_ARBEN),
134+ "i" (ASI_M_CTL), "r" (MSI_ASYNC_MODE) : "g3");
135+}
136+
119137 void pmd_set(pmd_t *pmdp, pte_t *ptep)
120138 {
121139 unsigned long ptp; /* Physical address, shifted right by 4 */
arch/x86/Kconfig+1−1
@@ -63,7 +63,7 @@ config X86 · 62 unmodified lines
6363 select ARCH_HAS_PTE_SPECIAL
6464 select ARCH_HAS_REFCOUNT
6565 select ARCH_HAS_UACCESS_FLUSHCACHE if X86_64
66− select ARCH_HAS_UACCESS_MCSAFE if X86_64
66+ select ARCH_HAS_UACCESS_MCSAFE if X86_64 && X86_MCE
6767 select ARCH_HAS_SET_MEMORY
6868 select ARCH_HAS_SG_CHAIN
6969 select ARCH_HAS_STRICT_KERNEL_RWX
arch/x86/Makefile+0−6
@@ -258,11 +258,6 @@ archscripts: scripts_basic · 257 unmodified lines
258258 archheaders:
259259 $(Q)$(MAKE) $(build)=arch/x86/entry/syscalls all
260260
261−archprepare:
262−ifeq ($(CONFIG_KEXEC_FILE),y)
263− $(Q)$(MAKE) $(build)=arch/x86/purgatory arch/x86/purgatory/kexec-purgatory.c
264−endif
265−
266261 ###
267262 # Kernel objects
268263
@@ -327,7 +322,6 @@ archclean: · 58 unmodified lines
327322 $(Q)rm -rf $(objtree)/arch/x86_64
328323 $(Q)$(MAKE) $(clean)=$(boot)
329324 $(Q)$(MAKE) $(clean)=arch/x86/tools
330− $(Q)$(MAKE) $(clean)=arch/x86/purgatory
331325
332326 define archhelp
333327 echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)'
arch/x86/boot/compressed/Makefile+6−2
@@ -106,9 +106,13 @@ define cmd_check_data_rel · 105 unmodified lines
106106 done
107107 endef
108108
109+# We need to run two commands under "if_changed", so merge them into a
110+# single invocation.
111+quiet_cmd_check-and-link-vmlinux = LD $@
112+ cmd_check-and-link-vmlinux = $(cmd_check_data_rel); $(cmd_ld)
113+
109114 $(obj)/vmlinux: $(vmlinux-objs-y) FORCE
110− $(call if_changed,check_data_rel)
111− $(call if_changed,ld)
115+ $(call if_changed,check-and-link-vmlinux)
112116
113117 OBJCOPYFLAGS_vmlinux.bin := -R .comment -S
114118 $(obj)/vmlinux.bin: vmlinux FORCE
arch/x86/boot/compressed/eboot.c+3−9
@@ -114,18 +114,12 @@ __setup_efi_pci(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom) · 113 unmodified lines
114114 struct pci_setup_rom *rom = NULL;
115115 efi_status_t status;
116116 unsigned long size;
117− uint64_t attributes, romsize;
117+ uint64_t romsize;
118118 void *romimage;
119119
120− status = efi_call_proto(efi_pci_io_protocol, attributes, pci,
121− EfiPciIoAttributeOperationGet, 0, 0,
122− &attributes);
123− if (status != EFI_SUCCESS)
124− return status;
125−
126120 /*
127− * Some firmware images contain EFI function pointers at the place where the
128− * romimage and romsize fields are supposed to be. Typically the EFI
121+ * Some firmware images contain EFI function pointers at the place where
122+ * the romimage and romsize fields are supposed to be. Typically the EFI
129123 * code is mapped at high addresses, translating to an unrealistically
130124 * large romsize. The UEFI spec limits the size of option ROMs to 16
131125 * MiB so we reject any ROMs over 16 MiB in size to catch this.
arch/x86/boot/compressed/pgtable_64.c+55−18
@@ -1,3 +1,4 @@
1+#include <asm/e820/types.h>
12 #include <asm/processor.h>
23 #include "pgtable.h"
34 #include "../string.h"
@@ -34,10 +35,62 @@ unsigned long *trampoline_32bit __section(.data); · 30 unmodified lines
3435 extern struct boot_params *boot_params;
3536 int cmdline_find_option_bool(const char *option);
3637
38+static unsigned long find_trampoline_placement(void)
39+{
40+ unsigned long bios_start, ebda_start;
41+ unsigned long trampoline_start;
42+ struct boot_e820_entry *entry;
43+ int i;
44+
45+ /*
46+ * Find a suitable spot for the trampoline.
47+ * This code is based on reserve_bios_regions().
48+ */
49+
50+ ebda_start = *(unsigned short *)0x40e << 4;
51+ bios_start = *(unsigned short *)0x413 << 10;
52+
53+ if (bios_start < BIOS_START_MIN || bios_start > BIOS_START_MAX)
54+ bios_start = BIOS_START_MAX;
55+
56+ if (ebda_start > BIOS_START_MIN && ebda_start < bios_start)
57+ bios_start = ebda_start;
58+
59+ bios_start = round_down(bios_start, PAGE_SIZE);
60+
61+ /* Find the first usable memory region under bios_start. */
62+ for (i = boot_params->e820_entries - 1; i >= 0; i--) {
63+ entry = &boot_params->e820_table[i];
64+
65+ /* Skip all entries above bios_start. */
66+ if (bios_start <= entry->addr)
67+ continue;
68+
69+ /* Skip non-RAM entries. */
70+ if (entry->type != E820_TYPE_RAM)
71+ continue;
72+
73+ /* Adjust bios_start to the end of the entry if needed. */
74+ if (bios_start > entry->addr + entry->size)
75+ bios_start = entry->addr + entry->size;
76+
77+ /* Keep bios_start page-aligned. */
78+ bios_start = round_down(bios_start, PAGE_SIZE);
79+
80+ /* Skip the entry if it's too small. */
81+ if (bios_start - TRAMPOLINE_32BIT_SIZE < entry->addr)
82+ continue;
83+
84+ break;
85+ }
86+
87+ /* Place the trampoline just below the end of low memory */
88+ return bios_start - TRAMPOLINE_32BIT_SIZE;
89+}
90+
3791 struct paging_config paging_prepare(void *rmode)
3892 {
3993 struct paging_config paging_config = {};
40− unsigned long bios_start, ebda_start;
4194
4295 /* Initialize boot_params. Required for cmdline_find_option_bool(). */
4396 boot_params = rmode;
@@ -61,23 +114,7 @@ struct paging_config paging_prepare(void *rmode) · 17 unmodified lines
61114 paging_config.l5_required = 1;
62115 }
63116
64− /*
65− * Find a suitable spot for the trampoline.
66− * This code is based on reserve_bios_regions().
67− */
68−
69− ebda_start = *(unsigned short *)0x40e << 4;
70− bios_start = *(unsigned short *)0x413 << 10;
71−
72− if (bios_start < BIOS_START_MIN || bios_start > BIOS_START_MAX)
73− bios_start = BIOS_START_MAX;
74−
75− if (ebda_start > BIOS_START_MIN && ebda_start < bios_start)
76− bios_start = ebda_start;
77−
78− /* Place the trampoline just below the end of low memory, aligned to 4k */
79− paging_config.trampoline_start = bios_start - TRAMPOLINE_32BIT_SIZE;
80− paging_config.trampoline_start = round_down(paging_config.trampoline_start, PAGE_SIZE);
117+ paging_config.trampoline_start = find_trampoline_placement();
81118
82119 trampoline_32bit = (unsigned long *)paging_config.trampoline_start;
83120
arch/x86/crypto/aegis128-aesni-asm.S+1−0
@@ -535,6 +535,7 @@ ENTRY(crypto_aegis128_aesni_enc_tail) · 534 unmodified lines
535535 movdqu STATE3, 0x40(STATEP)
536536
537537 FRAME_END
538+ ret
538539 ENDPROC(crypto_aegis128_aesni_enc_tail)
539540
540541 .macro decrypt_block a s0 s1 s2 s3 s4 i
arch/x86/crypto/aegis128-aesni-glue.c+4−8
@@ -375,16 +375,12 @@ static struct aead_alg crypto_aegis128_aesni_alg[] = { · 374 unmodified lines
375375 }
376376 };
377377
378−static const struct x86_cpu_id aesni_cpu_id[] = {
379− X86_FEATURE_MATCH(X86_FEATURE_AES),
380− X86_FEATURE_MATCH(X86_FEATURE_XMM2),
381− {}
382−};
383−MODULE_DEVICE_TABLE(x86cpu, aesni_cpu_id);
384−
385378 static int __init crypto_aegis128_aesni_module_init(void)
386379 {
387− if (!x86_match_cpu(aesni_cpu_id))
380+ if (!boot_cpu_has(X86_FEATURE_XMM2) ||
381+ !boot_cpu_has(X86_FEATURE_AES) ||
382+ !boot_cpu_has(X86_FEATURE_OSXSAVE) ||
383+ !cpu_has_xfeatures(XFEATURE_MASK_SSE, NULL))
388384 return -ENODEV;
389385
390386 return crypto_register_aeads(crypto_aegis128_aesni_alg,
arch/x86/crypto/aegis128l-aesni-asm.S+1−0
@@ -645,6 +645,7 @@ ENTRY(crypto_aegis128l_aesni_enc_tail) · 644 unmodified lines
645645 state_store0
646646
647647 FRAME_END
648+ ret
648649 ENDPROC(crypto_aegis128l_aesni_enc_tail)
649650
650651 /*
arch/x86/crypto/aegis128l-aesni-glue.c+4−8
@@ -375,16 +375,12 @@ static struct aead_alg crypto_aegis128l_aesni_alg[] = { · 374 unmodified lines
375375 }
376376 };
377377
378−static const struct x86_cpu_id aesni_cpu_id[] = {
379− X86_FEATURE_MATCH(X86_FEATURE_AES),
380− X86_FEATURE_MATCH(X86_FEATURE_XMM2),
381− {}
382−};
383−MODULE_DEVICE_TABLE(x86cpu, aesni_cpu_id);
384−
385378 static int __init crypto_aegis128l_aesni_module_init(void)
386379 {
387− if (!x86_match_cpu(aesni_cpu_id))
380+ if (!boot_cpu_has(X86_FEATURE_XMM2) ||
381+ !boot_cpu_has(X86_FEATURE_AES) ||
382+ !boot_cpu_has(X86_FEATURE_OSXSAVE) ||
383+ !cpu_has_xfeatures(XFEATURE_MASK_SSE, NULL))
388384 return -ENODEV;
389385
390386 return crypto_register_aeads(crypto_aegis128l_aesni_alg,
arch/x86/crypto/aegis256-aesni-asm.S+1−0
@@ -543,6 +543,7 @@ ENTRY(crypto_aegis256_aesni_enc_tail) · 542 unmodified lines
543543 state_store0
544544
545545 FRAME_END
546+ ret
546547 ENDPROC(crypto_aegis256_aesni_enc_tail)
547548
548549 /*
arch/x86/crypto/aegis256-aesni-glue.c+4−8
@@ -375,16 +375,12 @@ static struct aead_alg crypto_aegis256_aesni_alg[] = { · 374 unmodified lines
375375 }
376376 };
377377
378−static const struct x86_cpu_id aesni_cpu_id[] = {
379− X86_FEATURE_MATCH(X86_FEATURE_AES),
380− X86_FEATURE_MATCH(X86_FEATURE_XMM2),
381− {}
382−};
383−MODULE_DEVICE_TABLE(x86cpu, aesni_cpu_id);
384−
385378 static int __init crypto_aegis256_aesni_module_init(void)
386379 {
387− if (!x86_match_cpu(aesni_cpu_id))
380+ if (!boot_cpu_has(X86_FEATURE_XMM2) ||
381+ !boot_cpu_has(X86_FEATURE_AES) ||
382+ !boot_cpu_has(X86_FEATURE_OSXSAVE) ||
383+ !cpu_has_xfeatures(XFEATURE_MASK_SSE, NULL))
388384 return -ENODEV;
389385
390386 return crypto_register_aeads(crypto_aegis256_aesni_alg,
arch/x86/crypto/morus1280-avx2-asm.S+1−0
@@ -453,6 +453,7 @@ ENTRY(crypto_morus1280_avx2_enc_tail) · 452 unmodified lines
453453 vmovdqu STATE4, (4 * 32)(%rdi)
454454
455455 FRAME_END
456+ ret
456457 ENDPROC(crypto_morus1280_avx2_enc_tail)
457458
458459 /*
arch/x86/crypto/morus1280-avx2-glue.c+3−7
@@ -37,15 +37,11 @@ asmlinkage void crypto_morus1280_avx2_final(void *state, void *tag_xor, · 36 unmodified lines
3737
3838 MORUS1280_DECLARE_ALGS(avx2, "morus1280-avx2", 400);
3939
40−static const struct x86_cpu_id avx2_cpu_id[] = {
41− X86_FEATURE_MATCH(X86_FEATURE_AVX2),
42− {}
43−};
44−MODULE_DEVICE_TABLE(x86cpu, avx2_cpu_id);
45−
4640 static int __init crypto_morus1280_avx2_module_init(void)
4741 {
48− if (!x86_match_cpu(avx2_cpu_id))
42+ if (!boot_cpu_has(X86_FEATURE_AVX2) ||
43+ !boot_cpu_has(X86_FEATURE_OSXSAVE) ||
44+ !cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL))
4945 return -ENODEV;
5046
5147 return crypto_register_aeads(crypto_morus1280_avx2_algs,
arch/x86/crypto/morus1280-sse2-asm.S+1−0
@@ -652,6 +652,7 @@ ENTRY(crypto_morus1280_sse2_enc_tail) · 651 unmodified lines
652652 movdqu STATE4_HI, (9 * 16)(%rdi)
653653
654654 FRAME_END
655+ ret
655656 ENDPROC(crypto_morus1280_sse2_enc_tail)
656657
657658 /*
arch/x86/crypto/morus1280-sse2-glue.c+3−7
@@ -37,15 +37,11 @@ asmlinkage void crypto_morus1280_sse2_final(void *state, void *tag_xor, · 36 unmodified lines
3737
3838 MORUS1280_DECLARE_ALGS(sse2, "morus1280-sse2", 350);
3939
40−static const struct x86_cpu_id sse2_cpu_id[] = {
41− X86_FEATURE_MATCH(X86_FEATURE_XMM2),
42− {}
43−};
44−MODULE_DEVICE_TABLE(x86cpu, sse2_cpu_id);
45−
4640 static int __init crypto_morus1280_sse2_module_init(void)
4741 {
48− if (!x86_match_cpu(sse2_cpu_id))
42+ if (!boot_cpu_has(X86_FEATURE_XMM2) ||
43+ !boot_cpu_has(X86_FEATURE_OSXSAVE) ||
44+ !cpu_has_xfeatures(XFEATURE_MASK_SSE, NULL))
4945 return -ENODEV;
5046
5147 return crypto_register_aeads(crypto_morus1280_sse2_algs,
arch/x86/crypto/morus640-sse2-asm.S+1−0
@@ -437,6 +437,7 @@ ENTRY(crypto_morus640_sse2_enc_tail) · 436 unmodified lines
437437 movdqu STATE4, (4 * 16)(%rdi)
438438
439439 FRAME_END
440+ ret
440441 ENDPROC(crypto_morus640_sse2_enc_tail)
441442
442443 /*
arch/x86/crypto/morus640-sse2-glue.c+3−7
@@ -37,15 +37,11 @@ asmlinkage void crypto_morus640_sse2_final(void *state, void *tag_xor, · 36 unmodified lines
3737
3838 MORUS640_DECLARE_ALGS(sse2, "morus640-sse2", 400);
3939
40−static const struct x86_cpu_id sse2_cpu_id[] = {
41− X86_FEATURE_MATCH(X86_FEATURE_XMM2),
42− {}
43−};
44−MODULE_DEVICE_TABLE(x86cpu, sse2_cpu_id);
45−
4640 static int __init crypto_morus640_sse2_module_init(void)
4741 {
48− if (!x86_match_cpu(sse2_cpu_id))
42+ if (!boot_cpu_has(X86_FEATURE_XMM2) ||
43+ !boot_cpu_has(X86_FEATURE_OSXSAVE) ||
44+ !cpu_has_xfeatures(XFEATURE_MASK_SSE, NULL))
4945 return -ENODEV;
5046
5147 return crypto_register_aeads(crypto_morus640_sse2_algs,
arch/x86/entry/common.c+1−1
@@ -164,7 +164,7 @@ static void exit_to_usermode_loop(struct pt_regs *regs, u32 cached_flags) · 163 unmodified lines
164164 if (cached_flags & _TIF_NOTIFY_RESUME) {
165165 clear_thread_flag(TIF_NOTIFY_RESUME);
166166 tracehook_notify_resume(regs);
167− rseq_handle_notify_resume(regs);
167+ rseq_handle_notify_resume(NULL, regs);
168168 }
169169
170170 if (cached_flags & _TIF_USER_RETURN_NOTIFY)
arch/x86/entry/entry_32.S+1−1
@@ -477,7 +477,7 @@ ENTRY(entry_SYSENTER_32) · 476 unmodified lines
477477 * whereas POPF does not.)
478478 */
479479 addl $PT_EFLAGS-PT_DS, %esp /* point esp at pt_regs->flags */
480− btr $X86_EFLAGS_IF_BIT, (%esp)
480+ btrl $X86_EFLAGS_IF_BIT, (%esp)
481481 popfl
482482
483483 /*
arch/x86/entry/entry_64.S+4−14
@@ -981,7 +981,7 @@ ENTRY(\sym) · 980 unmodified lines
981981
982982 call \do_sym
983983
984− jmp error_exit /* %ebx: no swapgs flag */
984+ jmp error_exit
985985 .endif
986986 END(\sym)
987987 .endm
@@ -1222,7 +1222,6 @@ END(paranoid_exit) · 234 unmodified lines
12221222
12231223 /*
12241224 * Save all registers in pt_regs, and switch GS if needed.
1225− * Return: EBX=0: came from user mode; EBX=1: otherwise
12261225 */
12271226 ENTRY(error_entry)
12281227 UNWIND_HINT_FUNC
@@ -1269,7 +1268,6 @@ ENTRY(error_entry) · 40 unmodified lines
12691268 * for these here too.
12701269 */
12711270 .Lerror_kernelspace:
1272− incl %ebx
12731271 leaq native_irq_return_iret(%rip), %rcx
12741272 cmpq %rcx, RIP+8(%rsp)
12751273 je .Lerror_bad_iret
@@ -1303,28 +1301,20 @@ ENTRY(error_entry) · 27 unmodified lines
13031301
13041302 /*
13051303 * Pretend that the exception came from user mode: set up pt_regs
1306− * as if we faulted immediately after IRET and clear EBX so that
1307− * error_exit knows that we will be returning to user mode.
1304+ * as if we faulted immediately after IRET.
13081305 */
13091306 mov %rsp, %rdi
13101307 call fixup_bad_iret
13111308 mov %rax, %rsp
1312− decl %ebx
13131309 jmp .Lerror_entry_from_usermode_after_swapgs
13141310 END(error_entry)
13151311
1316−
1317−/*
1318− * On entry, EBX is a "return to kernel mode" flag:
1319− * 1: already in kernel mode, don't need SWAPGS
1320− * 0: user gsbase is loaded, we need SWAPGS and standard preparation for return to usermode
1321− */
13221312 ENTRY(error_exit)
13231313 UNWIND_HINT_REGS
13241314 DISABLE_INTERRUPTS(CLBR_ANY)
13251315 TRACE_IRQS_OFF
1326− testl %ebx, %ebx
1327− jnz retint_kernel
1316+ testb $3, CS(%rsp)
1317+ jz retint_kernel
13281318 jmp retint_user
13291319 END(error_exit)
13301320
arch/x86/entry/entry_64_compat.S+8−8
@@ -84,13 +84,13 @@ ENTRY(entry_SYSENTER_compat) · 83 unmodified lines
8484 pushq %rdx /* pt_regs->dx */
8585 pushq %rcx /* pt_regs->cx */
8686 pushq $-ENOSYS /* pt_regs->ax */
87− pushq %r8 /* pt_regs->r8 */
87+ pushq $0 /* pt_regs->r8 = 0 */
8888 xorl %r8d, %r8d /* nospec r8 */
89− pushq %r9 /* pt_regs->r9 */
89+ pushq $0 /* pt_regs->r9 = 0 */
9090 xorl %r9d, %r9d /* nospec r9 */
91− pushq %r10 /* pt_regs->r10 */
91+ pushq $0 /* pt_regs->r10 = 0 */
9292 xorl %r10d, %r10d /* nospec r10 */
93− pushq %r11 /* pt_regs->r11 */
93+ pushq $0 /* pt_regs->r11 = 0 */
9494 xorl %r11d, %r11d /* nospec r11 */
9595 pushq %rbx /* pt_regs->rbx */
9696 xorl %ebx, %ebx /* nospec rbx */
@@ -374,13 +374,13 @@ ENTRY(entry_INT80_compat) · 277 unmodified lines
374374 pushq %rcx /* pt_regs->cx */
375375 xorl %ecx, %ecx /* nospec cx */
376376 pushq $-ENOSYS /* pt_regs->ax */
377− pushq $0 /* pt_regs->r8 = 0 */
377+ pushq %r8 /* pt_regs->r8 */
378378 xorl %r8d, %r8d /* nospec r8 */
379− pushq $0 /* pt_regs->r9 = 0 */
379+ pushq %r9 /* pt_regs->r9 */
380380 xorl %r9d, %r9d /* nospec r9 */
381− pushq $0 /* pt_regs->r10 = 0 */
381+ pushq %r10 /* pt_regs->r10*/
382382 xorl %r10d, %r10d /* nospec r10 */
383− pushq $0 /* pt_regs->r11 = 0 */
383+ pushq %r11 /* pt_regs->r11 */
384384 xorl %r11d, %r11d /* nospec r11 */
385385 pushq %rbx /* pt_regs->rbx */
386386 xorl %ebx, %ebx /* nospec rbx */
arch/x86/events/amd/ibs.c+5−1
@@ -579,7 +579,7 @@ static int perf_ibs_handle_irq(struct perf_ibs *perf_ibs, struct pt_regs *iregs) · 578 unmodified lines
579579 {
580580 struct cpu_perf_ibs *pcpu = this_cpu_ptr(perf_ibs->pcpu);
581581 struct perf_event *event = pcpu->event;
582− struct hw_perf_event *hwc = &event->hw;
582+ struct hw_perf_event *hwc;
583583 struct perf_sample_data data;
584584 struct perf_raw_record raw;
585585 struct pt_regs regs;
@@ -602,6 +602,10 @@ fail: · 16 unmodified lines
602602 return 0;
603603 }
604604
605+ if (WARN_ON_ONCE(!event))
606+ goto fail;
607+
608+ hwc = &event->hw;
605609 msr = hwc->config_base;
606610 buf = ibs_data.regs;
607611 rdmsrl(msr, *buf);
arch/x86/events/intel/core.c+3−0
@@ -2997,6 +2997,9 @@ static int intel_pmu_hw_config(struct perf_event *event) · 2996 unmodified lines
29972997 }
29982998 if (x86_pmu.pebs_aliases)
29992999 x86_pmu.pebs_aliases(event);
3000+
3001+ if (event->attr.sample_type & PERF_SAMPLE_CALLCHAIN)
3002+ event->attr.sample_type |= __PERF_SAMPLE_CALLCHAIN_EARLY;
30003003 }
30013004
30023005 if (needs_branch_stack(event)) {
arch/x86/events/intel/ds.c+16−17
@@ -408,9 +408,11 @@ static int alloc_bts_buffer(int cpu) · 407 unmodified lines
408408 ds->bts_buffer_base = (unsigned long) cea;
409409 ds_update_cea(cea, buffer, BTS_BUFFER_SIZE, PAGE_KERNEL);
410410 ds->bts_index = ds->bts_buffer_base;
411− max = BTS_RECORD_SIZE * (BTS_BUFFER_SIZE / BTS_RECORD_SIZE);
412− ds->bts_absolute_maximum = ds->bts_buffer_base + max;
413− ds->bts_interrupt_threshold = ds->bts_absolute_maximum - (max / 16);
411+ max = BTS_BUFFER_SIZE / BTS_RECORD_SIZE;
412+ ds->bts_absolute_maximum = ds->bts_buffer_base +
413+ max * BTS_RECORD_SIZE;
414+ ds->bts_interrupt_threshold = ds->bts_absolute_maximum -
415+ (max / 16) * BTS_RECORD_SIZE;
414416 return 0;
415417 }
416418
@@ -1183,17 +1185,21 @@ static void setup_pebs_sample_data(struct perf_event *event, · 766 unmodified lines
11831185 data->data_src.val = val;
11841186 }
11851187
1188+ /*
1189+ * We must however always use iregs for the unwinder to stay sane; the
1190+ * record BP,SP,IP can point into thin air when the record is from a
1191+ * previous PMI context or an (I)RET happend between the record and
1192+ * PMI.
1193+ */
1194+ if (sample_type & PERF_SAMPLE_CALLCHAIN)
1195+ data->callchain = perf_callchain(event, iregs);
1196+
11861197 /*
11871198 * We use the interrupt regs as a base because the PEBS record does not
11881199 * contain a full regs set, specifically it seems to lack segment
11891200 * descriptors, which get used by things like user_mode().
11901201 *
11911202 * In the simple case fix up only the IP for PERF_SAMPLE_IP.
1192− *
1193− * We must however always use BP,SP from iregs for the unwinder to stay
1194− * sane; the record BP,SP can point into thin air when the record is
1195− * from a previous PMI context or an (I)RET happend between the record
1196− * and PMI.
11971203 */
11981204 *regs = *iregs;
11991205
@@ -1212,15 +1218,8 @@ static void setup_pebs_sample_data(struct perf_event *event, · 12 unmodified lines
12121218 regs->si = pebs->si;
12131219 regs->di = pebs->di;
12141220
1215− /*
1216− * Per the above; only set BP,SP if we don't need callchains.
1217− *
1218− * XXX: does this make sense?
1219− */
1220− if (!(sample_type & PERF_SAMPLE_CALLCHAIN)) {
1221− regs->bp = pebs->bp;
1222− regs->sp = pebs->sp;
1223− }
1221+ regs->bp = pebs->bp;
1222+ regs->sp = pebs->sp;
12241223
12251224 #ifndef CONFIG_X86_32
12261225 regs->r8 = pebs->r8;
arch/x86/events/intel/uncore.h+1−1
@@ -28,7 +28,7 @@ · 27 unmodified lines
2828 #define UNCORE_PCI_DEV_TYPE(data) ((data >> 8) & 0xff)
2929 #define UNCORE_PCI_DEV_IDX(data) (data & 0xff)
3030 #define UNCORE_EXTRA_PCI_DEV 0xff
31−#define UNCORE_EXTRA_PCI_DEV_MAX 3
31+#define UNCORE_EXTRA_PCI_DEV_MAX 4
3232
3333 #define UNCORE_EVENT_CONSTRAINT(c, n) EVENT_CONSTRAINT(c, n, 0xff)
3434
arch/x86/events/intel/uncore_snbep.c+7−3
@@ -1029,6 +1029,7 @@ void snbep_uncore_cpu_init(void) · 1028 unmodified lines
10291029 enum {
10301030 SNBEP_PCI_QPI_PORT0_FILTER,
10311031 SNBEP_PCI_QPI_PORT1_FILTER,
1032+ BDX_PCI_QPI_PORT2_FILTER,
10321033 HSWEP_PCI_PCU_3,
10331034 };
10341035
@@ -3286,15 +3287,18 @@ static const struct pci_device_id bdx_uncore_pci_ids[] = { · 2251 unmodified lines
32863287 },
32873288 { /* QPI Port 0 filter */
32883289 PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x6f86),
3289− .driver_data = UNCORE_PCI_DEV_DATA(UNCORE_EXTRA_PCI_DEV, 0),
3290+ .driver_data = UNCORE_PCI_DEV_DATA(UNCORE_EXTRA_PCI_DEV,
3291+ SNBEP_PCI_QPI_PORT0_FILTER),
32903292 },
32913293 { /* QPI Port 1 filter */
32923294 PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x6f96),
3293− .driver_data = UNCORE_PCI_DEV_DATA(UNCORE_EXTRA_PCI_DEV, 1),
3295+ .driver_data = UNCORE_PCI_DEV_DATA(UNCORE_EXTRA_PCI_DEV,
3296+ SNBEP_PCI_QPI_PORT1_FILTER),
32943297 },
32953298 { /* QPI Port 2 filter */
32963299 PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x6f46),
3297− .driver_data = UNCORE_PCI_DEV_DATA(UNCORE_EXTRA_PCI_DEV, 2),
3300+ .driver_data = UNCORE_PCI_DEV_DATA(UNCORE_EXTRA_PCI_DEV,
3301+ BDX_PCI_QPI_PORT2_FILTER),
32983302 },
32993303 { /* PCU.3 (for Capability registers) */
33003304 PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x6fc0),
arch/x86/hyperv/hv_apic.c+5−0
@@ -114,6 +114,8 @@ static bool __send_ipi_mask_ex(const struct cpumask *mask, int vector) · 113 unmodified lines
114114 ipi_arg->vp_set.format = HV_GENERIC_SET_SPARSE_4K;
115115 nr_bank = cpumask_to_vpset(&(ipi_arg->vp_set), mask);
116116 }
117+ if (nr_bank < 0)
118+ goto ipi_mask_ex_done;
117119 if (!nr_bank)
118120 ipi_arg->vp_set.format = HV_GENERIC_SET_ALL;
119121
@@ -158,6 +160,9 @@ static bool __send_ipi_mask(const struct cpumask *mask, int vector) · 38 unmodified lines
158160
159161 for_each_cpu(cur_cpu, mask) {
160162 vcpu = hv_cpu_number_to_vp_number(cur_cpu);
163+ if (vcpu == VP_INVAL)
164+ goto ipi_mask_done;
165+
161166 /*
162167 * This particular version of the IPI hypercall can
163168 * only target upto 64 CPUs.
arch/x86/hyperv/hv_init.c+4−1
@@ -265,7 +265,7 @@ void __init hyperv_init(void) · 264 unmodified lines
265265 {
266266 u64 guest_id, required_msrs;
267267 union hv_x64_msr_hypercall_contents hypercall_msr;
268− int cpuhp;
268+ int cpuhp, i;
269269
270270 if (x86_hyper_type != X86_HYPER_MS_HYPERV)
271271 return;
@@ -293,6 +293,9 @@ void __init hyperv_init(void) · 21 unmodified lines
293293 if (!hv_vp_index)
294294 return;
295295
296+ for (i = 0; i < num_possible_cpus(); i++)
297+ hv_vp_index[i] = VP_INVAL;
298+
296299 hv_vp_assist_page = kcalloc(num_possible_cpus(),
297300 sizeof(*hv_vp_assist_page), GFP_KERNEL);
298301 if (!hv_vp_assist_page) {
arch/x86/include/asm/apm.h+0−6
@@ -7,8 +7,6 @@ · 6 unmodified lines
77 #ifndef _ASM_X86_MACH_DEFAULT_APM_H
88 #define _ASM_X86_MACH_DEFAULT_APM_H
99
10−#include <asm/nospec-branch.h>
11−
1210 #ifdef APM_ZERO_SEGS
1311 # define APM_DO_ZERO_SEGS \
1412 "pushl %%ds\n\t" \
@@ -34,7 +32,6 @@ static inline void apm_bios_call_asm(u32 func, u32 ebx_in, u32 ecx_in, · 19 unmodified lines
3432 * N.B. We do NOT need a cld after the BIOS call
3533 * because we always save and restore the flags.
3634 */
37− firmware_restrict_branch_speculation_start();
3835 __asm__ __volatile__(APM_DO_ZERO_SEGS
3936 "pushl %%edi\n\t"
4037 "pushl %%ebp\n\t"
@@ -47,7 +44,6 @@ static inline void apm_bios_call_asm(u32 func, u32 ebx_in, u32 ecx_in, · 6 unmodified lines
4744 "=S" (*esi)
4845 : "a" (func), "b" (ebx_in), "c" (ecx_in)
4946 : "memory", "cc");
50− firmware_restrict_branch_speculation_end();
5147 }
5248
5349 static inline bool apm_bios_call_simple_asm(u32 func, u32 ebx_in,
@@ -60,7 +56,6 @@ static inline bool apm_bios_call_simple_asm(u32 func, u32 ebx_in, · 6 unmodified lines
6056 * N.B. We do NOT need a cld after the BIOS call
6157 * because we always save and restore the flags.
6258 */
63− firmware_restrict_branch_speculation_start();
6459 __asm__ __volatile__(APM_DO_ZERO_SEGS
6560 "pushl %%edi\n\t"
6661 "pushl %%ebp\n\t"
@@ -73,7 +68,6 @@ static inline bool apm_bios_call_simple_asm(u32 func, u32 ebx_in, · 6 unmodified lines
7368 "=S" (si)
7469 : "a" (func), "b" (ebx_in), "c" (ecx_in)
7570 : "memory", "cc");
76− firmware_restrict_branch_speculation_end();
7771 return error;
7872 }
7973
arch/x86/include/asm/asm.h+59−0
@@ -46,6 +46,65 @@ · 45 unmodified lines
4646 #define _ASM_SI __ASM_REG(si)
4747 #define _ASM_DI __ASM_REG(di)
4848
49+#ifndef __x86_64__
50+/* 32 bit */
51+
52+#define _ASM_ARG1 _ASM_AX
53+#define _ASM_ARG2 _ASM_DX
54+#define _ASM_ARG3 _ASM_CX
55+
56+#define _ASM_ARG1L eax
57+#define _ASM_ARG2L edx
58+#define _ASM_ARG3L ecx
59+
60+#define _ASM_ARG1W ax
61+#define _ASM_ARG2W dx
62+#define _ASM_ARG3W cx
63+
64+#define _ASM_ARG1B al
65+#define _ASM_ARG2B dl
66+#define _ASM_ARG3B cl
67+
68+#else
69+/* 64 bit */
70+
71+#define _ASM_ARG1 _ASM_DI
72+#define _ASM_ARG2 _ASM_SI
73+#define _ASM_ARG3 _ASM_DX
74+#define _ASM_ARG4 _ASM_CX
75+#define _ASM_ARG5 r8
76+#define _ASM_ARG6 r9
77+
78+#define _ASM_ARG1Q rdi
79+#define _ASM_ARG2Q rsi
80+#define _ASM_ARG3Q rdx
81+#define _ASM_ARG4Q rcx
82+#define _ASM_ARG5Q r8
83+#define _ASM_ARG6Q r9
84+
85+#define _ASM_ARG1L edi
86+#define _ASM_ARG2L esi
87+#define _ASM_ARG3L edx
88+#define _ASM_ARG4L ecx
89+#define _ASM_ARG5L r8d
90+#define _ASM_ARG6L r9d
91+
92+#define _ASM_ARG1W di
93+#define _ASM_ARG2W si
94+#define _ASM_ARG3W dx
95+#define _ASM_ARG4W cx
96+#define _ASM_ARG5W r8w
97+#define _ASM_ARG6W r9w
98+
99+#define _ASM_ARG1B dil
100+#define _ASM_ARG2B sil
101+#define _ASM_ARG3B dl
102+#define _ASM_ARG4B cl
103+#define _ASM_ARG5B r8b
104+#define _ASM_ARG6B r9b
105+
106+#endif
107+
49108 /*
50109 * Macros to generate condition code outputs from inline assembly,
51110 * The output operand must be type "bool".
arch/x86/include/asm/barrier.h+1−1
@@ -38,7 +38,7 @@ static inline unsigned long array_index_mask_nospec(unsigned long index, · 37 unmodified lines
3838 {
3939 unsigned long mask;
4040
41− asm ("cmp %1,%2; sbb %0,%0;"
41+ asm volatile ("cmp %1,%2; sbb %0,%0;"
4242 :"=r" (mask)
4343 :"g"(size),"r" (index)
4444 :"cc");
arch/x86/include/asm/irqflags.h+1−1
@@ -13,7 +13,7 @@ · 12 unmodified lines
1313 * Interrupt control:
1414 */
1515
16−static inline unsigned long native_save_fl(void)
16+extern inline unsigned long native_save_fl(void)
1717 {
1818 unsigned long flags;
1919
arch/x86/include/asm/mshyperv.h+4−1
@@ -9,6 +9,8 @@ · 8 unmodified lines
99 #include <asm/hyperv-tlfs.h>
1010 #include <asm/nospec-branch.h>
1111
12+#define VP_INVAL U32_MAX
13+
1214 struct ms_hyperv_info {
1315 u32 features;
1416 u32 misc_features;
@@ -20,7 +22,6 @@ struct ms_hyperv_info { · 5 unmodified lines
2022
2123 extern struct ms_hyperv_info ms_hyperv;
2224
23−
2425 /*
2526 * Generate the guest ID.
2627 */
@@ -281,6 +282,8 @@ static inline int cpumask_to_vpset(struct hv_vpset *vpset, · 254 unmodified lines
281282 */
282283 for_each_cpu(cpu, cpus) {
283284 vcpu = hv_cpu_number_to_vp_number(cpu);
285+ if (vcpu == VP_INVAL)
286+ return -1;
284287 vcpu_bank = vcpu / 64;
285288 vcpu_offset = vcpu % 64;
286289 __set_bit(vcpu_offset, (unsigned long *)
arch/x86/include/asm/pgalloc.h+3−0
@@ -184,6 +184,9 @@ static inline p4d_t *p4d_alloc_one(struct mm_struct *mm, unsigned long addr) · 183 unmodified lines
184184
185185 static inline void p4d_free(struct mm_struct *mm, p4d_t *p4d)
186186 {
187+ if (!pgtable_l5_enabled())
188+ return;
189+
187190 BUG_ON((unsigned long)p4d & (PAGE_SIZE-1));
188191 free_page((unsigned long)p4d);
189192 }
arch/x86/include/asm/pgtable.h+1−1
@@ -898,7 +898,7 @@ static inline unsigned long pgd_page_vaddr(pgd_t pgd) · 897 unmodified lines
898898 #define pgd_page(pgd) pfn_to_page(pgd_pfn(pgd))
899899
900900 /* to find an entry in a page-table-directory. */
901−static __always_inline p4d_t *p4d_offset(pgd_t *pgd, unsigned long address)
901+static inline p4d_t *p4d_offset(pgd_t *pgd, unsigned long address)
902902 {
903903 if (!pgtable_l5_enabled())
904904 return (p4d_t *)pgd;
arch/x86/include/asm/pgtable_64.h+2−2
@@ -216,7 +216,7 @@ static inline pgd_t pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd) · 215 unmodified lines
216216 }
217217 #endif
218218
219−static __always_inline void native_set_p4d(p4d_t *p4dp, p4d_t p4d)
219+static inline void native_set_p4d(p4d_t *p4dp, p4d_t p4d)
220220 {
221221 pgd_t pgd;
222222
@@ -230,7 +230,7 @@ static __always_inline void native_set_p4d(p4d_t *p4dp, p4d_t p4d) · 7 unmodified lines
230230 *p4dp = native_make_p4d(native_pgd_val(pgd));
231231 }
232232
233−static __always_inline void native_p4d_clear(p4d_t *p4d)
233+static inline void native_p4d_clear(p4d_t *p4d)
234234 {
235235 native_set_p4d(p4d, native_make_p4d(0));
236236 }
arch/x86/include/asm/qspinlock_paravirt.h+1−1
@@ -43,7 +43,7 @@ asm (".pushsection .text;" · 42 unmodified lines
4343 "push %rdx;"
4444 "mov $0x1,%eax;"
4545 "xor %edx,%edx;"
46− "lock cmpxchg %dl,(%rdi);"
46+ LOCK_PREFIX "cmpxchg %dl,(%rdi);"
4747 "cmp $0x1,%al;"
4848 "jne .slowpath;"
4949 "pop %rdx;"
arch/x86/include/asm/uaccess_64.h+6−1
@@ -52,7 +52,12 @@ copy_to_user_mcsafe(void *to, const void *from, unsigned len) · 51 unmodified lines
5252 unsigned long ret;
5353
5454 __uaccess_begin();
55− ret = memcpy_mcsafe(to, from, len);
55+ /*
56+ * Note, __memcpy_mcsafe() is explicitly used since it can
57+ * handle exceptions / faults. memcpy_mcsafe() may fall back to
58+ * memcpy() which lacks this handling.
59+ */
60+ ret = __memcpy_mcsafe(to, from, len);
5661 __uaccess_end();
5762 return ret;
5863 }
arch/x86/include/asm/vmx.h+3−0
@@ -114,6 +114,7 @@ · 113 unmodified lines
114114 #define VMX_MISC_PREEMPTION_TIMER_RATE_MASK 0x0000001f
115115 #define VMX_MISC_SAVE_EFER_LMA 0x00000020
116116 #define VMX_MISC_ACTIVITY_HLT 0x00000040
117+#define VMX_MISC_ZERO_LEN_INS 0x40000000
117118
118119 /* VMFUNC functions */
119120 #define VMX_VMFUNC_EPTP_SWITCHING 0x00000001
@@ -351,11 +352,13 @@ enum vmcs_field { · 231 unmodified lines
351352 #define VECTORING_INFO_VALID_MASK INTR_INFO_VALID_MASK
352353
353354 #define INTR_TYPE_EXT_INTR (0 << 8) /* external interrupt */
355+#define INTR_TYPE_RESERVED (1 << 8) /* reserved */
354356 #define INTR_TYPE_NMI_INTR (2 << 8) /* NMI */
355357 #define INTR_TYPE_HARD_EXCEPTION (3 << 8) /* processor exception */
356358 #define INTR_TYPE_SOFT_INTR (4 << 8) /* software interrupt */
357359 #define INTR_TYPE_PRIV_SW_EXCEPTION (5 << 8) /* ICE breakpoint - undocumented */
358360 #define INTR_TYPE_SOFT_EXCEPTION (6 << 8) /* software exception */
361+#define INTR_TYPE_OTHER_EVENT (7 << 8) /* other event */
359362
360363 /* GUEST_INTERRUPTIBILITY_INFO flags. */
361364 #define GUEST_INTR_STATE_STI 0x00000001
arch/x86/kernel/Makefile+1−0
@@ -61,6 +61,7 @@ obj-y += alternative.o i8253.o hw_breakpoint.o · 60 unmodified lines
6161 obj-y += tsc.o tsc_msr.o io_delay.o rtc.o
6262 obj-y += pci-iommu_table.o
6363 obj-y += resource.o
64+obj-y += irqflags.o
6465
6566 obj-y += process.o
6667 obj-y += fpu/
arch/x86/kernel/apic/apic.c+3−0
@@ -573,6 +573,9 @@ static u32 skx_deadline_rev(void) · 572 unmodified lines
573573 case 0x04: return 0x02000014;
574574 }
575575
576+ if (boot_cpu_data.x86_stepping > 4)
577+ return 0;
578+
576579 return ~0U;
577580 }
578581
arch/x86/kernel/apic/x2apic_uv_x.c+57−3
@@ -26,6 +26,7 @@ · 25 unmodified lines
2626 #include <linux/delay.h>
2727 #include <linux/crash_dump.h>
2828 #include <linux/reboot.h>
29+#include <linux/memory.h>
2930
3031 #include <asm/uv/uv_mmrs.h>
3132 #include <asm/uv/uv_hub.h>
@@ -392,6 +393,51 @@ extern int uv_hub_info_version(void) · 360 unmodified lines
392393 }
393394 EXPORT_SYMBOL(uv_hub_info_version);
394395
396+/* Default UV memory block size is 2GB */
397+static unsigned long mem_block_size = (2UL << 30);
398+
399+/* Kernel parameter to specify UV mem block size */
400+static int parse_mem_block_size(char *ptr)
401+{
402+ unsigned long size = memparse(ptr, NULL);
403+
404+ /* Size will be rounded down by set_block_size() below */
405+ mem_block_size = size;
406+ return 0;
407+}
408+early_param("uv_memblksize", parse_mem_block_size);
409+
410+static __init int adj_blksize(u32 lgre)
411+{
412+ unsigned long base = (unsigned long)lgre << UV_GAM_RANGE_SHFT;
413+ unsigned long size;
414+
415+ for (size = mem_block_size; size > MIN_MEMORY_BLOCK_SIZE; size >>= 1)
416+ if (IS_ALIGNED(base, size))
417+ break;
418+
419+ if (size >= mem_block_size)
420+ return 0;
421+
422+ mem_block_size = size;
423+ return 1;
424+}
425+
426+static __init void set_block_size(void)
427+{
428+ unsigned int order = ffs(mem_block_size);
429+
430+ if (order) {
431+ /* adjust for ffs return of 1..64 */
432+ set_memory_block_size_order(order - 1);
433+ pr_info("UV: mem_block_size set to 0x%lx\n", mem_block_size);
434+ } else {
435+ /* bad or zero value, default to 1UL << 31 (2GB) */
436+ pr_err("UV: mem_block_size error with 0x%lx\n", mem_block_size);
437+ set_memory_block_size_order(31);
438+ }
439+}
440+
395441 /* Build GAM range lookup table: */
396442 static __init void build_uv_gr_table(void)
397443 {
@@ -1180,23 +1226,30 @@ static void __init decode_gam_rng_tbl(unsigned long ptr) · 782 unmodified lines
11801226 << UV_GAM_RANGE_SHFT);
11811227 int order = 0;
11821228 char suffix[] = " KMGTPE";
1229+ int flag = ' ';
11831230
11841231 while (size > 9999 && order < sizeof(suffix)) {
11851232 size /= 1024;
11861233 order++;
11871234 }
11881235
1236+ /* adjust max block size to current range start */
1237+ if (gre->type == 1 || gre->type == 2)
1238+ if (adj_blksize(lgre))
1239+ flag = '*';
1240+
11891241 if (!index) {
11901242 pr_info("UV: GAM Range Table...\n");
1191− pr_info("UV: # %20s %14s %5s %4s %5s %3s %2s\n", "Range", "", "Size", "Type", "NASID", "SID", "PN");
1243+ pr_info("UV: # %20s %14s %6s %4s %5s %3s %2s\n", "Range", "", "Size", "Type", "NASID", "SID", "PN");
11921244 }
1193− pr_info("UV: %2d: 0x%014lx-0x%014lx %5lu%c %3d %04x %02x %02x\n",
1245+ pr_info("UV: %2d: 0x%014lx-0x%014lx%c %5lu%c %3d %04x %02x %02x\n",
11941246 index++,
11951247 (unsigned long)lgre << UV_GAM_RANGE_SHFT,
11961248 (unsigned long)gre->limit << UV_GAM_RANGE_SHFT,
1197− size, suffix[order],
1249+ flag, size, suffix[order],
11981250 gre->type, gre->nasid, gre->sockid, gre->pnode);
11991251
1252+ /* update to next range start */
12001253 lgre = gre->limit;
12011254 if (sock_min > gre->sockid)
12021255 sock_min = gre->sockid;
@@ -1427,6 +1480,7 @@ static void __init uv_system_init_hub(void) · 224 unmodified lines
14271480
14281481 build_socket_tables();
14291482 build_uv_gr_table();
1483+ set_block_size();
14301484 uv_init_hub_info(&hub_info);
14311485 uv_possible_blades = num_possible_nodes();
14321486 if (!_node_to_pnode)
arch/x86/kernel/apm_32.c+5−0
@@ -240,6 +240,7 @@ · 239 unmodified lines
240240 #include <asm/olpc.h>
241241 #include <asm/paravirt.h>
242242 #include <asm/reboot.h>
243+#include <asm/nospec-branch.h>
243244
244245 #if defined(CONFIG_APM_DISPLAY_BLANK) && defined(CONFIG_VT)
245246 extern int (*console_blank_hook)(int);
@@ -614,11 +615,13 @@ static long __apm_bios_call(void *_call) · 368 unmodified lines
614615 gdt[0x40 / 8] = bad_bios_desc;
615616
616617 apm_irq_save(flags);
618+ firmware_restrict_branch_speculation_start();
617619 APM_DO_SAVE_SEGS;
618620 apm_bios_call_asm(call->func, call->ebx, call->ecx,
619621 &call->eax, &call->ebx, &call->ecx, &call->edx,
620622 &call->esi);
621623 APM_DO_RESTORE_SEGS;
624+ firmware_restrict_branch_speculation_end();
622625 apm_irq_restore(flags);
623626 gdt[0x40 / 8] = save_desc_40;
624627 put_cpu();
@@ -690,10 +693,12 @@ static long __apm_bios_call_simple(void *_call) · 65 unmodified lines
690693 gdt[0x40 / 8] = bad_bios_desc;
691694
692695 apm_irq_save(flags);
696+ firmware_restrict_branch_speculation_start();
693697 APM_DO_SAVE_SEGS;
694698 error = apm_bios_call_simple_asm(call->func, call->ebx, call->ecx,
695699 &call->eax);
696700 APM_DO_RESTORE_SEGS;
701+ firmware_restrict_branch_speculation_end();
697702 apm_irq_restore(flags);
698703 gdt[0x40 / 8] = save_desc_40;
699704 put_cpu();
arch/x86/kernel/cpu/amd.c+3−1
@@ -543,7 +543,9 @@ static void bsp_init_amd(struct cpuinfo_x86 *c) · 542 unmodified lines
543543 nodes_per_socket = ((value >> 3) & 7) + 1;
544544 }
545545
546− if (c->x86 >= 0x15 && c->x86 <= 0x17) {
546+ if (!boot_cpu_has(X86_FEATURE_AMD_SSBD) &&
547+ !boot_cpu_has(X86_FEATURE_VIRT_SSBD) &&
548+ c->x86 >= 0x15 && c->x86 <= 0x17) {
547549 unsigned int bit;
548550
549551 switch (c->x86) {
arch/x86/kernel/cpu/bugs.c+9−3
@@ -27,6 +27,7 @@ · 26 unmodified lines
2727 #include <asm/pgtable.h>
2828 #include <asm/set_memory.h>
2929 #include <asm/intel-family.h>
30+#include <asm/hypervisor.h>
3031
3132 static void __init spectre_v2_select_mitigation(void);
3233 static void __init ssb_select_mitigation(void);
@@ -154,7 +155,8 @@ x86_virt_spec_ctrl(u64 guest_spec_ctrl, u64 guest_virt_spec_ctrl, bool setguest) · 121 unmodified lines
154155 guestval |= guest_spec_ctrl & x86_spec_ctrl_mask;
155156
156157 /* SSBD controlled in MSR_SPEC_CTRL */
157− if (static_cpu_has(X86_FEATURE_SPEC_CTRL_SSBD))
158+ if (static_cpu_has(X86_FEATURE_SPEC_CTRL_SSBD) ||
159+ static_cpu_has(X86_FEATURE_AMD_SSBD))
158160 hostval |= ssbd_tif_to_spec_ctrl(ti->flags);
159161
160162 if (hostval != guestval) {
@@ -532,9 +534,10 @@ static enum ssb_mitigation __init __ssb_select_mitigation(void) · 371 unmodified lines
532534 * Intel uses the SPEC CTRL MSR Bit(2) for this, while AMD may
533535 * use a completely different MSR and bit dependent on family.
534536 */
535− if (!static_cpu_has(X86_FEATURE_MSR_SPEC_CTRL))
537+ if (!static_cpu_has(X86_FEATURE_SPEC_CTRL_SSBD) &&
538+ !static_cpu_has(X86_FEATURE_AMD_SSBD)) {
536539 x86_amd_ssb_disable();
537− else {
540+ } else {
538541 x86_spec_ctrl_base |= SPEC_CTRL_SSBD;
539542 x86_spec_ctrl_mask |= SPEC_CTRL_SSBD;
540543 wrmsrl(MSR_IA32_SPEC_CTRL, x86_spec_ctrl_base);
@@ -664,6 +667,9 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr · 123 unmodified lines
664667 if (boot_cpu_has(X86_FEATURE_PTI))
665668 return sprintf(buf, "Mitigation: PTI\n");
666669
670+ if (hypervisor_is_type(X86_HYPER_XEN_PV))
671+ return sprintf(buf, "Unknown (XEN PV detected, hypervisor mitigation required)\n");
672+
667673 break;
668674
669675 case X86_BUG_SPECTRE_V1:
arch/x86/kernel/cpu/cacheinfo.c+1−1
@@ -671,7 +671,7 @@ void cacheinfo_amd_init_llc_id(struct cpuinfo_x86 *c, int cpu, u8 node_id) · 670 unmodified lines
671671 num_sharing_cache = ((eax >> 14) & 0xfff) + 1;
672672
673673 if (num_sharing_cache) {
674− int bits = get_count_order(num_sharing_cache) - 1;
674+ int bits = get_count_order(num_sharing_cache);
675675
676676 per_cpu(cpu_llc_id, cpu) = c->apicid >> bits;
677677 }
arch/x86/kernel/cpu/common.c+3−0
@@ -1,3 +1,6 @@
1+/* cpu_feature_enabled() cannot be used this early */
2+#define USE_EARLY_PGTABLE_L5
3+
14 #include <linux/bootmem.h>
25 #include <linux/linkage.h>
36 #include <linux/bitops.h>
arch/x86/kernel/cpu/mcheck/mce-severity.c+5−0
@@ -160,6 +160,11 @@ static struct severity { · 159 unmodified lines
160160 SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_INSTR),
161161 USER
162162 ),
163+ MCESEV(
164+ PANIC, "Data load in unrecoverable area of kernel",
165+ SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_DATA),
166+ KERNEL
167+ ),
163168 #endif
164169 MCESEV(
165170 PANIC, "Action required: unknown MCACOD",
arch/x86/kernel/cpu/mcheck/mce.c+28−19
@@ -772,23 +772,25 @@ EXPORT_SYMBOL_GPL(machine_check_poll); · 771 unmodified lines
772772 static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
773773 struct pt_regs *regs)
774774 {
775− int i, ret = 0;
776775 char *tmp;
776+ int i;
777777
778778 for (i = 0; i < mca_cfg.banks; i++) {
779779 m->status = mce_rdmsrl(msr_ops.status(i));
780− if (m->status & MCI_STATUS_VAL) {
781− __set_bit(i, validp);
782− if (quirk_no_way_out)
783− quirk_no_way_out(i, m, regs);
784− }
780+ if (!(m->status & MCI_STATUS_VAL))
781+ continue;
782+
783+ __set_bit(i, validp);
784+ if (quirk_no_way_out)
785+ quirk_no_way_out(i, m, regs);
785786
786787 if (mce_severity(m, mca_cfg.tolerant, &tmp, true) >= MCE_PANIC_SEVERITY) {
788+ mce_read_aux(m, i);
787789 *msg = tmp;
788− ret = 1;
790+ return 1;
789791 }
790792 }
791− return ret;
793+ return 0;
792794 }
793795
794796 /*
@@ -1205,13 +1207,18 @@ void do_machine_check(struct pt_regs *regs, long error_code) · 410 unmodified lines
12051207 lmce = m.mcgstatus & MCG_STATUS_LMCES;
12061208
12071209 /*
1210+ * Local machine check may already know that we have to panic.
1211+ * Broadcast machine check begins rendezvous in mce_start()
12081212 * Go through all banks in exclusion of the other CPUs. This way we
12091213 * don't report duplicated events on shared banks because the first one
1210− * to see it will clear it. If this is a Local MCE, then no need to
1211− * perform rendezvous.
1214+ * to see it will clear it.
12121215 */
1213− if (!lmce)
1216+ if (lmce) {
1217+ if (no_way_out)
1218+ mce_panic("Fatal local machine check", &m, msg);
1219+ } else {
12141220 order = mce_start(&no_way_out);
1221+ }
12151222
12161223 for (i = 0; i < cfg->banks; i++) {
12171224 __clear_bit(i, toclear);
@@ -1287,12 +1294,17 @@ void do_machine_check(struct pt_regs *regs, long error_code) · 69 unmodified lines
12871294 no_way_out = worst >= MCE_PANIC_SEVERITY;
12881295 } else {
12891296 /*
1290− * Local MCE skipped calling mce_reign()
1291− * If we found a fatal error, we need to panic here.
1297+ * If there was a fatal machine check we should have
1298+ * already called mce_panic earlier in this function.
1299+ * Since we re-read the banks, we might have found
1300+ * something new. Check again to see if we found a
1301+ * fatal error. We call "mce_severity()" again to
1302+ * make sure we have the right "msg".
12921303 */
1293− if (worst >= MCE_PANIC_SEVERITY && mca_cfg.tolerant < 3)
1294− mce_panic("Machine check from unknown source",
1295− NULL, NULL);
1304+ if (worst >= MCE_PANIC_SEVERITY && mca_cfg.tolerant < 3) {
1305+ mce_severity(&m, cfg->tolerant, &msg, true);
1306+ mce_panic("Local fatal machine check!", &m, msg);
1307+ }
12961308 }
12971309
12981310 /*
@@ -2153,9 +2165,6 @@ static ssize_t store_int_with_restart(struct device *s, · 854 unmodified lines
21532165 if (check_interval == old_check_interval)
21542166 return ret;
21552167
2156− if (check_interval < 1)
2157− check_interval = 1;
2158−
21592168 mutex_lock(&mce_sysfs_mutex);
21602169 mce_restart();
21612170 mutex_unlock(&mce_sysfs_mutex);
arch/x86/kernel/cpu/microcode/intel.c+4−1
@@ -190,8 +190,11 @@ static void save_microcode_patch(void *data, unsigned int size) · 189 unmodified lines
190190 p = memdup_patch(data, size);
191191 if (!p)
192192 pr_err("Error allocating buffer %p\n", data);
193− else
193+ else {
194194 list_replace(&iter->plist, &p->plist);
195+ kfree(iter->data);
196+ kfree(iter);
197+ }
195198 }
196199 }
197200
arch/x86/kernel/cpu/mtrr/if.c+2−1
@@ -106,7 +106,8 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos) · 105 unmodified lines
106106
107107 memset(line, 0, LINE_SIZE);
108108
109− length = strncpy_from_user(line, buf, LINE_SIZE - 1);
109+ len = min_t(size_t, len, LINE_SIZE - 1);
110+ length = strncpy_from_user(line, buf, len);
110111 if (length < 0)
111112 return length;
112113
arch/x86/kernel/e820.c+12−3
@@ -1248,6 +1248,7 @@ void __init e820__memblock_setup(void) · 1247 unmodified lines
12481248 {
12491249 int i;
12501250 u64 end;
1251+ u64 addr = 0;
12511252
12521253 /*
12531254 * The bootstrap memblock region count maximum is 128 entries
@@ -1264,13 +1265,21 @@ void __init e820__memblock_setup(void) · 10 unmodified lines
12641265 struct e820_entry *entry = &e820_table->entries[i];
12651266
12661267 end = entry->addr + entry->size;
1268+ if (addr < entry->addr)
1269+ memblock_reserve(addr, entry->addr - addr);
1270+ addr = end;
12671271 if (end != (resource_size_t)end)
12681272 continue;
12691273
1274+ /*
1275+ * all !E820_TYPE_RAM ranges (including gap ranges) are put
1276+ * into memblock.reserved to make sure that struct pages in
1277+ * such regions are not left uninitialized after bootup.
1278+ */
12701279 if (entry->type != E820_TYPE_RAM && entry->type != E820_TYPE_RESERVED_KERN)
1271− continue;
1272−
1273− memblock_add(entry->addr, entry->size);
1280+ memblock_reserve(entry->addr, entry->size);
1281+ else
1282+ memblock_add(entry->addr, entry->size);
12741283 }
12751284
12761285 /* Throw away partial pages: */
arch/x86/kernel/head64.c+1−1
@@ -44,7 +44,7 @@ static unsigned int __initdata next_early_pgt; · 43 unmodified lines
4444 pmdval_t early_pmd_flags = __PAGE_KERNEL_LARGE & ~(_PAGE_GLOBAL | _PAGE_NX);
4545
4646 #ifdef CONFIG_X86_5LEVEL
47−unsigned int __pgtable_l5_enabled __initdata;
47+unsigned int __pgtable_l5_enabled __ro_after_init;
4848 unsigned int pgdir_shift __ro_after_init = 39;
4949 EXPORT_SYMBOL(pgdir_shift);
5050 unsigned int ptrs_per_p4d __ro_after_init = 1;
arch/x86/kernel/irqflags.S+26−0
@@ -0,0 +1,26 @@
1+/* SPDX-License-Identifier: GPL-2.0 */
2+
3+#include <asm/asm.h>
4+#include <asm/export.h>
5+#include <linux/linkage.h>
6+
7+/*
8+ * unsigned long native_save_fl(void)
9+ */
10+ENTRY(native_save_fl)
11+ pushf
12+ pop %_ASM_AX
13+ ret
14+ENDPROC(native_save_fl)
15+EXPORT_SYMBOL(native_save_fl)
16+
17+/*
18+ * void native_restore_fl(unsigned long flags)
19+ * %eax/%rdi: flags
20+ */
21+ENTRY(native_restore_fl)
22+ push %_ASM_ARG1
23+ popf
24+ ret
25+ENDPROC(native_restore_fl)
26+EXPORT_SYMBOL(native_restore_fl)
arch/x86/kernel/kvmclock.c+6−6
@@ -138,6 +138,7 @@ static unsigned long kvm_get_tsc_khz(void) · 137 unmodified lines
138138 src = &hv_clock[cpu].pvti;
139139 tsc_khz = pvclock_tsc_khz(src);
140140 put_cpu();
141+ setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ);
141142 return tsc_khz;
142143 }
143144
@@ -319,6 +320,8 @@ void __init kvmclock_init(void) · 175 unmodified lines
319320 printk(KERN_INFO "kvm-clock: Using msrs %x and %x",
320321 msr_kvm_system_time, msr_kvm_wall_clock);
321322
323+ pvclock_set_pvti_cpu0_va(hv_clock);
324+
322325 if (kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE_STABLE_BIT))
323326 pvclock_set_flags(PVCLOCK_TSC_STABLE_BIT);
324327
@@ -366,14 +369,11 @@ int __init kvm_setup_vsyscall_timeinfo(void) · 41 unmodified lines
366369 vcpu_time = &hv_clock[cpu].pvti;
367370 flags = pvclock_read_flags(vcpu_time);
368371
369− if (!(flags & PVCLOCK_TSC_STABLE_BIT)) {
370− put_cpu();
371− return 1;
372− }
373−
374− pvclock_set_pvti_cpu0_va(hv_clock);
375372 put_cpu();
376373
374+ if (!(flags & PVCLOCK_TSC_STABLE_BIT))
375+ return 1;
376+
377377 kvm_clock.archdata.vclock_mode = VCLOCK_PVCLOCK;
378378 #endif
379379 return 0;
arch/x86/kernel/quirks.c+9−2
@@ -645,12 +645,19 @@ static void quirk_intel_brickland_xeon_ras_cap(struct pci_dev *pdev) · 644 unmodified lines
645645 /* Skylake */
646646 static void quirk_intel_purley_xeon_ras_cap(struct pci_dev *pdev)
647647 {
648− u32 capid0;
648+ u32 capid0, capid5;
649649
650650 pci_read_config_dword(pdev, 0x84, &capid0);
651+ pci_read_config_dword(pdev, 0x98, &capid5);
651652
652− if ((capid0 & 0xc0) == 0xc0)
653+ /*
654+ * CAPID0{7:6} indicate whether this is an advanced RAS SKU
655+ * CAPID5{8:5} indicate that various NVDIMM usage modes are
656+ * enabled, so memory machine check recovery is also enabled.
657+ */
658+ if ((capid0 & 0xc0) == 0xc0 || (capid5 & 0x1e0))
653659 static_branch_inc(&mcsafe_key);
660+
654661 }
655662 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x0ec3, quirk_intel_brickland_xeon_ras_cap);
656663 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2fc0, quirk_intel_brickland_xeon_ras_cap);
arch/x86/kernel/signal.c+1−1
@@ -692,7 +692,7 @@ setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) · 691 unmodified lines
692692 * Increment event counter and perform fixup for the pre-signal
693693 * frame.
694694 */
695− rseq_signal_deliver(regs);
695+ rseq_signal_deliver(ksig, regs);
696696
697697 /* Set up the stack frame */
698698 if (is_ia32_frame(ksig)) {
arch/x86/kernel/smpboot.c+5−0
@@ -221,6 +221,11 @@ static void notrace start_secondary(void *unused) · 220 unmodified lines
221221 #ifdef CONFIG_X86_32
222222 /* switch away from the initial page table */
223223 load_cr3(swapper_pg_dir);
224+ /*
225+ * Initialize the CR4 shadow before doing anything that could
226+ * try to read it.
227+ */
228+ cr4_init_shadow();
224229 __flush_tlb_all();
225230 #endif
226231 load_current_idt();
arch/x86/kernel/traps.c+8−6
@@ -835,16 +835,18 @@ static void math_error(struct pt_regs *regs, int error_code, int trapnr) · 834 unmodified lines
835835 char *str = (trapnr == X86_TRAP_MF) ? "fpu exception" :
836836 "simd exception";
837837
838− if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, SIGFPE) == NOTIFY_STOP)
839− return;
840838 cond_local_irq_enable(regs);
841839
842840 if (!user_mode(regs)) {
843− if (!fixup_exception(regs, trapnr)) {
844− task->thread.error_code = error_code;
845− task->thread.trap_nr = trapnr;
841+ if (fixup_exception(regs, trapnr))
842+ return;
843+
844+ task->thread.error_code = error_code;
845+ task->thread.trap_nr = trapnr;
846+
847+ if (notify_die(DIE_TRAP, str, regs, error_code,
848+ trapnr, SIGFPE) != NOTIFY_STOP)
846849 die(str, regs, error_code);
847− }
848850 return;
849851 }
850852
arch/x86/kernel/uprobes.c+1−1
@@ -293,7 +293,7 @@ static int uprobe_init_insn(struct arch_uprobe *auprobe, struct insn *insn, bool · 292 unmodified lines
293293 insn_init(insn, auprobe->insn, sizeof(auprobe->insn), x86_64);
294294 /* has the side-effect of processing the entire instruction */
295295 insn_get_length(insn);
296− if (WARN_ON_ONCE(!insn_complete(insn)))
296+ if (!insn_complete(insn))
297297 return -ENOEXEC;
298298
299299 if (is_prefix_bad(insn))
arch/x86/kvm/Kconfig+1−1
@@ -85,7 +85,7 @@ config KVM_AMD_SEV · 84 unmodified lines
8585 def_bool y
8686 bool "AMD Secure Encrypted Virtualization (SEV) support"
8787 depends on KVM_AMD && X86_64
88− depends on CRYPTO_DEV_CCP && CRYPTO_DEV_CCP_DD && CRYPTO_DEV_SP_PSP
88+ depends on CRYPTO_DEV_SP_PSP && !(KVM_AMD=y && CRYPTO_DEV_CCP_DD=m)
8989 ---help---
9090 Provides support for launching Encrypted VMs on AMD processors.
9191
arch/x86/kvm/mmu.c+1−1
@@ -890,7 +890,7 @@ static int mmu_topup_memory_cache_page(struct kvm_mmu_memory_cache *cache, · 889 unmodified lines
890890 if (cache->nobjs >= min)
891891 return 0;
892892 while (cache->nobjs < ARRAY_SIZE(cache->objects)) {
893− page = (void *)__get_free_page(GFP_KERNEL);
893+ page = (void *)__get_free_page(GFP_KERNEL_ACCOUNT);
894894 if (!page)
895895 return -ENOMEM;
896896 cache->objects[cache->nobjs++] = page;
arch/x86/kvm/vmx.c+119−31
@@ -1705,6 +1705,17 @@ static inline bool nested_cpu_has_vmwrite_any_field(struct kvm_vcpu *vcpu) · 1704 unmodified lines
17051705 MSR_IA32_VMX_MISC_VMWRITE_SHADOW_RO_FIELDS;
17061706 }
17071707
1708+static inline bool nested_cpu_has_zero_length_injection(struct kvm_vcpu *vcpu)
1709+{
1710+ return to_vmx(vcpu)->nested.msrs.misc_low & VMX_MISC_ZERO_LEN_INS;
1711+}
1712+
1713+static inline bool nested_cpu_supports_monitor_trap_flag(struct kvm_vcpu *vcpu)
1714+{
1715+ return to_vmx(vcpu)->nested.msrs.procbased_ctls_high &
1716+ CPU_BASED_MONITOR_TRAP_FLAG;
1717+}
1718+
17081719 static inline bool nested_cpu_has(struct vmcs12 *vmcs12, u32 bit)
17091720 {
17101721 return vmcs12->cpu_based_vm_exec_control & bit;
@@ -2560,6 +2571,7 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu) · 849 unmodified lines
25602571 struct vcpu_vmx *vmx = to_vmx(vcpu);
25612572 #ifdef CONFIG_X86_64
25622573 int cpu = raw_smp_processor_id();
2574+ unsigned long fs_base, kernel_gs_base;
25632575 #endif
25642576 int i;
25652577
@@ -2575,12 +2587,20 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu) · 9 unmodified lines
25752587 vmx->host_state.gs_ldt_reload_needed = vmx->host_state.ldt_sel;
25762588
25772589 #ifdef CONFIG_X86_64
2578− save_fsgs_for_kvm();
2579− vmx->host_state.fs_sel = current->thread.fsindex;
2580− vmx->host_state.gs_sel = current->thread.gsindex;
2581−#else
2582− savesegment(fs, vmx->host_state.fs_sel);
2583− savesegment(gs, vmx->host_state.gs_sel);
2590+ if (likely(is_64bit_mm(current->mm))) {
2591+ save_fsgs_for_kvm();
2592+ vmx->host_state.fs_sel = current->thread.fsindex;
2593+ vmx->host_state.gs_sel = current->thread.gsindex;
2594+ fs_base = current->thread.fsbase;
2595+ kernel_gs_base = current->thread.gsbase;
2596+ } else {
2597+#endif
2598+ savesegment(fs, vmx->host_state.fs_sel);
2599+ savesegment(gs, vmx->host_state.gs_sel);
2600+#ifdef CONFIG_X86_64
2601+ fs_base = read_msr(MSR_FS_BASE);
2602+ kernel_gs_base = read_msr(MSR_KERNEL_GS_BASE);
2603+ }
25842604 #endif
25852605 if (!(vmx->host_state.fs_sel & 7)) {
25862606 vmcs_write16(HOST_FS_SELECTOR, vmx->host_state.fs_sel);
@@ -2600,10 +2620,10 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu) · 13 unmodified lines
26002620 savesegment(ds, vmx->host_state.ds_sel);
26012621 savesegment(es, vmx->host_state.es_sel);
26022622
2603− vmcs_writel(HOST_FS_BASE, current->thread.fsbase);
2623+ vmcs_writel(HOST_FS_BASE, fs_base);
26042624 vmcs_writel(HOST_GS_BASE, cpu_kernelmode_gs_base(cpu));
26052625
2606− vmx->msr_host_kernel_gs_base = current->thread.gsbase;
2626+ vmx->msr_host_kernel_gs_base = kernel_gs_base;
26072627 if (is_long_mode(&vmx->vcpu))
26082628 wrmsrl(MSR_KERNEL_GS_BASE, vmx->msr_guest_kernel_gs_base);
26092629 #else
@@ -4311,11 +4331,7 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf) · 1701 unmodified lines
43114331 vmcs_conf->order = get_order(vmcs_conf->size);
43124332 vmcs_conf->basic_cap = vmx_msr_high & ~0x1fff;
43134333
4314− /* KVM supports Enlightened VMCS v1 only */
4315− if (static_branch_unlikely(&enable_evmcs))
4316− vmcs_conf->revision_id = KVM_EVMCS_VERSION;
4317− else
4318− vmcs_conf->revision_id = vmx_msr_low;
4334+ vmcs_conf->revision_id = vmx_msr_low;
43194335
43204336 vmcs_conf->pin_based_exec_ctrl = _pin_based_exec_control;
43214337 vmcs_conf->cpu_based_exec_ctrl = _cpu_based_exec_control;
@@ -4385,7 +4401,13 @@ static struct vmcs *alloc_vmcs_cpu(int cpu) · 63 unmodified lines
43854401 return NULL;
43864402 vmcs = page_address(pages);
43874403 memset(vmcs, 0, vmcs_config.size);
4388− vmcs->revision_id = vmcs_config.revision_id; /* vmcs revision id */
4404+
4405+ /* KVM supports Enlightened VMCS v1 only */
4406+ if (static_branch_unlikely(&enable_evmcs))
4407+ vmcs->revision_id = KVM_EVMCS_VERSION;
4408+ else
4409+ vmcs->revision_id = vmcs_config.revision_id;
4410+
43894411 return vmcs;
43904412 }
43914413
@@ -4553,6 +4575,19 @@ static __init int alloc_kvm_area(void) · 161 unmodified lines
45534575 return -ENOMEM;
45544576 }
45554577
4578+ /*
4579+ * When eVMCS is enabled, alloc_vmcs_cpu() sets
4580+ * vmcs->revision_id to KVM_EVMCS_VERSION instead of
4581+ * revision_id reported by MSR_IA32_VMX_BASIC.
4582+ *
4583+ * However, even though not explictly documented by
4584+ * TLFS, VMXArea passed as VMXON argument should
4585+ * still be marked with revision_id reported by
4586+ * physical CPU.
4587+ */
4588+ if (static_branch_unlikely(&enable_evmcs))
4589+ vmcs->revision_id = vmcs_config.revision_id;
4590+
45564591 per_cpu(vmxarea, cpu) = vmcs;
45574592 }
45584593 return 0;
@@ -7858,6 +7893,8 @@ static int enter_vmx_operation(struct kvm_vcpu *vcpu) · 3299 unmodified lines
78587893 HRTIMER_MODE_REL_PINNED);
78597894 vmx->nested.preemption_timer.function = vmx_preemption_timer_fn;
78607895
7896+ vmx->nested.vpid02 = allocate_vpid();
7897+
78617898 vmx->nested.vmxon = true;
78627899 return 0;
78637900
@@ -8445,21 +8482,20 @@ static int handle_vmptrld(struct kvm_vcpu *vcpu) · 581 unmodified lines
84458482 /* Emulate the VMPTRST instruction */
84468483 static int handle_vmptrst(struct kvm_vcpu *vcpu)
84478484 {
8448− unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION);
8449− u32 vmx_instruction_info = vmcs_read32(VMX_INSTRUCTION_INFO);
8450− gva_t vmcs_gva;
8485+ unsigned long exit_qual = vmcs_readl(EXIT_QUALIFICATION);
8486+ u32 instr_info = vmcs_read32(VMX_INSTRUCTION_INFO);
8487+ gpa_t current_vmptr = to_vmx(vcpu)->nested.current_vmptr;
84518488 struct x86_exception e;
8489+ gva_t gva;
84528490
84538491 if (!nested_vmx_check_permission(vcpu))
84548492 return 1;
84558493
8456− if (get_vmx_mem_address(vcpu, exit_qualification,
8457− vmx_instruction_info, true, &vmcs_gva))
8494+ if (get_vmx_mem_address(vcpu, exit_qual, instr_info, true, &gva))
84588495 return 1;
84598496 /* *_system ok, nested_vmx_check_permission has verified cpl=0 */
8460− if (kvm_write_guest_virt_system(vcpu, vmcs_gva,
8461− (void *)&to_vmx(vcpu)->nested.current_vmptr,
8462− sizeof(u64), &e)) {
8497+ if (kvm_write_guest_virt_system(vcpu, gva, (void *)&current_vmptr,
8498+ sizeof(gpa_t), &e)) {
84638499 kvm_inject_page_fault(vcpu, &e);
84648500 return 1;
84658501 }
@@ -10335,11 +10371,9 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id) · 1869 unmodified lines
1033510371 goto free_vmcs;
1033610372 }
1033710373
10338− if (nested) {
10374+ if (nested)
1033910375 nested_vmx_setup_ctls_msrs(&vmx->nested.msrs,
1034010376 kvm_vcpu_apicv_active(&vmx->vcpu));
10341− vmx->nested.vpid02 = allocate_vpid();
10342− }
1034310377
1034410378 vmx->nested.posted_intr_nv = -1;
1034510379 vmx->nested.current_vmptr = -1ull;
@@ -10356,7 +10390,6 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id) · 10 unmodified lines
1035610390 return &vmx->vcpu;
1035710391
1035810392 free_vmcs:
10359− free_vpid(vmx->nested.vpid02);
1036010393 free_loaded_vmcs(vmx->loaded_vmcs);
1036110394 free_msrs:
1036210395 kfree(vmx->guest_msrs);
@@ -11620,6 +11653,62 @@ static int check_vmentry_prereqs(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) · 1257 unmodified lines
1162011653 !nested_cr3_valid(vcpu, vmcs12->host_cr3))
1162111654 return VMXERR_ENTRY_INVALID_HOST_STATE_FIELD;
1162211655
11656+ /*
11657+ * From the Intel SDM, volume 3:
11658+ * Fields relevant to VM-entry event injection must be set properly.
11659+ * These fields are the VM-entry interruption-information field, the
11660+ * VM-entry exception error code, and the VM-entry instruction length.
11661+ */
11662+ if (vmcs12->vm_entry_intr_info_field & INTR_INFO_VALID_MASK) {
11663+ u32 intr_info = vmcs12->vm_entry_intr_info_field;
11664+ u8 vector = intr_info & INTR_INFO_VECTOR_MASK;
11665+ u32 intr_type = intr_info & INTR_INFO_INTR_TYPE_MASK;
11666+ bool has_error_code = intr_info & INTR_INFO_DELIVER_CODE_MASK;
11667+ bool should_have_error_code;
11668+ bool urg = nested_cpu_has2(vmcs12,
11669+ SECONDARY_EXEC_UNRESTRICTED_GUEST);
11670+ bool prot_mode = !urg || vmcs12->guest_cr0 & X86_CR0_PE;
11671+
11672+ /* VM-entry interruption-info field: interruption type */
11673+ if (intr_type == INTR_TYPE_RESERVED ||
11674+ (intr_type == INTR_TYPE_OTHER_EVENT &&
11675+ !nested_cpu_supports_monitor_trap_flag(vcpu)))
11676+ return VMXERR_ENTRY_INVALID_CONTROL_FIELD;
11677+
11678+ /* VM-entry interruption-info field: vector */
11679+ if ((intr_type == INTR_TYPE_NMI_INTR && vector != NMI_VECTOR) ||
11680+ (intr_type == INTR_TYPE_HARD_EXCEPTION && vector > 31) ||
11681+ (intr_type == INTR_TYPE_OTHER_EVENT && vector != 0))
11682+ return VMXERR_ENTRY_INVALID_CONTROL_FIELD;
11683+
11684+ /* VM-entry interruption-info field: deliver error code */
11685+ should_have_error_code =
11686+ intr_type == INTR_TYPE_HARD_EXCEPTION && prot_mode &&
11687+ x86_exception_has_error_code(vector);
11688+ if (has_error_code != should_have_error_code)
11689+ return VMXERR_ENTRY_INVALID_CONTROL_FIELD;
11690+
11691+ /* VM-entry exception error code */
11692+ if (has_error_code &&
11693+ vmcs12->vm_entry_exception_error_code & GENMASK(31, 15))
11694+ return VMXERR_ENTRY_INVALID_CONTROL_FIELD;
11695+
11696+ /* VM-entry interruption-info field: reserved bits */
11697+ if (intr_info & INTR_INFO_RESVD_BITS_MASK)
11698+ return VMXERR_ENTRY_INVALID_CONTROL_FIELD;
11699+
11700+ /* VM-entry instruction length */
11701+ switch (intr_type) {
11702+ case INTR_TYPE_SOFT_EXCEPTION:
11703+ case INTR_TYPE_SOFT_INTR:
11704+ case INTR_TYPE_PRIV_SW_EXCEPTION:
11705+ if ((vmcs12->vm_entry_instruction_len > 15) ||
11706+ (vmcs12->vm_entry_instruction_len == 0 &&
11707+ !nested_cpu_has_zero_length_injection(vcpu)))
11708+ return VMXERR_ENTRY_INVALID_CONTROL_FIELD;
11709+ }
11710+ }
11711+
1162311712 return 0;
1162411713 }
1162511714
@@ -11686,7 +11775,6 @@ static int enter_vmx_non_root_mode(struct kvm_vcpu *vcpu) · 60 unmodified lines
1168611775 {
1168711776 struct vcpu_vmx *vmx = to_vmx(vcpu);
1168811777 struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
11689− u32 msr_entry_idx;
1169011778 u32 exit_qual;
1169111779 int r;
1169211780
@@ -11708,10 +11796,10 @@ static int enter_vmx_non_root_mode(struct kvm_vcpu *vcpu) · 15 unmodified lines
1170811796 nested_get_vmcs12_pages(vcpu, vmcs12);
1170911797
1171011798 r = EXIT_REASON_MSR_LOAD_FAIL;
11711− msr_entry_idx = nested_vmx_load_msr(vcpu,
11712− vmcs12->vm_entry_msr_load_addr,
11713− vmcs12->vm_entry_msr_load_count);
11714− if (msr_entry_idx)
11799+ exit_qual = nested_vmx_load_msr(vcpu,
11800+ vmcs12->vm_entry_msr_load_addr,
11801+ vmcs12->vm_entry_msr_load_count);
11802+ if (exit_qual)
1171511803 goto fail;
1171611804
1171711805 /*
arch/x86/kvm/x86.c+3−1
@@ -1097,6 +1097,7 @@ static u32 msr_based_features[] = { · 1096 unmodified lines
10971097
10981098 MSR_F10H_DECFG,
10991099 MSR_IA32_UCODE_REV,
1100+ MSR_IA32_ARCH_CAPABILITIES,
11001101 };
11011102
11021103 static unsigned int num_msr_based_features;
@@ -1105,7 +1106,8 @@ static int kvm_get_msr_feature(struct kvm_msr_entry *msr) · 2 unmodified lines
11051106 {
11061107 switch (msr->index) {
11071108 case MSR_IA32_UCODE_REV:
1108− rdmsrl(msr->index, msr->data);
1109+ case MSR_IA32_ARCH_CAPABILITIES:
1110+ rdmsrl_safe(msr->index, &msr->data);
11091111 break;
11101112 default:
11111113 if (kvm_x86_ops->get_msr_feature(msr))
arch/x86/kvm/x86.h+9−0
@@ -110,6 +110,15 @@ static inline bool is_la57_mode(struct kvm_vcpu *vcpu) · 109 unmodified lines
110110 #endif
111111 }
112112
113+static inline bool x86_exception_has_error_code(unsigned int vector)
114+{
115+ static u32 exception_has_error_code = BIT(DF_VECTOR) | BIT(TS_VECTOR) |
116+ BIT(NP_VECTOR) | BIT(SS_VECTOR) | BIT(GP_VECTOR) |
117+ BIT(PF_VECTOR) | BIT(AC_VECTOR);
118+
119+ return (1U << vector) & exception_has_error_code;
120+}
121+
113122 static inline bool mmu_is_nested(struct kvm_vcpu *vcpu)
114123 {
115124 return vcpu->arch.walk_mmu == &vcpu->arch.nested_mmu;
arch/x86/mm/fault.c+7−14
@@ -641,11 +641,6 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address) · 640 unmodified lines
641641 return 0;
642642 }
643643
644−static const char nx_warning[] = KERN_CRIT
645−"kernel tried to execute NX-protected page - exploit attempt? (uid: %d)\n";
646−static const char smep_warning[] = KERN_CRIT
647−"unable to execute userspace code (SMEP?) (uid: %d)\n";
648−
649644 static void
650645 show_fault_oops(struct pt_regs *regs, unsigned long error_code,
651646 unsigned long address)
@@ -664,20 +659,18 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code, · 12 unmodified lines
664659 pte = lookup_address_in_pgd(pgd, address, &level);
665660
666661 if (pte && pte_present(*pte) && !pte_exec(*pte))
667− printk(nx_warning, from_kuid(&init_user_ns, current_uid()));
662+ pr_crit("kernel tried to execute NX-protected page - exploit attempt? (uid: %d)\n",
663+ from_kuid(&init_user_ns, current_uid()));
668664 if (pte && pte_present(*pte) && pte_exec(*pte) &&
669665 (pgd_flags(*pgd) & _PAGE_USER) &&
670666 (__read_cr4() & X86_CR4_SMEP))
671− printk(smep_warning, from_kuid(&init_user_ns, current_uid()));
667+ pr_crit("unable to execute userspace code (SMEP?) (uid: %d)\n",
668+ from_kuid(&init_user_ns, current_uid()));
672669 }
673670
674− printk(KERN_ALERT "BUG: unable to handle kernel ");
675− if (address < PAGE_SIZE)
676− printk(KERN_CONT "NULL pointer dereference");
677− else
678− printk(KERN_CONT "paging request");
679−
680− printk(KERN_CONT " at %px\n", (void *) address);
671+ pr_alert("BUG: unable to handle kernel %s at %px\n",
672+ address < PAGE_SIZE ? "NULL pointer dereference" : "paging request",
673+ (void *)address);
681674
682675 dump_pagetable(address);
683676 }
arch/x86/mm/init_64.c+16−4
@@ -1350,16 +1350,28 @@ int kern_addr_valid(unsigned long addr) · 1349 unmodified lines
13501350 /* Amount of ram needed to start using large blocks */
13511351 #define MEM_SIZE_FOR_LARGE_BLOCK (64UL << 30)
13521352
1353+/* Adjustable memory block size */
1354+static unsigned long set_memory_block_size;
1355+int __init set_memory_block_size_order(unsigned int order)
1356+{
1357+ unsigned long size = 1UL << order;
1358+
1359+ if (size > MEM_SIZE_FOR_LARGE_BLOCK || size < MIN_MEMORY_BLOCK_SIZE)
1360+ return -EINVAL;
1361+
1362+ set_memory_block_size = size;
1363+ return 0;
1364+}
1365+
13531366 static unsigned long probe_memory_block_size(void)
13541367 {
13551368 unsigned long boot_mem_end = max_pfn << PAGE_SHIFT;
13561369 unsigned long bz;
13571370
1358− /* If this is UV system, always set 2G block size */
1359− if (is_uv_system()) {
1360− bz = MAX_BLOCK_SIZE;
1371+ /* If memory block size has been set, then use it */
1372+ bz = set_memory_block_size;
1373+ if (bz)
13611374 goto done;
1362− }
13631375
13641376 /* Use regular block if RAM is smaller than MEM_SIZE_FOR_LARGE_BLOCK */
13651377 if (boot_mem_end < MEM_SIZE_FOR_LARGE_BLOCK) {
arch/x86/net/bpf_jit_comp32.c+4−4
@@ -1441,8 +1441,8 @@ static void emit_prologue(u8 **pprog, u32 stack_depth) · 1440 unmodified lines
14411441
14421442 /* sub esp,STACK_SIZE */
14431443 EMIT2_off32(0x81, 0xEC, STACK_SIZE);
1444− /* sub ebp,SCRATCH_SIZE+4+12*/
1445− EMIT3(0x83, add_1reg(0xE8, IA32_EBP), SCRATCH_SIZE + 16);
1444+ /* sub ebp,SCRATCH_SIZE+12*/
1445+ EMIT3(0x83, add_1reg(0xE8, IA32_EBP), SCRATCH_SIZE + 12);
14461446 /* xor ebx,ebx */
14471447 EMIT2(0x31, add_2reg(0xC0, IA32_EBX, IA32_EBX));
14481448
@@ -1475,8 +1475,8 @@ static void emit_epilogue(u8 **pprog, u32 stack_depth) · 26 unmodified lines
14751475 /* mov edx,dword ptr [ebp+off]*/
14761476 EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EDX), STACK_VAR(r0[1]));
14771477
1478− /* add ebp,SCRATCH_SIZE+4+12*/
1479− EMIT3(0x83, add_1reg(0xC0, IA32_EBP), SCRATCH_SIZE + 16);
1478+ /* add ebp,SCRATCH_SIZE+12*/
1479+ EMIT3(0x83, add_1reg(0xC0, IA32_EBP), SCRATCH_SIZE + 12);
14801480
14811481 /* mov ebx,dword ptr [ebp-12]*/
14821482 EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EBX), -12);
arch/x86/platform/efi/efi_64.c+3−3
@@ -166,14 +166,14 @@ void __init efi_call_phys_epilog(pgd_t *save_pgd) · 165 unmodified lines
166166 pgd = pgd_offset_k(pgd_idx * PGDIR_SIZE);
167167 set_pgd(pgd_offset_k(pgd_idx * PGDIR_SIZE), save_pgd[pgd_idx]);
168168
169− if (!(pgd_val(*pgd) & _PAGE_PRESENT))
169+ if (!pgd_present(*pgd))
170170 continue;
171171
172172 for (i = 0; i < PTRS_PER_P4D; i++) {
173173 p4d = p4d_offset(pgd,
174174 pgd_idx * PGDIR_SIZE + i * P4D_SIZE);
175175
176− if (!(p4d_val(*p4d) & _PAGE_PRESENT))
176+ if (!p4d_present(*p4d))
177177 continue;
178178
179179 pud = (pud_t *)p4d_page_vaddr(*p4d);
@@ -417,7 +417,7 @@ static void __init __map_region(efi_memory_desc_t *md, u64 va) · 237 unmodified lines
417417 if (!(md->attribute & EFI_MEMORY_WB))
418418 flags |= _PAGE_PCD;
419419
420− if (sev_active())
420+ if (sev_active() && md->type != EFI_MEMORY_MAPPED_IO)
421421 flags |= _PAGE_ENC;
422422
423423 pfn = md->phys_addr >> PAGE_SHIFT;
arch/x86/purgatory/Makefile+1−1
@@ -6,7 +6,7 @@ purgatory-y := purgatory.o stack.o setup-x86_$(BITS).o sha256.o entry64.o string · 5 unmodified lines
66 targets += $(purgatory-y)
77 PURGATORY_OBJS = $(addprefix $(obj)/,$(purgatory-y))
88
9−$(obj)/sha256.o: $(srctree)/lib/sha256.c
9+$(obj)/sha256.o: $(srctree)/lib/sha256.c FORCE
1010 $(call if_changed_rule,cc_o_c)
1111
1212 LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined -nostdlib -z nodefaultlib
arch/x86/um/mem_32.c+1−1
@@ -16,7 +16,7 @@ static int __init gate_vma_init(void) · 15 unmodified lines
1616 if (!FIXADDR_USER_START)
1717 return 0;
1818
19− gate_vma.vm_mm = NULL;
19+ vma_init(&gate_vma, NULL);
2020 gate_vma.vm_start = FIXADDR_USER_START;
2121 gate_vma.vm_end = FIXADDR_USER_END;
2222 gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC;
arch/x86/xen/enlighten.c+7−0
@@ -64,6 +64,13 @@ struct shared_info xen_dummy_shared_info; · 63 unmodified lines
6464 __read_mostly int xen_have_vector_callback;
6565 EXPORT_SYMBOL_GPL(xen_have_vector_callback);
6666
67+/*
68+ * NB: needs to live in .data because it's used by xen_prepare_pvh which runs
69+ * before clearing the bss.
70+ */
71+uint32_t xen_start_flags __attribute__((section(".data"))) = 0;
72+EXPORT_SYMBOL(xen_start_flags);
73+
6774 /*
6875 * Point at some empty memory to start with. We map the real shared_info
6976 * page as soon as fixmap is up and running.
arch/x86/xen/enlighten_pv.c+13−13
@@ -1203,15 +1203,24 @@ asmlinkage __visible void __init xen_start_kernel(void) · 1202 unmodified lines
12031203 return;
12041204
12051205 xen_domain_type = XEN_PV_DOMAIN;
1206+ xen_start_flags = xen_start_info->flags;
12061207
12071208 xen_setup_features();
12081209
1209− xen_setup_machphys_mapping();
1210−
12111210 /* Install Xen paravirt ops */
12121211 pv_info = xen_info;
12131212 pv_init_ops.patch = paravirt_patch_default;
12141213 pv_cpu_ops = xen_cpu_ops;
1214+ xen_init_irq_ops();
1215+
1216+ /*
1217+ * Setup xen_vcpu early because it is needed for
1218+ * local_irq_disable(), irqs_disabled(), e.g. in printk().
1219+ *
1220+ * Don't do the full vcpu_info placement stuff until we have
1221+ * the cpu_possible_mask and a non-dummy shared_info.
1222+ */
1223+ xen_vcpu_info_reset(0);
12151224
12161225 x86_platform.get_nmi_reason = xen_get_nmi_reason;
12171226
@@ -1224,10 +1233,12 @@ asmlinkage __visible void __init xen_start_kernel(void) · 6 unmodified lines
12241233 * Set up some pagetable state before starting to set any ptes.
12251234 */
12261235
1236+ xen_setup_machphys_mapping();
12271237 xen_init_mmu_ops();
12281238
12291239 /* Prevent unwanted bits from being set in PTEs. */
12301240 __supported_pte_mask &= ~_PAGE_GLOBAL;
1241+ __default_kernel_pte_mask &= ~_PAGE_GLOBAL;
12311242
12321243 /*
12331244 * Prevent page tables from being allocated in highmem, even
@@ -1248,20 +1259,9 @@ asmlinkage __visible void __init xen_start_kernel(void) · 14 unmodified lines
12481259 get_cpu_cap(&boot_cpu_data);
12491260 x86_configure_nx();
12501261
1251− xen_init_irq_ops();
1252−
12531262 /* Let's presume PV guests always boot on vCPU with id 0. */
12541263 per_cpu(xen_vcpu_id, 0) = 0;
12551264
1256− /*
1257− * Setup xen_vcpu early because idt_setup_early_handler needs it for
1258− * local_irq_disable(), irqs_disabled().
1259− *
1260− * Don't do the full vcpu_info placement stuff until we have
1261− * the cpu_possible_mask and a non-dummy shared_info.
1262− */
1263− xen_vcpu_info_reset(0);
1264−
12651265 idt_setup_early_handler();
12661266
12671267 xen_init_capabilities();
arch/x86/xen/enlighten_pvh.c+1−0
@@ -97,6 +97,7 @@ void __init xen_prepare_pvh(void) · 96 unmodified lines
9797 }
9898
9999 xen_pvh = 1;
100+ xen_start_flags = pvh_start_info.flags;
100101
101102 msr = cpuid_ebx(xen_cpuid_base() + 2);
102103 pfn = __pa(hypercall_page);
arch/x86/xen/irq.c+1−3
@@ -128,8 +128,6 @@ static const struct pv_irq_ops xen_irq_ops __initconst = { · 127 unmodified lines
128128
129129 void __init xen_init_irq_ops(void)
130130 {
131− /* For PVH we use default pv_irq_ops settings. */
132− if (!xen_feature(XENFEAT_hvm_callback_vector))
133− pv_irq_ops = xen_irq_ops;
131+ pv_irq_ops = xen_irq_ops;
134132 x86_init.irqs.intr_init = xen_init_IRQ;
135133 }
arch/x86/xen/smp_pv.c+5−0
@@ -32,6 +32,7 @@ · 31 unmodified lines
3232 #include <xen/interface/vcpu.h>
3333 #include <xen/interface/xenpmu.h>
3434
35+#include <asm/spec-ctrl.h>
3536 #include <asm/xen/interface.h>
3637 #include <asm/xen/hypercall.h>
3738
@@ -70,6 +71,8 @@ static void cpu_bringup(void) · 32 unmodified lines
7071 cpu_data(cpu).x86_max_cores = 1;
7172 set_cpu_sibling_map(cpu);
7273
74+ speculative_store_bypass_ht_init();
75+
7376 xen_setup_cpu_clockevents();
7477
7578 notify_cpu_starting(cpu);
@@ -250,6 +253,8 @@ static void __init xen_pv_smp_prepare_cpus(unsigned int max_cpus) · 174 unmodified lines
250253 }
251254 set_cpu_sibling_map(0);
252255
256+ speculative_store_bypass_ht_init();
257+
253258 xen_pmu_init(0);
254259
255260 if (xen_smp_intr_init(0) || xen_smp_intr_init_pv(0))
block/bio.c+41−16
@@ -903,25 +903,27 @@ int bio_add_page(struct bio *bio, struct page *page, · 902 unmodified lines
903903 EXPORT_SYMBOL(bio_add_page);
904904
905905 /**
906− * bio_iov_iter_get_pages - pin user or kernel pages and add them to a bio
906+ * __bio_iov_iter_get_pages - pin user or kernel pages and add them to a bio
907907 * @bio: bio to add pages to
908908 * @iter: iov iterator describing the region to be mapped
909909 *
910− * Pins as many pages from *iter and appends them to @bio's bvec array. The
910+ * Pins pages from *iter and appends them to @bio's bvec array. The
911911 * pages will have to be released using put_page() when done.
912+ * For multi-segment *iter, this function only adds pages from the
913+ * the next non-empty segment of the iov iterator.
912914 */
913−int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
915+static int __bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
914916 {
915− unsigned short nr_pages = bio->bi_max_vecs - bio->bi_vcnt;
917+ unsigned short nr_pages = bio->bi_max_vecs - bio->bi_vcnt, idx;
916918 struct bio_vec *bv = bio->bi_io_vec + bio->bi_vcnt;
917919 struct page **pages = (struct page **)bv;
918− size_t offset, diff;
920+ size_t offset;
919921 ssize_t size;
920922
921923 size = iov_iter_get_pages(iter, pages, LONG_MAX, nr_pages, &offset);
922924 if (unlikely(size <= 0))
923925 return size ? size : -EFAULT;
924− nr_pages = (size + offset + PAGE_SIZE - 1) / PAGE_SIZE;
926+ idx = nr_pages = (size + offset + PAGE_SIZE - 1) / PAGE_SIZE;
925927
926928 /*
927929 * Deep magic below: We need to walk the pinned pages backwards
@@ -934,21 +936,46 @@ int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter) · 6 unmodified lines
934936 bio->bi_iter.bi_size += size;
935937 bio->bi_vcnt += nr_pages;
936938
937− diff = (nr_pages * PAGE_SIZE - offset) - size;
938− while (nr_pages--) {
939− bv[nr_pages].bv_page = pages[nr_pages];
940− bv[nr_pages].bv_len = PAGE_SIZE;
941− bv[nr_pages].bv_offset = 0;
939+ while (idx--) {
940+ bv[idx].bv_page = pages[idx];
941+ bv[idx].bv_len = PAGE_SIZE;
942+ bv[idx].bv_offset = 0;
942943 }
943944
944945 bv[0].bv_offset += offset;
945946 bv[0].bv_len -= offset;
946− if (diff)
947− bv[bio->bi_vcnt - 1].bv_len -= diff;
947+ bv[nr_pages - 1].bv_len -= nr_pages * PAGE_SIZE - offset - size;
948948
949949 iov_iter_advance(iter, size);
950950 return 0;
951951 }
952+
953+/**
954+ * bio_iov_iter_get_pages - pin user or kernel pages and add them to a bio
955+ * @bio: bio to add pages to
956+ * @iter: iov iterator describing the region to be mapped
957+ *
958+ * Pins pages from *iter and appends them to @bio's bvec array. The
959+ * pages will have to be released using put_page() when done.
960+ * The function tries, but does not guarantee, to pin as many pages as
961+ * fit into the bio, or are requested in *iter, whatever is smaller.
962+ * If MM encounters an error pinning the requested pages, it stops.
963+ * Error is returned only if 0 pages could be pinned.
964+ */
965+int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
966+{
967+ unsigned short orig_vcnt = bio->bi_vcnt;
968+
969+ do {
970+ int ret = __bio_iov_iter_get_pages(bio, iter);
971+
972+ if (unlikely(ret))
973+ return bio->bi_vcnt > orig_vcnt ? 0 : ret;
974+
975+ } while (iov_iter_count(iter) && !bio_full(bio));
976+
977+ return 0;
978+}
952979 EXPORT_SYMBOL_GPL(bio_iov_iter_get_pages);
953980
954981 static void submit_bio_wait_endio(struct bio *bio)
@@ -1807,9 +1834,6 @@ again: · 852 unmodified lines
18071834 if (!bio_integrity_endio(bio))
18081835 return;
18091836
1810− if (WARN_ONCE(bio->bi_next, "driver left bi_next not NULL"))
1811− bio->bi_next = NULL;
1812−
18131837 /*
18141838 * Need to have a real endio function for chained bios, otherwise
18151839 * various corner cases will break (like stacking block devices that
@@ -1869,6 +1893,7 @@ struct bio *bio_split(struct bio *bio, int sectors, · 53 unmodified lines
18691893 bio_integrity_trim(split);
18701894
18711895 bio_advance(bio, split->bi_iter.bi_size);
1896+ bio->bi_iter.bi_done = 0;
18721897
18731898 if (bio_flagged(bio, BIO_TRACE_COMPLETION))
18741899 bio_set_flag(split, BIO_TRACE_COMPLETION);
block/blk-core.c+8−9
@@ -273,10 +273,6 @@ static void req_bio_endio(struct request *rq, struct bio *bio, · 272 unmodified lines
273273 bio_advance(bio, nbytes);
274274
275275 /* don't actually finish bio if it's part of flush sequence */
276− /*
277− * XXX this code looks suspicious - it's not consistent with advancing
278− * req->bio in caller
279− */
280276 if (bio->bi_iter.bi_size == 0 && !(rq->rq_flags & RQF_FLUSH_SEQ))
281277 bio_endio(bio);
282278 }
@@ -2159,11 +2155,12 @@ static inline bool bio_check_ro(struct bio *bio, struct hd_struct *part) · 1876 unmodified lines
21592155 if (part->policy && op_is_write(bio_op(bio))) {
21602156 char b[BDEVNAME_SIZE];
21612157
2162− printk(KERN_ERR
2158+ WARN_ONCE(1,
21632159 "generic_make_request: Trying to write "
21642160 "to read-only block-device %s (partno %d)\n",
21652161 bio_devname(bio, b), part->partno);
2166− return true;
2162+ /* Older lvm-tools actually trigger this */
2163+ return false;
21672164 }
21682165
21692166 return false;
@@ -3081,10 +3078,8 @@ bool blk_update_request(struct request *req, blk_status_t error, · 911 unmodified lines
30813078 struct bio *bio = req->bio;
30823079 unsigned bio_bytes = min(bio->bi_iter.bi_size, nr_bytes);
30833080
3084− if (bio_bytes == bio->bi_iter.bi_size) {
3081+ if (bio_bytes == bio->bi_iter.bi_size)
30853082 req->bio = bio->bi_next;
3086− bio->bi_next = NULL;
3087− }
30883083
30893084 /* Completion has already been traced */
30903085 bio_clear_flag(bio, BIO_TRACE_COMPLETION);
@@ -3479,6 +3474,10 @@ static void __blk_rq_prep_clone(struct request *dst, struct request *src) · 388 unmodified lines
34793474 dst->cpu = src->cpu;
34803475 dst->__sector = blk_rq_pos(src);
34813476 dst->__data_len = blk_rq_bytes(src);
3477+ if (src->rq_flags & RQF_SPECIAL_PAYLOAD) {
3478+ dst->rq_flags |= RQF_SPECIAL_PAYLOAD;
3479+ dst->special_vec = src->special_vec;
3480+ }
34823481 dst->nr_phys_segments = src->nr_phys_segments;
34833482 dst->ioprio = src->ioprio;
34843483 dst->extra_len = src->extra_len;
block/blk-mq-debugfs.c+1−1
@@ -356,7 +356,7 @@ static const char *const blk_mq_rq_state_name_array[] = { · 355 unmodified lines
356356
357357 static const char *blk_mq_rq_state_name(enum mq_rq_state rq_state)
358358 {
359− if (WARN_ON_ONCE((unsigned int)rq_state >
359+ if (WARN_ON_ONCE((unsigned int)rq_state >=
360360 ARRAY_SIZE(blk_mq_rq_state_name_array)))
361361 return "(?)";
362362 return blk_mq_rq_state_name_array[rq_state];
block/blk-mq-tag.c+1−1
@@ -271,7 +271,7 @@ static bool bt_tags_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data) · 270 unmodified lines
271271 * test and set the bit before assining ->rqs[].
272272 */
273273 rq = tags->rqs[bitnr];
274− if (rq && blk_mq_rq_state(rq) == MQ_RQ_IN_FLIGHT)
274+ if (rq && blk_mq_request_started(rq))
275275 iter_data->fn(rq, iter_data->data, reserved);
276276
277277 return true;
block/blk-mq.c+13−4
@@ -558,10 +558,8 @@ static void __blk_mq_complete_request(struct request *rq) · 557 unmodified lines
558558 bool shared = false;
559559 int cpu;
560560
561− if (cmpxchg(&rq->state, MQ_RQ_IN_FLIGHT, MQ_RQ_COMPLETE) !=
562− MQ_RQ_IN_FLIGHT)
561+ if (!blk_mq_mark_complete(rq))
563562 return;
564−
565563 if (rq->internal_tag != -1)
566564 blk_mq_sched_completed_request(rq);
567565
@@ -781,7 +779,6 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved) · 213 unmodified lines
781779 WARN_ON_ONCE(ret != BLK_EH_RESET_TIMER);
782780 }
783781
784− req->rq_flags &= ~RQF_TIMED_OUT;
785782 blk_add_timer(req);
786783 }
787784
@@ -1076,6 +1073,9 @@ static bool blk_mq_mark_tag_wait(struct blk_mq_hw_ctx **hctx, · 288 unmodified lines
10761073
10771074 #define BLK_MQ_RESOURCE_DELAY 3 /* ms units */
10781075
1076+/*
1077+ * Returns true if we did some work AND can potentially do more.
1078+ */
10791079 bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list,
10801080 bool got_budget)
10811081 {
@@ -1206,8 +1206,17 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list, · 124 unmodified lines
12061206 blk_mq_run_hw_queue(hctx, true);
12071207 else if (needs_restart && (ret == BLK_STS_RESOURCE))
12081208 blk_mq_delay_run_hw_queue(hctx, BLK_MQ_RESOURCE_DELAY);
1209+
1210+ return false;
12091211 }
12101212
1213+ /*
1214+ * If the host/device is unable to accept more work, inform the
1215+ * caller of that.
1216+ */
1217+ if (ret == BLK_STS_RESOURCE || ret == BLK_STS_DEV_RESOURCE)
1218+ return false;
1219+
12111220 return (queued + errors) != 0;
12121221 }
12131222
block/blk-softirq.c+1−0
@@ -144,6 +144,7 @@ do_local: · 143 unmodified lines
144144
145145 local_irq_restore(flags);
146146 }
147+EXPORT_SYMBOL(__blk_complete_request);
147148
148149 /**
149150 * blk_complete_request - end I/O on a request
block/blk-timeout.c+1−0
@@ -210,6 +210,7 @@ void blk_add_timer(struct request *req) · 209 unmodified lines
210210 if (!req->timeout)
211211 req->timeout = q->rq_timeout;
212212
213+ req->rq_flags &= ~RQF_TIMED_OUT;
213214 blk_rq_set_deadline(req, jiffies + req->timeout);
214215
215216 /*
block/bsg.c+0−2
@@ -267,8 +267,6 @@ bsg_map_hdr(struct request_queue *q, struct sg_io_v4 *hdr, fmode_t mode) · 266 unmodified lines
267267 } else if (hdr->din_xfer_len) {
268268 ret = blk_rq_map_user(q, rq, NULL, uptr64(hdr->din_xferp),
269269 hdr->din_xfer_len, GFP_KERNEL);
270− } else {
271− ret = blk_rq_map_user(q, rq, NULL, NULL, 0, GFP_KERNEL);
272270 }
273271
274272 if (ret)
block/sed-opal.c+2−2
@@ -877,7 +877,7 @@ static size_t response_get_string(const struct parsed_resp *resp, int n, · 876 unmodified lines
877877 return 0;
878878 }
879879
880− if (n > resp->num) {
880+ if (n >= resp->num) {
881881 pr_debug("Response has %d tokens. Can't access %d\n",
882882 resp->num, n);
883883 return 0;
@@ -916,7 +916,7 @@ static u64 response_get_u64(const struct parsed_resp *resp, int n) · 32 unmodified lines
916916 return 0;
917917 }
918918
919− if (n > resp->num) {
919+ if (n >= resp->num) {
920920 pr_debug("Response has %d tokens. Can't access %d\n",
921921 resp->num, n);
922922 return 0;
certs/blacklist.h+1−1
@@ -1,3 +1,3 @@
11 #include <linux/kernel.h>
22
3−extern const char __initdata *const blacklist_hashes[];
3+extern const char __initconst *const blacklist_hashes[];
crypto/af_alg.c+13−4
@@ -1060,12 +1060,19 @@ void af_alg_async_cb(struct crypto_async_request *_req, int err) · 1059 unmodified lines
10601060 }
10611061 EXPORT_SYMBOL_GPL(af_alg_async_cb);
10621062
1063−__poll_t af_alg_poll_mask(struct socket *sock, __poll_t events)
1063+/**
1064+ * af_alg_poll - poll system call handler
1065+ */
1066+__poll_t af_alg_poll(struct file *file, struct socket *sock,
1067+ poll_table *wait)
10641068 {
10651069 struct sock *sk = sock->sk;
10661070 struct alg_sock *ask = alg_sk(sk);
10671071 struct af_alg_ctx *ctx = ask->private;
1068− __poll_t mask = 0;
1072+ __poll_t mask;
1073+
1074+ sock_poll_wait(file, sk_sleep(sk), wait);
1075+ mask = 0;
10691076
10701077 if (!ctx->more || ctx->used)
10711078 mask |= EPOLLIN | EPOLLRDNORM;
@@ -1075,7 +1082,7 @@ __poll_t af_alg_poll_mask(struct socket *sock, __poll_t events) · 3 unmodified lines
10751082
10761083 return mask;
10771084 }
1078−EXPORT_SYMBOL_GPL(af_alg_poll_mask);
1085+EXPORT_SYMBOL_GPL(af_alg_poll);
10791086
10801087 /**
10811088 * af_alg_alloc_areq - allocate struct af_alg_async_req
@@ -1148,8 +1155,10 @@ int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags, · 66 unmodified lines
11481155
11491156 /* make one iovec available as scatterlist */
11501157 err = af_alg_make_sg(&rsgl->sgl, &msg->msg_iter, seglen);
1151− if (err < 0)
1158+ if (err < 0) {
1159+ rsgl->sg_num_bytes = 0;
11521160 return err;
1161+ }
11531162
11541163 /* chain the new scatterlist with previous one */
11551164 if (areq->last_rsgl)
crypto/algif_aead.c+2−2
@@ -375,7 +375,7 @@ static struct proto_ops algif_aead_ops = { · 374 unmodified lines
375375 .sendmsg = aead_sendmsg,
376376 .sendpage = af_alg_sendpage,
377377 .recvmsg = aead_recvmsg,
378− .poll_mask = af_alg_poll_mask,
378+ .poll = af_alg_poll,
379379 };
380380
381381 static int aead_check_key(struct socket *sock)
@@ -471,7 +471,7 @@ static struct proto_ops algif_aead_ops_nokey = { · 89 unmodified lines
471471 .sendmsg = aead_sendmsg_nokey,
472472 .sendpage = aead_sendpage_nokey,
473473 .recvmsg = aead_recvmsg_nokey,
474− .poll_mask = af_alg_poll_mask,
474+ .poll = af_alg_poll,
475475 };
476476
477477 static void *aead_bind(const char *name, u32 type, u32 mask)
crypto/algif_skcipher.c+2−2
@@ -206,7 +206,7 @@ static struct proto_ops algif_skcipher_ops = { · 205 unmodified lines
206206 .sendmsg = skcipher_sendmsg,
207207 .sendpage = af_alg_sendpage,
208208 .recvmsg = skcipher_recvmsg,
209− .poll_mask = af_alg_poll_mask,
209+ .poll = af_alg_poll,
210210 };
211211
212212 static int skcipher_check_key(struct socket *sock)
@@ -302,7 +302,7 @@ static struct proto_ops algif_skcipher_ops_nokey = { · 89 unmodified lines
302302 .sendmsg = skcipher_sendmsg_nokey,
303303 .sendpage = skcipher_sendpage_nokey,
304304 .recvmsg = skcipher_recvmsg_nokey,
305− .poll_mask = af_alg_poll_mask,
305+ .poll = af_alg_poll,
306306 };
307307
308308 static void *skcipher_bind(const char *name, u32 type, u32 mask)
crypto/asymmetric_keys/x509_cert_parser.c+9−0
@@ -249,6 +249,15 @@ int x509_note_signature(void *context, size_t hdrlen, · 248 unmodified lines
249249 return -EINVAL;
250250 }
251251
252+ if (strcmp(ctx->cert->sig->pkey_algo, "rsa") == 0) {
253+ /* Discard the BIT STRING metadata */
254+ if (vlen < 1 || *(const u8 *)value != 0)
255+ return -EBADMSG;
256+
257+ value++;
258+ vlen--;
259+ }
260+
252261 ctx->cert->raw_sig = value;
253262 ctx->cert->raw_sig_size = vlen;
254263 return 0;
crypto/morus640.c+2−1
@@ -274,8 +274,9 @@ static void crypto_morus640_decrypt_chunk(struct morus640_state *state, u8 *dst, · 273 unmodified lines
274274 union morus640_block_in tail;
275275
276276 memcpy(tail.bytes, src, size);
277+ memset(tail.bytes + size, 0, MORUS640_BLOCK_SIZE - size);
277278
278− crypto_morus640_load_a(&m, src);
279+ crypto_morus640_load_a(&m, tail.bytes);
279280 crypto_morus640_core(state, &m);
280281 crypto_morus640_store_a(tail.bytes, &m);
281282 memset(tail.bytes + size, 0, MORUS640_BLOCK_SIZE - size);
crypto/sha3_generic.c+1−1
@@ -152,7 +152,7 @@ static SHA3_INLINE void keccakf_round(u64 st[25]) · 151 unmodified lines
152152 st[24] ^= bc[ 4];
153153 }
154154
155−static void __optimize("O3") keccakf(u64 st[25])
155+static void keccakf(u64 st[25])
156156 {
157157 int round;
158158
drivers/acpi/acpi_lpss.c+13−1
@@ -22,6 +22,7 @@ · 21 unmodified lines
2222 #include <linux/pm_domain.h>
2323 #include <linux/pm_runtime.h>
2424 #include <linux/pwm.h>
25+#include <linux/suspend.h>
2526 #include <linux/delay.h>
2627
2728 #include "internal.h"
@@ -878,6 +879,7 @@ static void acpi_lpss_dismiss(struct device *dev) · 850 unmodified lines
878879 #define LPSS_GPIODEF0_DMA_LLP BIT(13)
879880
880881 static DEFINE_MUTEX(lpss_iosf_mutex);
882+static bool lpss_iosf_d3_entered;
881883
882884 static void lpss_iosf_enter_d3_state(void)
883885 {
@@ -920,6 +922,9 @@ static void lpss_iosf_enter_d3_state(void) · 36 unmodified lines
920922
921923 iosf_mbi_modify(LPSS_IOSF_UNIT_LPIOEP, MBI_CR_WRITE,
922924 LPSS_IOSF_GPIODEF0, value1, mask1);
925+
926+ lpss_iosf_d3_entered = true;
927+
923928 exit:
924929 mutex_unlock(&lpss_iosf_mutex);
925930 }
@@ -934,6 +939,11 @@ static void lpss_iosf_exit_d3_state(void) · 8 unmodified lines
934939
935940 mutex_lock(&lpss_iosf_mutex);
936941
942+ if (!lpss_iosf_d3_entered)
943+ goto exit;
944+
945+ lpss_iosf_d3_entered = false;
946+
937947 iosf_mbi_modify(LPSS_IOSF_UNIT_LPIOEP, MBI_CR_WRITE,
938948 LPSS_IOSF_GPIODEF0, value1, mask1);
939949
@@ -943,6 +953,7 @@ static void lpss_iosf_exit_d3_state(void) · 3 unmodified lines
943953 iosf_mbi_modify(LPSS_IOSF_UNIT_LPIO1, MBI_CFG_WRITE,
944954 LPSS_IOSF_PMCSR, value2, mask2);
945955
956+exit:
946957 mutex_unlock(&lpss_iosf_mutex);
947958 }
948959
@@ -961,7 +972,8 @@ static int acpi_lpss_suspend(struct device *dev, bool wakeup) · 12 unmodified lines
961972 * wrong status for devices being about to be powered off. See
962973 * lpss_iosf_enter_d3_state() for further information.
963974 */
964− if (lpss_quirks & LPSS_QUIRK_ALWAYS_POWER_ON && iosf_mbi_available())
975+ if (acpi_target_system_state() == ACPI_STATE_S0 &&
976+ lpss_quirks & LPSS_QUIRK_ALWAYS_POWER_ON && iosf_mbi_available())
965977 lpss_iosf_enter_d3_state();
966978
967979 return ret;
drivers/acpi/acpica/hwsleep.c+11−4
@@ -51,16 +51,23 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state) · 50 unmodified lines
5151 return_ACPI_STATUS(status);
5252 }
5353
54− /*
55− * 1) Disable all GPEs
56− * 2) Enable all wakeup GPEs
57− */
54+ /* Disable all GPEs */
5855 status = acpi_hw_disable_all_gpes();
5956 if (ACPI_FAILURE(status)) {
6057 return_ACPI_STATUS(status);
6158 }
59+ /*
60+ * If the target sleep state is S5, clear all GPEs and fixed events too
61+ */
62+ if (sleep_state == ACPI_STATE_S5) {
63+ status = acpi_hw_clear_acpi_status();
64+ if (ACPI_FAILURE(status)) {
65+ return_ACPI_STATUS(status);
66+ }
67+ }
6268 acpi_gbl_system_awake_and_running = FALSE;
6369
70+ /* Enable all wakeup GPEs */
6471 status = acpi_hw_enable_all_wakeup_gpes();
6572 if (ACPI_FAILURE(status)) {
6673 return_ACPI_STATUS(status);
drivers/acpi/acpica/psloop.c+31−0
@@ -497,6 +497,18 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) · 496 unmodified lines
497497 status =
498498 acpi_ps_create_op(walk_state, aml_op_start, &op);
499499 if (ACPI_FAILURE(status)) {
500+ /*
501+ * ACPI_PARSE_MODULE_LEVEL means that we are loading a table by
502+ * executing it as a control method. However, if we encounter
503+ * an error while loading the table, we need to keep trying to
504+ * load the table rather than aborting the table load. Set the
505+ * status to AE_OK to proceed with the table load.
506+ */
507+ if ((walk_state->
508+ parse_flags & ACPI_PARSE_MODULE_LEVEL)
509+ && status == AE_ALREADY_EXISTS) {
510+ status = AE_OK;
511+ }
500512 if (status == AE_CTRL_PARSE_CONTINUE) {
501513 continue;
502514 }
@@ -694,6 +706,25 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) · 191 unmodified lines
694706 acpi_ps_next_parse_state(walk_state, op, status);
695707 if (status == AE_CTRL_PENDING) {
696708 status = AE_OK;
709+ } else
710+ if ((walk_state->
711+ parse_flags & ACPI_PARSE_MODULE_LEVEL)
712+ && status != AE_CTRL_TRANSFER
713+ && ACPI_FAILURE(status)) {
714+ /*
715+ * ACPI_PARSE_MODULE_LEVEL flag means that we are currently
716+ * loading a table by executing it as a control method.
717+ * However, if we encounter an error while loading the table,
718+ * we need to keep trying to load the table rather than
719+ * aborting the table load (setting the status to AE_OK
720+ * continues the table load). If we get a failure at this
721+ * point, it means that the dispatcher got an error while
722+ * processing Op (most likely an AML operand error) or a
723+ * control method was called from module level and the
724+ * dispatcher returned AE_CTRL_TRANSFER. In the latter case,
725+ * leave the status alone, there's nothing wrong with it.
726+ */
727+ status = AE_OK;
697728 }
698729 }
699730
drivers/acpi/acpica/uterror.c+3−3
@@ -182,19 +182,19 @@ acpi_ut_prefixed_namespace_error(const char *module_name, · 181 unmodified lines
182182 switch (lookup_status) {
183183 case AE_ALREADY_EXISTS:
184184
185− acpi_os_printf("\n" ACPI_MSG_BIOS_ERROR);
185+ acpi_os_printf(ACPI_MSG_BIOS_ERROR);
186186 message = "Failure creating";
187187 break;
188188
189189 case AE_NOT_FOUND:
190190
191− acpi_os_printf("\n" ACPI_MSG_BIOS_ERROR);
191+ acpi_os_printf(ACPI_MSG_BIOS_ERROR);
192192 message = "Could not resolve";
193193 break;
194194
195195 default:
196196
197− acpi_os_printf("\n" ACPI_MSG_ERROR);
197+ acpi_os_printf(ACPI_MSG_ERROR);
198198 message = "Failure resolving";
199199 break;
200200 }
drivers/acpi/battery.c+5−4
@@ -717,10 +717,11 @@ void battery_hook_register(struct acpi_battery_hook *hook) · 716 unmodified lines
717717 */
718718 pr_err("extension failed to load: %s", hook->name);
719719 __battery_hook_unregister(hook, 0);
720− return;
720+ goto end;
721721 }
722722 }
723723 pr_info("new extension: %s\n", hook->name);
724+end:
724725 mutex_unlock(&hook_mutex);
725726 }
726727 EXPORT_SYMBOL_GPL(battery_hook_register);
@@ -732,7 +733,7 @@ EXPORT_SYMBOL_GPL(battery_hook_register); · 5 unmodified lines
732733 */
733734 static void battery_hook_add_battery(struct acpi_battery *battery)
734735 {
735− struct acpi_battery_hook *hook_node;
736+ struct acpi_battery_hook *hook_node, *tmp;
736737
737738 mutex_lock(&hook_mutex);
738739 INIT_LIST_HEAD(&battery->list);
@@ -744,15 +745,15 @@ static void battery_hook_add_battery(struct acpi_battery *battery) · 5 unmodified lines
744745 * when a battery gets hotplugged or initialized
745746 * during the battery module initialization.
746747 */
747− list_for_each_entry(hook_node, &battery_hook_list, list) {
748+ list_for_each_entry_safe(hook_node, tmp, &battery_hook_list, list) {
748749 if (hook_node->add_battery(battery->bat)) {
749750 /*
750751 * The notification of the extensions has failed, to
751752 * prevent further errors we will unload the extension.
752753 */
753− __battery_hook_unregister(hook_node, 0);
754754 pr_err("error in extension, unloading: %s",
755755 hook_node->name);
756+ __battery_hook_unregister(hook_node, 0);
756757 }
757758 }
758759 mutex_unlock(&hook_mutex);
drivers/acpi/ec.c+20−0
@@ -2037,6 +2037,17 @@ static inline void acpi_ec_query_exit(void) · 2036 unmodified lines
20372037 }
20382038 }
20392039
2040+static const struct dmi_system_id acpi_ec_no_wakeup[] = {
2041+ {
2042+ .ident = "Thinkpad X1 Carbon 6th",
2043+ .matches = {
2044+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
2045+ DMI_MATCH(DMI_PRODUCT_FAMILY, "Thinkpad X1 Carbon 6th"),
2046+ },
2047+ },
2048+ { },
2049+};
2050+
20402051 int __init acpi_ec_init(void)
20412052 {
20422053 int result;
@@ -2047,6 +2058,15 @@ int __init acpi_ec_init(void) · 4 unmodified lines
20472058 if (result)
20482059 return result;
20492060
2061+ /*
2062+ * Disable EC wakeup on following systems to prevent periodic
2063+ * wakeup from EC GPE.
2064+ */
2065+ if (dmi_check_system(acpi_ec_no_wakeup)) {
2066+ ec_no_wakeup = true;
2067+ pr_debug("Disabling EC wakeup on suspend-to-idle\n");
2068+ }
2069+
20502070 /* Drivers must be started after acpi_ec_query_init() */
20512071 dsdt_fail = acpi_bus_register_driver(&acpi_ec_driver);
20522072 /*
drivers/acpi/nfit/core.c+37−11
@@ -408,6 +408,8 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, · 407 unmodified lines
408408 const guid_t *guid;
409409 int rc, i;
410410
411+ if (cmd_rc)
412+ *cmd_rc = -EINVAL;
411413 func = cmd;
412414 if (cmd == ND_CMD_CALL) {
413415 call_pkg = buf;
@@ -518,6 +520,8 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, · 104 unmodified lines
518520 * If we return an error (like elsewhere) then caller wouldn't
519521 * be able to rely upon data returned to make calculation.
520522 */
523+ if (cmd_rc)
524+ *cmd_rc = 0;
521525 return 0;
522526 }
523527
@@ -1273,7 +1277,7 @@ static ssize_t scrub_show(struct device *dev, · 749 unmodified lines
12731277
12741278 mutex_lock(&acpi_desc->init_mutex);
12751279 rc = sprintf(buf, "%d%s", acpi_desc->scrub_count,
1276− work_busy(&acpi_desc->dwork.work)
1280+ acpi_desc->scrub_busy
12771281 && !acpi_desc->cancel ? "+\n" : "\n");
12781282 mutex_unlock(&acpi_desc->init_mutex);
12791283 }
@@ -2939,6 +2943,32 @@ static unsigned int __acpi_nfit_scrub(struct acpi_nfit_desc *acpi_desc, · 1659 unmodified lines
29392943 return 0;
29402944 }
29412945
2946+static void __sched_ars(struct acpi_nfit_desc *acpi_desc, unsigned int tmo)
2947+{
2948+ lockdep_assert_held(&acpi_desc->init_mutex);
2949+
2950+ acpi_desc->scrub_busy = 1;
2951+ /* note this should only be set from within the workqueue */
2952+ if (tmo)
2953+ acpi_desc->scrub_tmo = tmo;
2954+ queue_delayed_work(nfit_wq, &acpi_desc->dwork, tmo * HZ);
2955+}
2956+
2957+static void sched_ars(struct acpi_nfit_desc *acpi_desc)
2958+{
2959+ __sched_ars(acpi_desc, 0);
2960+}
2961+
2962+static void notify_ars_done(struct acpi_nfit_desc *acpi_desc)
2963+{
2964+ lockdep_assert_held(&acpi_desc->init_mutex);
2965+
2966+ acpi_desc->scrub_busy = 0;
2967+ acpi_desc->scrub_count++;
2968+ if (acpi_desc->scrub_count_state)
2969+ sysfs_notify_dirent(acpi_desc->scrub_count_state);
2970+}
2971+
29422972 static void acpi_nfit_scrub(struct work_struct *work)
29432973 {
29442974 struct acpi_nfit_desc *acpi_desc;
@@ -2949,14 +2979,10 @@ static void acpi_nfit_scrub(struct work_struct *work) · 4 unmodified lines
29492979 mutex_lock(&acpi_desc->init_mutex);
29502980 query_rc = acpi_nfit_query_poison(acpi_desc);
29512981 tmo = __acpi_nfit_scrub(acpi_desc, query_rc);
2952− if (tmo) {
2953− queue_delayed_work(nfit_wq, &acpi_desc->dwork, tmo * HZ);
2954− acpi_desc->scrub_tmo = tmo;
2955− } else {
2956− acpi_desc->scrub_count++;
2957− if (acpi_desc->scrub_count_state)
2958− sysfs_notify_dirent(acpi_desc->scrub_count_state);
2959− }
2982+ if (tmo)
2983+ __sched_ars(acpi_desc, tmo);
2984+ else
2985+ notify_ars_done(acpi_desc);
29602986 memset(acpi_desc->ars_status, 0, acpi_desc->max_ars);
29612987 mutex_unlock(&acpi_desc->init_mutex);
29622988 }
@@ -3037,7 +3063,7 @@ static int acpi_nfit_register_regions(struct acpi_nfit_desc *acpi_desc) · 74 unmodified lines
30373063 break;
30383064 }
30393065
3040− queue_delayed_work(nfit_wq, &acpi_desc->dwork, 0);
3066+ sched_ars(acpi_desc);
30413067 return 0;
30423068 }
30433069
@@ -3239,7 +3265,7 @@ int acpi_nfit_ars_rescan(struct acpi_nfit_desc *acpi_desc, unsigned long flags) · 195 unmodified lines
32393265 }
32403266 }
32413267 if (scheduled) {
3242− queue_delayed_work(nfit_wq, &acpi_desc->dwork, 0);
3268+ sched_ars(acpi_desc);
32433269 dev_dbg(dev, "ars_scan triggered\n");
32443270 }
32453271 mutex_unlock(&acpi_desc->init_mutex);
drivers/acpi/nfit/nfit.h+1−0
@@ -203,6 +203,7 @@ struct acpi_nfit_desc { · 202 unmodified lines
203203 unsigned int max_ars;
204204 unsigned int scrub_count;
205205 unsigned int scrub_mode;
206+ unsigned int scrub_busy:1;
206207 unsigned int cancel:1;
207208 unsigned long dimm_cmd_force_en;
208209 unsigned long bus_cmd_force_en;
drivers/acpi/osl.c+72−0
@@ -45,6 +45,8 @@ · 44 unmodified lines
4545 #include <linux/uaccess.h>
4646 #include <linux/io-64-nonatomic-lo-hi.h>
4747
48+#include "acpica/accommon.h"
49+#include "acpica/acnamesp.h"
4850 #include "internal.h"
4951
5052 #define _COMPONENT ACPI_OS_SERVICES
@@ -1490,6 +1492,76 @@ int acpi_check_region(resource_size_t start, resource_size_t n, · 1439 unmodified lines
14901492 }
14911493 EXPORT_SYMBOL(acpi_check_region);
14921494
1495+static acpi_status acpi_deactivate_mem_region(acpi_handle handle, u32 level,
1496+ void *_res, void **return_value)
1497+{
1498+ struct acpi_mem_space_context **mem_ctx;
1499+ union acpi_operand_object *handler_obj;
1500+ union acpi_operand_object *region_obj2;
1501+ union acpi_operand_object *region_obj;
1502+ struct resource *res = _res;
1503+ acpi_status status;
1504+
1505+ region_obj = acpi_ns_get_attached_object(handle);
1506+ if (!region_obj)
1507+ return AE_OK;
1508+
1509+ handler_obj = region_obj->region.handler;
1510+ if (!handler_obj)
1511+ return AE_OK;
1512+
1513+ if (region_obj->region.space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY)
1514+ return AE_OK;
1515+
1516+ if (!(region_obj->region.flags & AOPOBJ_SETUP_COMPLETE))
1517+ return AE_OK;
1518+
1519+ region_obj2 = acpi_ns_get_secondary_object(region_obj);
1520+ if (!region_obj2)
1521+ return AE_OK;
1522+
1523+ mem_ctx = (void *)&region_obj2->extra.region_context;
1524+
1525+ if (!(mem_ctx[0]->address >= res->start &&
1526+ mem_ctx[0]->address < res->end))
1527+ return AE_OK;
1528+
1529+ status = handler_obj->address_space.setup(region_obj,
1530+ ACPI_REGION_DEACTIVATE,
1531+ NULL, (void **)mem_ctx);
1532+ if (ACPI_SUCCESS(status))
1533+ region_obj->region.flags &= ~(AOPOBJ_SETUP_COMPLETE);
1534+
1535+ return status;
1536+}
1537+
1538+/**
1539+ * acpi_release_memory - Release any mappings done to a memory region
1540+ * @handle: Handle to namespace node
1541+ * @res: Memory resource
1542+ * @level: A level that terminates the search
1543+ *
1544+ * Walks through @handle and unmaps all SystemMemory Operation Regions that
1545+ * overlap with @res and that have already been activated (mapped).
1546+ *
1547+ * This is a helper that allows drivers to place special requirements on memory
1548+ * region that may overlap with operation regions, primarily allowing them to
1549+ * safely map the region as non-cached memory.
1550+ *
1551+ * The unmapped Operation Regions will be automatically remapped next time they
1552+ * are called, so the drivers do not need to do anything else.
1553+ */
1554+acpi_status acpi_release_memory(acpi_handle handle, struct resource *res,
1555+ u32 level)
1556+{
1557+ if (!(res->flags & IORESOURCE_MEM))
1558+ return AE_TYPE;
1559+
1560+ return acpi_walk_namespace(ACPI_TYPE_REGION, handle, level,
1561+ acpi_deactivate_mem_region, NULL, res, NULL);
1562+}
1563+EXPORT_SYMBOL_GPL(acpi_release_memory);
1564+
14931565 /*
14941566 * Let drivers know whether the resource checks are effective
14951567 */
drivers/acpi/pptt.c+8−2
@@ -481,8 +481,14 @@ static int topology_get_acpi_cpu_tag(struct acpi_table_header *table, · 480 unmodified lines
481481 if (cpu_node) {
482482 cpu_node = acpi_find_processor_package_id(table, cpu_node,
483483 level, flag);
484− /* Only the first level has a guaranteed id */
485− if (level == 0)
484+ /*
485+ * As per specification if the processor structure represents
486+ * an actual processor, then ACPI processor ID must be valid.
487+ * For processor containers ACPI_PPTT_ACPI_PROCESSOR_ID_VALID
488+ * should be set if the UID is valid
489+ */
490+ if (level == 0 ||
491+ cpu_node->flags & ACPI_PPTT_ACPI_PROCESSOR_ID_VALID)
486492 return cpu_node->acpi_processor_id;
487493 return ACPI_PTR_DIFF(cpu_node, table);
488494 }
drivers/ata/Kconfig+0−2
@@ -398,7 +398,6 @@ config SATA_DWC_VDEBUG · 397 unmodified lines
398398
399399 config SATA_HIGHBANK
400400 tristate "Calxeda Highbank SATA support"
401− depends on HAS_DMA
402401 depends on ARCH_HIGHBANK || COMPILE_TEST
403402 help
404403 This option enables support for the Calxeda Highbank SoC's
@@ -408,7 +407,6 @@ config SATA_HIGHBANK · 3 unmodified lines
408407
409408 config SATA_MV
410409 tristate "Marvell SATA support"
411− depends on HAS_DMA
412410 depends on PCI || ARCH_DOVE || ARCH_MV78XX0 || \
413411 ARCH_MVEBU || ARCH_ORION5X || COMPILE_TEST
414412 select GENERIC_PHY
drivers/ata/ahci.c+60−0
@@ -400,6 +400,7 @@ static const struct pci_device_id ahci_pci_tbl[] = { · 399 unmodified lines
400400 { PCI_VDEVICE(INTEL, 0x0f23), board_ahci_mobile }, /* Bay Trail AHCI */
401401 { PCI_VDEVICE(INTEL, 0x22a3), board_ahci_mobile }, /* Cherry Tr. AHCI */
402402 { PCI_VDEVICE(INTEL, 0x5ae3), board_ahci_mobile }, /* ApolloLake AHCI */
403+ { PCI_VDEVICE(INTEL, 0x34d3), board_ahci_mobile }, /* Ice Lake LP AHCI */
403404
404405 /* JMicron 360/1/3/5/6, match class to avoid IDE function */
405406 { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
@@ -1280,6 +1281,59 @@ static bool ahci_broken_suspend(struct pci_dev *pdev) · 874 unmodified lines
12801281 return strcmp(buf, dmi->driver_data) < 0;
12811282 }
12821283
1284+static bool ahci_broken_lpm(struct pci_dev *pdev)
1285+{
1286+ static const struct dmi_system_id sysids[] = {
1287+ /* Various Lenovo 50 series have LPM issues with older BIOSen */
1288+ {
1289+ .matches = {
1290+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1291+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X250"),
1292+ },
1293+ .driver_data = "20180406", /* 1.31 */
1294+ },
1295+ {
1296+ .matches = {
1297+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1298+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L450"),
1299+ },
1300+ .driver_data = "20180420", /* 1.28 */
1301+ },
1302+ {
1303+ .matches = {
1304+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1305+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T450s"),
1306+ },
1307+ .driver_data = "20180315", /* 1.33 */
1308+ },
1309+ {
1310+ .matches = {
1311+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1312+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W541"),
1313+ },
1314+ /*
1315+ * Note date based on release notes, 2.35 has been
1316+ * reported to be good, but I've been unable to get
1317+ * a hold of the reporter to get the DMI BIOS date.
1318+ * TODO: fix this.
1319+ */
1320+ .driver_data = "20180310", /* 2.35 */
1321+ },
1322+ { } /* terminate list */
1323+ };
1324+ const struct dmi_system_id *dmi = dmi_first_match(sysids);
1325+ int year, month, date;
1326+ char buf[9];
1327+
1328+ if (!dmi)
1329+ return false;
1330+
1331+ dmi_get_date(DMI_BIOS_DATE, &year, &month, &date);
1332+ snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date);
1333+
1334+ return strcmp(buf, dmi->driver_data) < 0;
1335+}
1336+
12831337 static bool ahci_broken_online(struct pci_dev *pdev)
12841338 {
12851339 #define ENCODE_BUSDEVFN(bus, slot, func) \
@@ -1694,6 +1748,12 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) · 408 unmodified lines
16941748 "quirky BIOS, skipping spindown on poweroff\n");
16951749 }
16961750
1751+ if (ahci_broken_lpm(pdev)) {
1752+ pi.flags |= ATA_FLAG_NO_LPM;
1753+ dev_warn(&pdev->dev,
1754+ "BIOS update required for Link Power Management support\n");
1755+ }
1756+
16971757 if (ahci_broken_suspend(pdev)) {
16981758 hpriv->flags |= AHCI_HFLAG_NO_SUSPEND;
16991759 dev_warn(&pdev->dev,
drivers/ata/ahci_mvebu.c+1−1
@@ -82,7 +82,7 @@ static void ahci_mvebu_regret_option(struct ahci_host_priv *hpriv) · 81 unmodified lines
8282 *
8383 * Return: 0 on success; Error code otherwise.
8484 */
85−int ahci_mvebu_stop_engine(struct ata_port *ap)
85+static int ahci_mvebu_stop_engine(struct ata_port *ap)
8686 {
8787 void __iomem *port_mmio = ahci_port_base(ap);
8888 u32 tmp, port_fbs;
drivers/ata/libahci.c+5−2
@@ -35,6 +35,7 @@ · 34 unmodified lines
3535 #include <linux/kernel.h>
3636 #include <linux/gfp.h>
3737 #include <linux/module.h>
38+#include <linux/nospec.h>
3839 #include <linux/blkdev.h>
3940 #include <linux/delay.h>
4041 #include <linux/interrupt.h>
@@ -1146,10 +1147,12 @@ static ssize_t ahci_led_store(struct ata_port *ap, const char *buf, · 1105 unmodified lines
11461147
11471148 /* get the slot number from the message */
11481149 pmp = (state & EM_MSG_LED_PMP_SLOT) >> 8;
1149− if (pmp < EM_MAX_SLOTS)
1150+ if (pmp < EM_MAX_SLOTS) {
1151+ pmp = array_index_nospec(pmp, EM_MAX_SLOTS);
11501152 emp = &pp->em_priv[pmp];
1151− else
1153+ } else {
11521154 return -EINVAL;
1155+ }
11531156
11541157 /* mask off the activity bits if we are in sw_activity
11551158 * mode, user should turn off sw_activity before setting
drivers/ata/libata-core.c+3−0
@@ -2493,6 +2493,9 @@ int ata_dev_configure(struct ata_device *dev) · 2492 unmodified lines
24932493 (id[ATA_ID_SATA_CAPABILITY] & 0xe) == 0x2)
24942494 dev->horkage |= ATA_HORKAGE_NOLPM;
24952495
2496+ if (ap->flags & ATA_FLAG_NO_LPM)
2497+ dev->horkage |= ATA_HORKAGE_NOLPM;
2498+
24962499 if (dev->horkage & ATA_HORKAGE_NOLPM) {
24972500 ata_dev_warn(dev, "LPM support broken, forcing max_power\n");
24982501 dev->link->ap->target_lpm_policy = ATA_LPM_MAX_POWER;
drivers/ata/libata-eh.c+16−25
@@ -614,8 +614,7 @@ void ata_scsi_cmd_error_handler(struct Scsi_Host *host, struct ata_port *ap, · 613 unmodified lines
614614 list_for_each_entry_safe(scmd, tmp, eh_work_q, eh_entry) {
615615 struct ata_queued_cmd *qc;
616616
617− for (i = 0; i < ATA_MAX_QUEUE; i++) {
618− qc = __ata_qc_from_tag(ap, i);
617+ ata_qc_for_each_raw(ap, qc, i) {
619618 if (qc->flags & ATA_QCFLAG_ACTIVE &&
620619 qc->scsicmd == scmd)
621620 break;
@@ -818,14 +817,13 @@ EXPORT_SYMBOL_GPL(ata_port_wait_eh); · 196 unmodified lines
818817
819818 static int ata_eh_nr_in_flight(struct ata_port *ap)
820819 {
820+ struct ata_queued_cmd *qc;
821821 unsigned int tag;
822822 int nr = 0;
823823
824824 /* count only non-internal commands */
825− for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
826− if (ata_tag_internal(tag))
827− continue;
828− if (ata_qc_from_tag(ap, tag))
825+ ata_qc_for_each(ap, qc, tag) {
826+ if (qc)
829827 nr++;
830828 }
831829
@@ -847,13 +845,13 @@ void ata_eh_fastdrain_timerfn(struct timer_list *t) · 15 unmodified lines
847845 goto out_unlock;
848846
849847 if (cnt == ap->fastdrain_cnt) {
848+ struct ata_queued_cmd *qc;
850849 unsigned int tag;
851850
852851 /* No progress during the last interval, tag all
853852 * in-flight qcs as timed out and freeze the port.
854853 */
855− for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
856− struct ata_queued_cmd *qc = ata_qc_from_tag(ap, tag);
854+ ata_qc_for_each(ap, qc, tag) {
857855 if (qc)
858856 qc->err_mask |= AC_ERR_TIMEOUT;
859857 }
@@ -999,6 +997,7 @@ void ata_port_schedule_eh(struct ata_port *ap) · 139 unmodified lines
999997
1000998 static int ata_do_link_abort(struct ata_port *ap, struct ata_link *link)
1001999 {
1000+ struct ata_queued_cmd *qc;
10021001 int tag, nr_aborted = 0;
10031002
10041003 WARN_ON(!ap->ops->error_handler);
@@ -1007,9 +1006,7 @@ static int ata_do_link_abort(struct ata_port *ap, struct ata_link *link) · 2 unmodified lines
10071006 ata_eh_set_pending(ap, 0);
10081007
10091008 /* include internal tag in iteration */
1010− for (tag = 0; tag <= ATA_MAX_QUEUE; tag++) {
1011− struct ata_queued_cmd *qc = ata_qc_from_tag(ap, tag);
1012−
1009+ ata_qc_for_each_with_internal(ap, qc, tag) {
10131010 if (qc && (!link || qc->dev->link == link)) {
10141011 qc->flags |= ATA_QCFLAG_FAILED;
10151012 ata_qc_complete(qc);
@@ -1712,9 +1709,7 @@ void ata_eh_analyze_ncq_error(struct ata_link *link) · 696 unmodified lines
17121709 return;
17131710
17141711 /* has LLDD analyzed already? */
1715− for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
1716− qc = __ata_qc_from_tag(ap, tag);
1717−
1712+ ata_qc_for_each_raw(ap, qc, tag) {
17181713 if (!(qc->flags & ATA_QCFLAG_FAILED))
17191714 continue;
17201715
@@ -2136,6 +2131,7 @@ static void ata_eh_link_autopsy(struct ata_link *link) · 415 unmodified lines
21362131 {
21372132 struct ata_port *ap = link->ap;
21382133 struct ata_eh_context *ehc = &link->eh_context;
2134+ struct ata_queued_cmd *qc;
21392135 struct ata_device *dev;
21402136 unsigned int all_err_mask = 0, eflags = 0;
21412137 int tag, nr_failed = 0, nr_quiet = 0;
@@ -2168,9 +2164,7 @@ static void ata_eh_link_autopsy(struct ata_link *link) · 26 unmodified lines
21682164
21692165 all_err_mask |= ehc->i.err_mask;
21702166
2171− for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
2172− struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag);
2173−
2167+ ata_qc_for_each_raw(ap, qc, tag) {
21742168 if (!(qc->flags & ATA_QCFLAG_FAILED) ||
21752169 ata_dev_phys_link(qc->dev) != link)
21762170 continue;
@@ -2436,6 +2430,7 @@ static void ata_eh_link_report(struct ata_link *link) · 259 unmodified lines
24362430 {
24372431 struct ata_port *ap = link->ap;
24382432 struct ata_eh_context *ehc = &link->eh_context;
2433+ struct ata_queued_cmd *qc;
24392434 const char *frozen, *desc;
24402435 char tries_buf[6] = "";
24412436 int tag, nr_failed = 0;
@@ -2447,9 +2442,7 @@ static void ata_eh_link_report(struct ata_link *link) · 5 unmodified lines
24472442 if (ehc->i.desc[0] != '\0')
24482443 desc = ehc->i.desc;
24492444
2450− for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
2451− struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag);
2452−
2445+ ata_qc_for_each_raw(ap, qc, tag) {
24532446 if (!(qc->flags & ATA_QCFLAG_FAILED) ||
24542447 ata_dev_phys_link(qc->dev) != link ||
24552448 ((qc->flags & ATA_QCFLAG_QUIET) &&
@@ -2511,8 +2504,7 @@ static void ata_eh_link_report(struct ata_link *link) · 55 unmodified lines
25112504 ehc->i.serror & SERR_DEV_XCHG ? "DevExch " : "");
25122505 #endif
25132506
2514− for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
2515− struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag);
2507+ ata_qc_for_each_raw(ap, qc, tag) {
25162508 struct ata_taskfile *cmd = &qc->tf, *res = &qc->result_tf;
25172509 char data_buf[20] = "";
25182510 char cdb_buf[70] = "";
@@ -3992,12 +3984,11 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset, · 1473 unmodified lines
39923984 */
39933985 void ata_eh_finish(struct ata_port *ap)
39943986 {
3987+ struct ata_queued_cmd *qc;
39953988 int tag;
39963989
39973990 /* retry or finish qcs */
3998− for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
3999− struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag);
4000−
3991+ ata_qc_for_each_raw(ap, qc, tag) {
40013992 if (!(qc->flags & ATA_QCFLAG_FAILED))
40023993 continue;
40033994
drivers/ata/libata-scsi.c+12−6
@@ -3805,10 +3805,20 @@ static unsigned int ata_scsi_zbc_out_xlat(struct ata_queued_cmd *qc) · 3804 unmodified lines
38053805 */
38063806 goto invalid_param_len;
38073807 }
3808− if (block > dev->n_sectors)
3809− goto out_of_range;
38103808
38113809 all = cdb[14] & 0x1;
3810+ if (all) {
3811+ /*
3812+ * Ignore the block address (zone ID) as defined by ZBC.
3813+ */
3814+ block = 0;
3815+ } else if (block >= dev->n_sectors) {
3816+ /*
3817+ * Block must be a valid zone ID (a zone start LBA).
3818+ */
3819+ fp = 2;
3820+ goto invalid_fld;
3821+ }
38123822
38133823 if (ata_ncq_enabled(qc->dev) &&
38143824 ata_fpdma_zac_mgmt_out_supported(qc->dev)) {
@@ -3837,10 +3847,6 @@ static unsigned int ata_scsi_zbc_out_xlat(struct ata_queued_cmd *qc) · 22 unmodified lines
38373847 invalid_fld:
38383848 ata_scsi_set_invalid_field(qc->dev, scmd, fp, 0xff);
38393849 return 1;
3840− out_of_range:
3841− /* "Logical Block Address out of range" */
3842− ata_scsi_set_sense(qc->dev, scmd, ILLEGAL_REQUEST, 0x21, 0x00);
3843− return 1;
38443850 invalid_param_len:
38453851 /* "Parameter list length error" */
38463852 ata_scsi_set_sense(qc->dev, scmd, ILLEGAL_REQUEST, 0x1a, 0x0);
drivers/ata/sata_fsl.c+1−8
@@ -395,12 +395,6 @@ static inline unsigned int sata_fsl_tag(unsigned int tag, · 394 unmodified lines
395395 {
396396 /* We let libATA core do actual (queue) tag allocation */
397397
398− /* all non NCQ/queued commands should have tag#0 */
399− if (ata_tag_internal(tag)) {
400− DPRINTK("mapping internal cmds to tag#0\n");
401− return 0;
402− }
403−
404398 if (unlikely(tag >= SATA_FSL_QUEUE_DEPTH)) {
405399 DPRINTK("tag %d invalid : out of range\n", tag);
406400 return 0;
@@ -1229,8 +1223,7 @@ static void sata_fsl_host_intr(struct ata_port *ap) · 822 unmodified lines
12291223
12301224 /* Workaround for data length mismatch errata */
12311225 if (unlikely(hstatus & INT_ON_DATA_LENGTH_MISMATCH)) {
1232− for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
1233− qc = ata_qc_from_tag(ap, tag);
1226+ ata_qc_for_each_with_internal(ap, qc, tag) {
12341227 if (qc && ata_is_atapi(qc->tf.protocol)) {
12351228 u32 hcontrol;
12361229 /* Set HControl[27] to clear error registers */
drivers/ata/sata_nv.c+0−3
@@ -675,7 +675,6 @@ static int nv_adma_slave_config(struct scsi_device *sdev) · 674 unmodified lines
675675 struct ata_port *ap = ata_shost_to_port(sdev->host);
676676 struct nv_adma_port_priv *pp = ap->private_data;
677677 struct nv_adma_port_priv *port0, *port1;
678− struct scsi_device *sdev0, *sdev1;
679678 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
680679 unsigned long segment_boundary, flags;
681680 unsigned short sg_tablesize;
@@ -736,8 +735,6 @@ static int nv_adma_slave_config(struct scsi_device *sdev) · 54 unmodified lines
736735
737736 port0 = ap->host->ports[0]->private_data;
738737 port1 = ap->host->ports[1]->private_data;
739− sdev0 = ap->host->ports[0]->link.device[0].sdev;
740− sdev1 = ap->host->ports[1]->link.device[0].sdev;
741738 if ((port0->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) ||
742739 (port1->flags & NV_ADMA_ATAPI_SETUP_COMPLETE)) {
743740 /*
drivers/atm/iphase.c+1−1
@@ -1618,7 +1618,7 @@ static int rx_init(struct atm_dev *dev) · 1617 unmodified lines
16181618 skb_queue_head_init(&iadev->rx_dma_q);
16191619 iadev->rx_free_desc_qhead = NULL;
16201620
1621− iadev->rx_open = kcalloc(4, iadev->num_vc, GFP_KERNEL);
1621+ iadev->rx_open = kcalloc(iadev->num_vc, sizeof(void *), GFP_KERNEL);
16221622 if (!iadev->rx_open) {
16231623 printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n",
16241624 dev->number);
drivers/atm/zatm.c+2−0
@@ -1483,6 +1483,8 @@ static int zatm_ioctl(struct atm_dev *dev,unsigned int cmd,void __user *arg) · 1482 unmodified lines
14831483 return -EFAULT;
14841484 if (pool < 0 || pool > ZATM_LAST_POOL)
14851485 return -EINVAL;
1486+ pool = array_index_nospec(pool,
1487+ ZATM_LAST_POOL + 1);
14861488 if (copy_from_user(&info,
14871489 &((struct zatm_pool_req __user *) arg)->info,
14881490 sizeof(info))) return -EFAULT;
drivers/base/Makefile+0−3
@@ -8,10 +8,7 @@ obj-y := component.o core.o bus.o dd.o syscore.o \ · 7 unmodified lines
88 topology.o container.o property.o cacheinfo.o \
99 devcon.o
1010 obj-$(CONFIG_DEVTMPFS) += devtmpfs.o
11−obj-$(CONFIG_DMA_CMA) += dma-contiguous.o
1211 obj-y += power/
13−obj-$(CONFIG_HAS_DMA) += dma-mapping.o
14−obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o
1512 obj-$(CONFIG_ISA_BUS_API) += isa.o
1613 obj-y += firmware_loader/
1714 obj-$(CONFIG_NUMA) += node.o
drivers/base/core.c+11−4
@@ -236,6 +236,13 @@ struct device_link *device_link_add(struct device *consumer, · 235 unmodified lines
236236 link->rpm_active = true;
237237 }
238238 pm_runtime_new_link(consumer);
239+ /*
240+ * If the link is being added by the consumer driver at probe
241+ * time, balance the decrementation of the supplier's runtime PM
242+ * usage counter after consumer probe in driver_probe_device().
243+ */
244+ if (consumer->links.status == DL_DEV_PROBING)
245+ pm_runtime_get_noresume(supplier);
239246 }
240247 get_device(supplier);
241248 link->supplier = supplier;
@@ -255,12 +262,12 @@ struct device_link *device_link_add(struct device *consumer, · 13 unmodified lines
255262 switch (consumer->links.status) {
256263 case DL_DEV_PROBING:
257264 /*
258− * Balance the decrementation of the supplier's
259− * runtime PM usage counter after consumer probe
260− * in driver_probe_device().
265+ * Some callers expect the link creation during
266+ * consumer driver probe to resume the supplier
267+ * even without DL_FLAG_RPM_ACTIVE.
261268 */
262269 if (flags & DL_FLAG_PM_RUNTIME)
263− pm_runtime_get_sync(supplier);
270+ pm_runtime_resume(supplier);
264271
265272 link->status = DL_STATE_CONSUMER_PROBE;
266273 break;
drivers/base/dd.c+0−8
@@ -434,14 +434,6 @@ re_probe: · 433 unmodified lines
434434 goto probe_failed;
435435 }
436436
437− /*
438− * Ensure devices are listed in devices_kset in correct order
439− * It's important to move Dev to the end of devices_kset before
440− * calling .probe, because it could be recursive and parent Dev
441− * should always go first
442− */
443− devices_kset_move_last(dev);
444−
445437 if (dev->bus->probe) {
446438 ret = dev->bus->probe(dev);
447439 if (ret)
drivers/base/power/domain.c+12−11
@@ -2235,7 +2235,7 @@ static void genpd_dev_pm_sync(struct device *dev) · 2234 unmodified lines
22352235 }
22362236
22372237 static int __genpd_dev_pm_attach(struct device *dev, struct device_node *np,
2238− unsigned int index)
2238+ unsigned int index, bool power_on)
22392239 {
22402240 struct of_phandle_args pd_args;
22412241 struct generic_pm_domain *pd;
@@ -2271,9 +2271,11 @@ static int __genpd_dev_pm_attach(struct device *dev, struct device_node *np, · 29 unmodified lines
22712271 dev->pm_domain->detach = genpd_dev_pm_detach;
22722272 dev->pm_domain->sync = genpd_dev_pm_sync;
22732273
2274− genpd_lock(pd);
2275− ret = genpd_power_on(pd, 0);
2276− genpd_unlock(pd);
2274+ if (power_on) {
2275+ genpd_lock(pd);
2276+ ret = genpd_power_on(pd, 0);
2277+ genpd_unlock(pd);
2278+ }
22772279
22782280 if (ret)
22792281 genpd_remove_device(pd, dev);
@@ -2307,7 +2309,7 @@ int genpd_dev_pm_attach(struct device *dev) · 27 unmodified lines
23072309 "#power-domain-cells") != 1)
23082310 return 0;
23092311
2310− return __genpd_dev_pm_attach(dev, dev->of_node, 0);
2312+ return __genpd_dev_pm_attach(dev, dev->of_node, 0, true);
23112313 }
23122314 EXPORT_SYMBOL_GPL(genpd_dev_pm_attach);
23132315
@@ -2359,14 +2361,14 @@ struct device *genpd_dev_pm_attach_by_id(struct device *dev, · 45 unmodified lines
23592361 }
23602362
23612363 /* Try to attach the device to the PM domain at the specified index. */
2362− ret = __genpd_dev_pm_attach(genpd_dev, dev->of_node, index);
2364+ ret = __genpd_dev_pm_attach(genpd_dev, dev->of_node, index, false);
23632365 if (ret < 1) {
23642366 device_unregister(genpd_dev);
23652367 return ret ? ERR_PTR(ret) : NULL;
23662368 }
23672369
2368− pm_runtime_set_active(genpd_dev);
23692370 pm_runtime_enable(genpd_dev);
2371+ genpd_queue_power_off_work(dev_to_genpd(genpd_dev));
23702372
23712373 return genpd_dev;
23722374 }
@@ -2487,10 +2489,9 @@ EXPORT_SYMBOL_GPL(of_genpd_parse_idle_states); · 114 unmodified lines
24872489 * power domain corresponding to a DT node's "required-opps" property.
24882490 *
24892491 * @dev: Device for which the performance-state needs to be found.
2490− * @opp_node: DT node where the "required-opps" property is present. This can be
2492+ * @np: DT node where the "required-opps" property is present. This can be
24912493 * the device node itself (if it doesn't have an OPP table) or a node
24922494 * within the OPP table of a device (if device has an OPP table).
2493− * @state: Pointer to return performance state.
24942495 *
24952496 * Returns performance state corresponding to the "required-opps" property of
24962497 * a DT node. This calls platform specific genpd->opp_to_performance_state()
@@ -2499,7 +2500,7 @@ EXPORT_SYMBOL_GPL(of_genpd_parse_idle_states); · 2 unmodified lines
24992500 * Returns performance state on success and 0 on failure.
25002501 */
25012502 unsigned int of_genpd_opp_to_performance_state(struct device *dev,
2502− struct device_node *opp_node)
2503+ struct device_node *np)
25032504 {
25042505 struct generic_pm_domain *genpd;
25052506 struct dev_pm_opp *opp;
@@ -2514,7 +2515,7 @@ unsigned int of_genpd_opp_to_performance_state(struct device *dev, · 8 unmodified lines
25142515
25152516 genpd_lock(genpd);
25162517
2517− opp = of_dev_pm_opp_find_required_opp(&genpd->dev, opp_node);
2518+ opp = of_dev_pm_opp_find_required_opp(&genpd->dev, np);
25182519 if (IS_ERR(opp)) {
25192520 dev_err(dev, "Failed to find required OPP: %ld\n",
25202521 PTR_ERR(opp));
drivers/block/drbd/drbd_req.c+2−2
@@ -1244,8 +1244,8 @@ drbd_request_prepare(struct drbd_device *device, struct bio *bio, unsigned long · 1243 unmodified lines
12441244 _drbd_start_io_acct(device, req);
12451245
12461246 /* process discards always from our submitter thread */
1247− if ((bio_op(bio) & REQ_OP_WRITE_ZEROES) ||
1248− (bio_op(bio) & REQ_OP_DISCARD))
1247+ if (bio_op(bio) == REQ_OP_WRITE_ZEROES ||
1248+ bio_op(bio) == REQ_OP_DISCARD)
12491249 goto queue_for_submitter_thread;
12501250
12511251 if (rw == WRITE && req->private_bio && req->i.size
drivers/block/drbd/drbd_worker.c+1−1
@@ -282,8 +282,8 @@ void drbd_request_endio(struct bio *bio) · 281 unmodified lines
282282 what = COMPLETED_OK;
283283 }
284284
285− bio_put(req->private_bio);
286285 req->private_bio = ERR_PTR(blk_status_to_errno(bio->bi_status));
286+ bio_put(bio);
287287
288288 /* not req_mod(), we need irqsave here! */
289289 spin_lock_irqsave(&device->resource->req_lock, flags);
drivers/block/loop.c+1−0
@@ -1613,6 +1613,7 @@ static int lo_compat_ioctl(struct block_device *bdev, fmode_t mode, · 1612 unmodified lines
16131613 arg = (unsigned long) compat_ptr(arg);
16141614 case LOOP_SET_FD:
16151615 case LOOP_CHANGE_FD:
1616+ case LOOP_SET_BLOCK_SIZE:
16161617 err = lo_ioctl(bdev, mode, cmd, arg);
16171618 break;
16181619 default:
drivers/block/nbd.c+113−25
@@ -76,6 +76,7 @@ struct link_dead_args { · 75 unmodified lines
7676 #define NBD_HAS_CONFIG_REF 4
7777 #define NBD_BOUND 5
7878 #define NBD_DESTROY_ON_DISCONNECT 6
79+#define NBD_DISCONNECT_ON_CLOSE 7
7980
8081 struct nbd_config {
8182 u32 flags;
@@ -111,12 +112,16 @@ struct nbd_device { · 29 unmodified lines
111112 struct task_struct *task_setup;
112113 };
113114
115+#define NBD_CMD_REQUEUED 1
116+
114117 struct nbd_cmd {
115118 struct nbd_device *nbd;
119+ struct mutex lock;
116120 int index;
117121 int cookie;
118− struct completion send_complete;
119122 blk_status_t status;
123+ unsigned long flags;
124+ u32 cmd_cookie;
120125 };
121126
122127 #if IS_ENABLED(CONFIG_DEBUG_FS)
@@ -138,12 +143,42 @@ static void nbd_config_put(struct nbd_device *nbd); · 15 unmodified lines
138143 static void nbd_connect_reply(struct genl_info *info, int index);
139144 static int nbd_genl_status(struct sk_buff *skb, struct genl_info *info);
140145 static void nbd_dead_link_work(struct work_struct *work);
146+static void nbd_disconnect_and_put(struct nbd_device *nbd);
141147
142148 static inline struct device *nbd_to_dev(struct nbd_device *nbd)
143149 {
144150 return disk_to_dev(nbd->disk);
145151 }
146152
153+static void nbd_requeue_cmd(struct nbd_cmd *cmd)
154+{
155+ struct request *req = blk_mq_rq_from_pdu(cmd);
156+
157+ if (!test_and_set_bit(NBD_CMD_REQUEUED, &cmd->flags))
158+ blk_mq_requeue_request(req, true);
159+}
160+
161+#define NBD_COOKIE_BITS 32
162+
163+static u64 nbd_cmd_handle(struct nbd_cmd *cmd)
164+{
165+ struct request *req = blk_mq_rq_from_pdu(cmd);
166+ u32 tag = blk_mq_unique_tag(req);
167+ u64 cookie = cmd->cmd_cookie;
168+
169+ return (cookie << NBD_COOKIE_BITS) | tag;
170+}
171+
172+static u32 nbd_handle_to_tag(u64 handle)
173+{
174+ return (u32)handle;
175+}
176+
177+static u32 nbd_handle_to_cookie(u64 handle)
178+{
179+ return (u32)(handle >> NBD_COOKIE_BITS);
180+}
181+
147182 static const char *nbdcmd_to_ascii(int cmd)
148183 {
149184 switch (cmd) {
@@ -317,6 +352,9 @@ static enum blk_eh_timer_return nbd_xmit_timeout(struct request *req, · 167 unmodified lines
317352 }
318353 config = nbd->config;
319354
355+ if (!mutex_trylock(&cmd->lock))
356+ return BLK_EH_RESET_TIMER;
357+
320358 if (config->num_connections > 1) {
321359 dev_err_ratelimited(nbd_to_dev(nbd),
322360 "Connection timed out, retrying (%d/%d alive)\n",
@@ -341,7 +379,8 @@ static enum blk_eh_timer_return nbd_xmit_timeout(struct request *req, · 18 unmodified lines
341379 nbd_mark_nsock_dead(nbd, nsock, 1);
342380 mutex_unlock(&nsock->tx_lock);
343381 }
344− blk_mq_requeue_request(req, true);
382+ mutex_unlock(&cmd->lock);
383+ nbd_requeue_cmd(cmd);
345384 nbd_config_put(nbd);
346385 return BLK_EH_DONE;
347386 }
@@ -351,6 +390,7 @@ static enum blk_eh_timer_return nbd_xmit_timeout(struct request *req, · 3 unmodified lines
351390 }
352391 set_bit(NBD_TIMEDOUT, &config->runtime_flags);
353392 cmd->status = BLK_STS_IOERR;
393+ mutex_unlock(&cmd->lock);
354394 sock_shutdown(nbd);
355395 nbd_config_put(nbd);
356396 done:
@@ -428,9 +468,9 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index) · 71 unmodified lines
428468 struct iov_iter from;
429469 unsigned long size = blk_rq_bytes(req);
430470 struct bio *bio;
471+ u64 handle;
431472 u32 type;
432473 u32 nbd_cmd_flags = 0;
433− u32 tag = blk_mq_unique_tag(req);
434474 int sent = nsock->sent, skip = 0;
435475
436476 iov_iter_kvec(&from, WRITE | ITER_KVEC, &iov, 1, sizeof(request));
@@ -472,6 +512,8 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index) · 35 unmodified lines
472512 goto send_pages;
473513 }
474514 iov_iter_advance(&from, sent);
515+ } else {
516+ cmd->cmd_cookie++;
475517 }
476518 cmd->index = index;
477519 cmd->cookie = nsock->cookie;
@@ -480,7 +522,8 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index) · 2 unmodified lines
480522 request.from = cpu_to_be64((u64)blk_rq_pos(req) << 9);
481523 request.len = htonl(size);
482524 }
483− memcpy(request.handle, &tag, sizeof(tag));
525+ handle = nbd_cmd_handle(cmd);
526+ memcpy(request.handle, &handle, sizeof(handle));
484527
485528 dev_dbg(nbd_to_dev(nbd), "request %p: sending control (%s@%llu,%uB)\n",
486529 req, nbdcmd_to_ascii(type),
@@ -498,6 +541,7 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index) · 11 unmodified lines
498541 nsock->pending = req;
499542 nsock->sent = sent;
500543 }
544+ set_bit(NBD_CMD_REQUEUED, &cmd->flags);
501545 return BLK_STS_RESOURCE;
502546 }
503547 dev_err_ratelimited(disk_to_dev(nbd->disk),
@@ -539,6 +583,7 @@ send_pages: · 35 unmodified lines
539583 */
540584 nsock->pending = req;
541585 nsock->sent = sent;
586+ set_bit(NBD_CMD_REQUEUED, &cmd->flags);
542587 return BLK_STS_RESOURCE;
543588 }
544589 dev_err(disk_to_dev(nbd->disk),
@@ -571,10 +616,12 @@ static struct nbd_cmd *nbd_read_stat(struct nbd_device *nbd, int index) · 26 unmodified lines
571616 struct nbd_reply reply;
572617 struct nbd_cmd *cmd;
573618 struct request *req = NULL;
619+ u64 handle;
574620 u16 hwq;
575621 u32 tag;
576622 struct kvec iov = {.iov_base = &reply, .iov_len = sizeof(reply)};
577623 struct iov_iter to;
624+ int ret = 0;
578625
579626 reply.magic = 0;
580627 iov_iter_kvec(&to, READ | ITER_KVEC, &iov, 1, sizeof(reply));
@@ -592,8 +639,8 @@ static struct nbd_cmd *nbd_read_stat(struct nbd_device *nbd, int index) · 11 unmodified lines
592639 return ERR_PTR(-EPROTO);
593640 }
594641
595− memcpy(&tag, reply.handle, sizeof(u32));
596−
642+ memcpy(&handle, reply.handle, sizeof(handle));
643+ tag = nbd_handle_to_tag(handle);
597644 hwq = blk_mq_unique_tag_to_hwq(tag);
598645 if (hwq < nbd->tag_set.nr_hw_queues)
599646 req = blk_mq_tag_to_rq(nbd->tag_set.tags[hwq],
@@ -604,11 +651,25 @@ static struct nbd_cmd *nbd_read_stat(struct nbd_device *nbd, int index) · 4 unmodified lines
604651 return ERR_PTR(-ENOENT);
605652 }
606653 cmd = blk_mq_rq_to_pdu(req);
654+
655+ mutex_lock(&cmd->lock);
656+ if (cmd->cmd_cookie != nbd_handle_to_cookie(handle)) {
657+ dev_err(disk_to_dev(nbd->disk), "Double reply on req %p, cmd_cookie %u, handle cookie %u\n",
658+ req, cmd->cmd_cookie, nbd_handle_to_cookie(handle));
659+ ret = -ENOENT;
660+ goto out;
661+ }
662+ if (test_bit(NBD_CMD_REQUEUED, &cmd->flags)) {
663+ dev_err(disk_to_dev(nbd->disk), "Raced with timeout on req %p\n",
664+ req);
665+ ret = -ENOENT;
666+ goto out;
667+ }
607668 if (ntohl(reply.error)) {
608669 dev_err(disk_to_dev(nbd->disk), "Other side returned error (%d)\n",
609670 ntohl(reply.error));
610671 cmd->status = BLK_STS_IOERR;
611− return cmd;
672+ goto out;
612673 }
613674
614675 dev_dbg(nbd_to_dev(nbd), "request %p: got reply\n", req);
@@ -633,18 +694,18 @@ static struct nbd_cmd *nbd_read_stat(struct nbd_device *nbd, int index) · 18 unmodified lines
633694 if (nbd_disconnected(config) ||
634695 config->num_connections <= 1) {
635696 cmd->status = BLK_STS_IOERR;
636− return cmd;
697+ goto out;
637698 }
638− return ERR_PTR(-EIO);
699+ ret = -EIO;
700+ goto out;
639701 }
640702 dev_dbg(nbd_to_dev(nbd), "request %p: got %d bytes data\n",
641703 req, bvec.bv_len);
642704 }
643− } else {
644− /* See the comment in nbd_queue_rq. */
645− wait_for_completion(&cmd->send_complete);
646705 }
647− return cmd;
706+out:
707+ mutex_unlock(&cmd->lock);
708+ return ret ? ERR_PTR(ret) : cmd;
648709 }
649710
650711 static void recv_work(struct work_struct *work)
@@ -803,7 +864,7 @@ again: · 152 unmodified lines
803864 */
804865 blk_mq_start_request(req);
805866 if (unlikely(nsock->pending && nsock->pending != req)) {
806− blk_mq_requeue_request(req, true);
867+ nbd_requeue_cmd(cmd);
807868 ret = 0;
808869 goto out;
809870 }
@@ -816,7 +877,7 @@ again: · 6 unmodified lines
816877 dev_err_ratelimited(disk_to_dev(nbd->disk),
817878 "Request send failed, requeueing\n");
818879 nbd_mark_nsock_dead(nbd, nsock, 1);
819− blk_mq_requeue_request(req, true);
880+ nbd_requeue_cmd(cmd);
820881 ret = 0;
821882 }
822883 out:
@@ -840,7 +901,8 @@ static blk_status_t nbd_queue_rq(struct blk_mq_hw_ctx *hctx, · 17 unmodified lines
840901 * that the server is misbehaving (or there was an error) before we're
841902 * done sending everything over the wire.
842903 */
843− init_completion(&cmd->send_complete);
904+ mutex_lock(&cmd->lock);
905+ clear_bit(NBD_CMD_REQUEUED, &cmd->flags);
844906
845907 /* We can be called directly from the user space process, which means we
846908 * could possibly have signals pending so our sendmsg will fail. In
@@ -852,7 +914,7 @@ static blk_status_t nbd_queue_rq(struct blk_mq_hw_ctx *hctx, · 5 unmodified lines
852914 ret = BLK_STS_IOERR;
853915 else if (!ret)
854916 ret = BLK_STS_OK;
855− complete(&cmd->send_complete);
917+ mutex_unlock(&cmd->lock);
856918
857919 return ret;
858920 }
@@ -1305,6 +1367,12 @@ out: · 446 unmodified lines
13051367 static void nbd_release(struct gendisk *disk, fmode_t mode)
13061368 {
13071369 struct nbd_device *nbd = disk->private_data;
1370+ struct block_device *bdev = bdget_disk(disk, 0);
1371+
1372+ if (test_bit(NBD_DISCONNECT_ON_CLOSE, &nbd->config->runtime_flags) &&
1373+ bdev->bd_openers == 0)
1374+ nbd_disconnect_and_put(nbd);
1375+
13081376 nbd_config_put(nbd);
13091377 nbd_put(nbd);
13101378 }
@@ -1452,6 +1520,8 @@ static int nbd_init_request(struct blk_mq_tag_set *set, struct request *rq, · 141 unmodified lines
14521520 {
14531521 struct nbd_cmd *cmd = blk_mq_rq_to_pdu(rq);
14541522 cmd->nbd = set->driver_data;
1523+ cmd->flags = 0;
1524+ mutex_init(&cmd->lock);
14551525 return 0;
14561526 }
14571527
@@ -1705,6 +1775,10 @@ again: · 247 unmodified lines
17051775 &config->runtime_flags);
17061776 put_dev = true;
17071777 }
1778+ if (flags & NBD_CFLAG_DISCONNECT_ON_CLOSE) {
1779+ set_bit(NBD_DISCONNECT_ON_CLOSE,
1780+ &config->runtime_flags);
1781+ }
17081782 }
17091783
17101784 if (info->attrs[NBD_ATTR_SOCKETS]) {
@@ -1749,6 +1823,17 @@ out: · 38 unmodified lines
17491823 return ret;
17501824 }
17511825
1826+static void nbd_disconnect_and_put(struct nbd_device *nbd)
1827+{
1828+ mutex_lock(&nbd->config_lock);
1829+ nbd_disconnect(nbd);
1830+ nbd_clear_sock(nbd);
1831+ mutex_unlock(&nbd->config_lock);
1832+ if (test_and_clear_bit(NBD_HAS_CONFIG_REF,
1833+ &nbd->config->runtime_flags))
1834+ nbd_config_put(nbd);
1835+}
1836+
17521837 static int nbd_genl_disconnect(struct sk_buff *skb, struct genl_info *info)
17531838 {
17541839 struct nbd_device *nbd;
@@ -1781,13 +1866,7 @@ static int nbd_genl_disconnect(struct sk_buff *skb, struct genl_info *info) · 26 unmodified lines
17811866 nbd_put(nbd);
17821867 return 0;
17831868 }
1784− mutex_lock(&nbd->config_lock);
1785− nbd_disconnect(nbd);
1786− nbd_clear_sock(nbd);
1787− mutex_unlock(&nbd->config_lock);
1788− if (test_and_clear_bit(NBD_HAS_CONFIG_REF,
1789− &nbd->config->runtime_flags))
1790− nbd_config_put(nbd);
1869+ nbd_disconnect_and_put(nbd);
17911870 nbd_config_put(nbd);
17921871 nbd_put(nbd);
17931872 return 0;
@@ -1798,7 +1877,7 @@ static int nbd_genl_reconfigure(struct sk_buff *skb, struct genl_info *info) · 4 unmodified lines
17981877 struct nbd_device *nbd = NULL;
17991878 struct nbd_config *config;
18001879 int index;
1801− int ret = -EINVAL;
1880+ int ret = 0;
18021881 bool put_dev = false;
18031882
18041883 if (!netlink_capable(skb, CAP_SYS_ADMIN))
@@ -1838,6 +1917,7 @@ static int nbd_genl_reconfigure(struct sk_buff *skb, struct genl_info *info) · 33 unmodified lines
18381917 !nbd->task_recv) {
18391918 dev_err(nbd_to_dev(nbd),
18401919 "not configured, cannot reconfigure\n");
1920+ ret = -EINVAL;
18411921 goto out;
18421922 }
18431923
@@ -1862,6 +1942,14 @@ static int nbd_genl_reconfigure(struct sk_buff *skb, struct genl_info *info) · 18 unmodified lines
18621942 &config->runtime_flags))
18631943 refcount_inc(&nbd->refs);
18641944 }
1945+
1946+ if (flags & NBD_CFLAG_DISCONNECT_ON_CLOSE) {
1947+ set_bit(NBD_DISCONNECT_ON_CLOSE,
1948+ &config->runtime_flags);
1949+ } else {
1950+ clear_bit(NBD_DISCONNECT_ON_CLOSE,
1951+ &config->runtime_flags);
1952+ }
18651953 }
18661954
18671955 if (info->attrs[NBD_ATTR_SOCKETS]) {
drivers/block/null_blk.c+1−1
@@ -1365,7 +1365,7 @@ static blk_qc_t null_queue_bio(struct request_queue *q, struct bio *bio) · 1364 unmodified lines
13651365 static enum blk_eh_timer_return null_rq_timed_out_fn(struct request *rq)
13661366 {
13671367 pr_info("null: rq %p timed out\n", rq);
1368− blk_mq_complete_request(rq);
1368+ __blk_complete_request(rq);
13691369 return BLK_EH_DONE;
13701370 }
13711371
drivers/block/zram/zram_drv.c+14−1
@@ -298,7 +298,8 @@ static void reset_bdev(struct zram *zram) · 297 unmodified lines
298298 zram->backing_dev = NULL;
299299 zram->old_block_size = 0;
300300 zram->bdev = NULL;
301−
301+ zram->disk->queue->backing_dev_info->capabilities |=
302+ BDI_CAP_SYNCHRONOUS_IO;
302303 kvfree(zram->bitmap);
303304 zram->bitmap = NULL;
304305 }
@@ -400,6 +401,18 @@ static ssize_t backing_dev_store(struct device *dev, · 95 unmodified lines
400401 zram->backing_dev = backing_dev;
401402 zram->bitmap = bitmap;
402403 zram->nr_pages = nr_pages;
404+ /*
405+ * With writeback feature, zram does asynchronous IO so it's no longer
406+ * synchronous device so let's remove synchronous io flag. Othewise,
407+ * upper layer(e.g., swap) could wait IO completion rather than
408+ * (submit and return), which will cause system sluggish.
409+ * Furthermore, when the IO function returns(e.g., swap_readpage),
410+ * upper layer expects IO was done so it could deallocate the page
411+ * freely but in fact, IO is going on so finally could cause
412+ * use-after-free when the IO is really done.
413+ */
414+ zram->disk->queue->backing_dev_info->capabilities &=
415+ ~BDI_CAP_SYNCHRONOUS_IO;
403416 up_write(&zram->init_lock);
404417
405418 pr_info("setup backing device %s\n", file_name);
drivers/bluetooth/hci_nokia.c+1−1
@@ -29,7 +29,7 @@ · 28 unmodified lines
2929 #include <linux/slab.h>
3030 #include <linux/string.h>
3131 #include <linux/types.h>
32−#include <linux/unaligned/le_struct.h>
32+#include <asm/unaligned.h>
3333 #include <net/bluetooth/bluetooth.h>
3434 #include <net/bluetooth/hci_core.h>
3535
drivers/bus/ti-sysc.c+4−4
@@ -169,9 +169,9 @@ static int sysc_get_clocks(struct sysc *ddata) · 168 unmodified lines
169169 const char *name;
170170 int nr_fck = 0, nr_ick = 0, i, error = 0;
171171
172− ddata->clock_roles = devm_kzalloc(ddata->dev,
173− sizeof(*ddata->clock_roles) *
172+ ddata->clock_roles = devm_kcalloc(ddata->dev,
174173 SYSC_MAX_CLOCKS,
174+ sizeof(*ddata->clock_roles),
175175 GFP_KERNEL);
176176 if (!ddata->clock_roles)
177177 return -ENOMEM;
@@ -200,8 +200,8 @@ static int sysc_get_clocks(struct sysc *ddata) · 22 unmodified lines
200200 return -EINVAL;
201201 }
202202
203− ddata->clocks = devm_kzalloc(ddata->dev,
204− sizeof(*ddata->clocks) * ddata->nr_clocks,
203+ ddata->clocks = devm_kcalloc(ddata->dev,
204+ ddata->nr_clocks, sizeof(*ddata->clocks),
205205 GFP_KERNEL);
206206 if (!ddata->clocks)
207207 return -ENOMEM;
drivers/char/agp/alpha-agp.c+1−1
@@ -11,7 +11,7 @@ · 10 unmodified lines
1111
1212 #include "agp.h"
1313
14−static int alpha_core_agp_vm_fault(struct vm_fault *vmf)
14+static vm_fault_t alpha_core_agp_vm_fault(struct vm_fault *vmf)
1515 {
1616 alpha_agp_info *agp = agp_bridge->dev_private_data;
1717 dma_addr_t dma_addr;
drivers/char/agp/amd64-agp.c+2−2
@@ -156,7 +156,7 @@ static u64 amd64_configure(struct pci_dev *hammer, u64 gatt_table) · 155 unmodified lines
156156
157157 /* Address to map to */
158158 pci_read_config_dword(hammer, AMD64_GARTAPERTUREBASE, &tmp);
159− aperturebase = tmp << 25;
159+ aperturebase = (u64)tmp << 25;
160160 aper_base = (aperturebase & PCI_BASE_ADDRESS_MEM_MASK);
161161
162162 enable_gart_translation(hammer, gatt_table);
@@ -277,7 +277,7 @@ static int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, u16 cap) · 114 unmodified lines
277277 pci_read_config_dword(nb, AMD64_GARTAPERTURECTL, &nb_order);
278278 nb_order = (nb_order >> 1) & 7;
279279 pci_read_config_dword(nb, AMD64_GARTAPERTUREBASE, &nb_base);
280− nb_aper = nb_base << 25;
280+ nb_aper = (u64)nb_base << 25;
281281
282282 /* Northbridge seems to contain crap. Try the AGP bridge. */
283283
drivers/char/hw_random/core.c+9−2
@@ -516,11 +516,18 @@ EXPORT_SYMBOL_GPL(hwrng_register); · 515 unmodified lines
516516
517517 void hwrng_unregister(struct hwrng *rng)
518518 {
519+ int err;
520+
519521 mutex_lock(&rng_mutex);
520522
521523 list_del(&rng->list);
522− if (current_rng == rng)
523− enable_best_rng();
524+ if (current_rng == rng) {
525+ err = enable_best_rng();
526+ if (err) {
527+ drop_current_rng();
528+ cur_rng_set_by_user = 0;
529+ }
530+ }
524531
525532 if (list_empty(&rng_list)) {
526533 mutex_unlock(&rng_mutex);
drivers/char/ipmi/ipmi_si_intf.c+4−2
@@ -2088,8 +2088,10 @@ static int try_smi_init(struct smi_info *new_smi) · 2087 unmodified lines
20882088 return 0;
20892089
20902090 out_err:
2091− ipmi_unregister_smi(new_smi->intf);
2092− new_smi->intf = NULL;
2091+ if (new_smi->intf) {
2092+ ipmi_unregister_smi(new_smi->intf);
2093+ new_smi->intf = NULL;
2094+ }
20932095
20942096 kfree(init_name);
20952097
drivers/char/ipmi/kcs_bmc.c+10−21
@@ -210,34 +210,23 @@ static void kcs_bmc_handle_cmd(struct kcs_bmc *kcs_bmc) · 209 unmodified lines
210210 int kcs_bmc_handle_event(struct kcs_bmc *kcs_bmc)
211211 {
212212 unsigned long flags;
213− int ret = 0;
213+ int ret = -ENODATA;
214214 u8 status;
215215
216216 spin_lock_irqsave(&kcs_bmc->lock, flags);
217217
218− if (!kcs_bmc->running) {
219− kcs_force_abort(kcs_bmc);
220− ret = -ENODEV;
221− goto out_unlock;
222− }
223−
224− status = read_status(kcs_bmc) & (KCS_STATUS_IBF | KCS_STATUS_CMD_DAT);
225−
226− switch (status) {
227− case KCS_STATUS_IBF | KCS_STATUS_CMD_DAT:
228− kcs_bmc_handle_cmd(kcs_bmc);
229− break;
230−
231− case KCS_STATUS_IBF:
232− kcs_bmc_handle_data(kcs_bmc);
233− break;
218+ status = read_status(kcs_bmc);
219+ if (status & KCS_STATUS_IBF) {
220+ if (!kcs_bmc->running)
221+ kcs_force_abort(kcs_bmc);
222+ else if (status & KCS_STATUS_CMD_DAT)
223+ kcs_bmc_handle_cmd(kcs_bmc);
224+ else
225+ kcs_bmc_handle_data(kcs_bmc);
234226
235− default:
236− ret = -ENODATA;
237− break;
227+ ret = 0;
238228 }
239229
240−out_unlock:
241230 spin_unlock_irqrestore(&kcs_bmc->lock, flags);
242231
243232 return ret;
drivers/char/mem.c+1−0
@@ -708,6 +708,7 @@ static int mmap_zero(struct file *file, struct vm_area_struct *vma) · 707 unmodified lines
708708 #endif
709709 if (vma->vm_flags & VM_SHARED)
710710 return shmem_zero_setup(vma);
711+ vma_set_anonymous(vma);
711712 return 0;
712713 }
713714
drivers/char/random.c+22−17
@@ -402,7 +402,8 @@ static struct poolinfo { · 401 unmodified lines
402402 /*
403403 * Static global variables
404404 */
405−static DECLARE_WAIT_QUEUE_HEAD(random_wait);
405+static DECLARE_WAIT_QUEUE_HEAD(random_read_wait);
406+static DECLARE_WAIT_QUEUE_HEAD(random_write_wait);
406407 static struct fasync_struct *fasync;
407408
408409 static DEFINE_SPINLOCK(random_ready_list_lock);
@@ -721,8 +722,8 @@ retry: · 312 unmodified lines
721722
722723 /* should we wake readers? */
723724 if (entropy_bits >= random_read_wakeup_bits &&
724− wq_has_sleeper(&random_wait)) {
725− wake_up_interruptible_poll(&random_wait, POLLIN);
725+ wq_has_sleeper(&random_read_wait)) {
726+ wake_up_interruptible(&random_read_wait);
726727 kill_fasync(&fasync, SIGIO, POLL_IN);
727728 }
728729 /* If the input pool is getting full, send some
@@ -1396,7 +1397,7 @@ retry: · 667 unmodified lines
13961397 trace_debit_entropy(r->name, 8 * ibytes);
13971398 if (ibytes &&
13981399 (r->entropy_count >> ENTROPY_SHIFT) < random_write_wakeup_bits) {
1399− wake_up_interruptible_poll(&random_wait, POLLOUT);
1400+ wake_up_interruptible(&random_write_wait);
14001401 kill_fasync(&fasync, SIGIO, POLL_OUT);
14011402 }
14021403
@@ -1838,7 +1839,7 @@ _random_read(int nonblock, char __user *buf, size_t nbytes) · 435 unmodified lines
18381839 if (nonblock)
18391840 return -EAGAIN;
18401841
1841− wait_event_interruptible(random_wait,
1842+ wait_event_interruptible(random_read_wait,
18421843 ENTROPY_BITS(&input_pool) >=
18431844 random_read_wakeup_bits);
18441845 if (signal_pending(current))
@@ -1875,17 +1876,14 @@ urandom_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) · 30 unmodified lines
18751876 return ret;
18761877 }
18771878
1878−static struct wait_queue_head *
1879−random_get_poll_head(struct file *file, __poll_t events)
1880−{
1881− return &random_wait;
1882−}
1883−
18841879 static __poll_t
1885−random_poll_mask(struct file *file, __poll_t events)
1880+random_poll(struct file *file, poll_table * wait)
18861881 {
1887− __poll_t mask = 0;
1882+ __poll_t mask;
18881883
1884+ poll_wait(file, &random_read_wait, wait);
1885+ poll_wait(file, &random_write_wait, wait);
1886+ mask = 0;
18891887 if (ENTROPY_BITS(&input_pool) >= random_read_wakeup_bits)
18901888 mask |= EPOLLIN | EPOLLRDNORM;
18911889 if (ENTROPY_BITS(&input_pool) < random_write_wakeup_bits)
@@ -1897,14 +1895,22 @@ static int · 5 unmodified lines
18971895 write_pool(struct entropy_store *r, const char __user *buffer, size_t count)
18981896 {
18991897 size_t bytes;
1900− __u32 buf[16];
1898+ __u32 t, buf[16];
19011899 const char __user *p = buffer;
19021900
19031901 while (count > 0) {
1902+ int b, i = 0;
1903+
19041904 bytes = min(count, sizeof(buf));
19051905 if (copy_from_user(&buf, p, bytes))
19061906 return -EFAULT;
19071907
1908+ for (b = bytes ; b > 0 ; b -= sizeof(__u32), i++) {
1909+ if (!arch_get_random_int(&t))
1910+ break;
1911+ buf[i] ^= t;
1912+ }
1913+
19081914 count -= bytes;
19091915 p += bytes;
19101916
@@ -1992,8 +1998,7 @@ static int random_fasync(int fd, struct file *filp, int on) · 81 unmodified lines
19921998 const struct file_operations random_fops = {
19931999 .read = random_read,
19942000 .write = random_write,
1995− .get_poll_head = random_get_poll_head,
1996− .poll_mask = random_poll_mask,
2001+ .poll = random_poll,
19972002 .unlocked_ioctl = random_ioctl,
19982003 .fasync = random_fasync,
19992004 .llseek = noop_llseek,
@@ -2326,7 +2331,7 @@ void add_hwgenerator_randomness(const char *buffer, size_t count, · 326 unmodified lines
23262331 * We'll be woken up again once below random_write_wakeup_thresh,
23272332 * or when the calling thread is about to terminate.
23282333 */
2329− wait_event_interruptible(random_wait, kthread_should_stop() ||
2334+ wait_event_interruptible(random_write_wait, kthread_should_stop() ||
23302335 ENTROPY_BITS(&input_pool) <= random_write_wakeup_bits);
23312336 mix_pool_bytes(poolp, buffer, count);
23322337 credit_entropy_bits(poolp, entropy);
drivers/clk/Makefile+1−1
@@ -96,7 +96,7 @@ obj-$(CONFIG_ARCH_SPRD) += sprd/ · 95 unmodified lines
9696 obj-$(CONFIG_ARCH_STI) += st/
9797 obj-$(CONFIG_ARCH_STRATIX10) += socfpga/
9898 obj-$(CONFIG_ARCH_SUNXI) += sunxi/
99−obj-$(CONFIG_ARCH_SUNXI) += sunxi-ng/
99+obj-$(CONFIG_SUNXI_CCU) += sunxi-ng/
100100 obj-$(CONFIG_ARCH_TEGRA) += tegra/
101101 obj-y += ti/
102102 obj-$(CONFIG_CLK_UNIPHIER) += uniphier/
drivers/clk/clk-aspeed.c+44−15
@@ -24,7 +24,7 @@ · 23 unmodified lines
2424 #define ASPEED_MPLL_PARAM 0x20
2525 #define ASPEED_HPLL_PARAM 0x24
2626 #define AST2500_HPLL_BYPASS_EN BIT(20)
27−#define AST2400_HPLL_STRAPPED BIT(18)
27+#define AST2400_HPLL_PROGRAMMED BIT(18)
2828 #define AST2400_HPLL_BYPASS_EN BIT(17)
2929 #define ASPEED_MISC_CTRL 0x2c
3030 #define UART_DIV13_EN BIT(12)
@@ -91,8 +91,8 @@ static const struct aspeed_gate_data aspeed_gates[] = { · 60 unmodified lines
9191 [ASPEED_CLK_GATE_GCLK] = { 1, 7, "gclk-gate", NULL, 0 }, /* 2D engine */
9292 [ASPEED_CLK_GATE_MCLK] = { 2, -1, "mclk-gate", "mpll", CLK_IS_CRITICAL }, /* SDRAM */
9393 [ASPEED_CLK_GATE_VCLK] = { 3, 6, "vclk-gate", NULL, 0 }, /* Video Capture */
94− [ASPEED_CLK_GATE_BCLK] = { 4, 8, "bclk-gate", "bclk", 0 }, /* PCIe/PCI */
95− [ASPEED_CLK_GATE_DCLK] = { 5, -1, "dclk-gate", NULL, 0 }, /* DAC */
94+ [ASPEED_CLK_GATE_BCLK] = { 4, 8, "bclk-gate", "bclk", CLK_IS_CRITICAL }, /* PCIe/PCI */
95+ [ASPEED_CLK_GATE_DCLK] = { 5, -1, "dclk-gate", NULL, CLK_IS_CRITICAL }, /* DAC */
9696 [ASPEED_CLK_GATE_REFCLK] = { 6, -1, "refclk-gate", "clkin", CLK_IS_CRITICAL },
9797 [ASPEED_CLK_GATE_USBPORT2CLK] = { 7, 3, "usb-port2-gate", NULL, 0 }, /* USB2.0 Host port 2 */
9898 [ASPEED_CLK_GATE_LCLK] = { 8, 5, "lclk-gate", NULL, 0 }, /* LPC */
@@ -212,9 +212,22 @@ static int aspeed_clk_is_enabled(struct clk_hw *hw) · 113 unmodified lines
212212 {
213213 struct aspeed_clk_gate *gate = to_aspeed_clk_gate(hw);
214214 u32 clk = BIT(gate->clock_idx);
215+ u32 rst = BIT(gate->reset_idx);
215216 u32 enval = (gate->flags & CLK_GATE_SET_TO_DISABLE) ? 0 : clk;
216217 u32 reg;
217218
219+ /*
220+ * If the IP is in reset, treat the clock as not enabled,
221+ * this happens with some clocks such as the USB one when
222+ * coming from cold reset. Without this, aspeed_clk_enable()
223+ * will fail to lift the reset.
224+ */
225+ if (gate->reset_idx >= 0) {
226+ regmap_read(gate->map, ASPEED_RESET_CTRL, &reg);
227+ if (reg & rst)
228+ return 0;
229+ }
230+
218231 regmap_read(gate->map, ASPEED_CLK_STOP_CTRL, &reg);
219232
220233 return ((reg & clk) == enval) ? 1 : 0;
@@ -565,29 +578,45 @@ builtin_platform_driver(aspeed_clk_driver); · 344 unmodified lines
565578 static void __init aspeed_ast2400_cc(struct regmap *map)
566579 {
567580 struct clk_hw *hw;
568− u32 val, freq, div;
581+ u32 val, div, clkin, hpll;
582+ const u16 hpll_rates[][4] = {
583+ {384, 360, 336, 408},
584+ {400, 375, 350, 425},
585+ };
586+ int rate;
569587
570588 /*
571589 * CLKIN is the crystal oscillator, 24, 48 or 25MHz selected by
572590 * strapping
573591 */
574592 regmap_read(map, ASPEED_STRAP, &val);
575− if (val & CLKIN_25MHZ_EN)
576− freq = 25000000;
577− else if (val & AST2400_CLK_SOURCE_SEL)
578− freq = 48000000;
579− else
580− freq = 24000000;
581− hw = clk_hw_register_fixed_rate(NULL, "clkin", NULL, 0, freq);
582− pr_debug("clkin @%u MHz\n", freq / 1000000);
593+ rate = (val >> 8) & 3;
594+ if (val & CLKIN_25MHZ_EN) {
595+ clkin = 25000000;
596+ hpll = hpll_rates[1][rate];
597+ } else if (val & AST2400_CLK_SOURCE_SEL) {
598+ clkin = 48000000;
599+ hpll = hpll_rates[0][rate];
600+ } else {
601+ clkin = 24000000;
602+ hpll = hpll_rates[0][rate];
603+ }
604+ hw = clk_hw_register_fixed_rate(NULL, "clkin", NULL, 0, clkin);
605+ pr_debug("clkin @%u MHz\n", clkin / 1000000);
583606
584607 /*
585608 * High-speed PLL clock derived from the crystal. This the CPU clock,
586− * and we assume that it is enabled
609+ * and we assume that it is enabled. It can be configured through the
610+ * HPLL_PARAM register, or set to a specified frequency by strapping.
587611 */
588612 regmap_read(map, ASPEED_HPLL_PARAM, &val);
589− WARN(val & AST2400_HPLL_STRAPPED, "hpll is strapped not configured");
590− aspeed_clk_data->hws[ASPEED_CLK_HPLL] = aspeed_ast2400_calc_pll("hpll", val);
613+ if (val & AST2400_HPLL_PROGRAMMED)
614+ hw = aspeed_ast2400_calc_pll("hpll", val);
615+ else
616+ hw = clk_hw_register_fixed_rate(NULL, "hpll", "clkin", 0,
617+ hpll * 1000000);
618+
619+ aspeed_clk_data->hws[ASPEED_CLK_HPLL] = hw;
591620
592621 /*
593622 * Strap bits 11:10 define the CPU/AHB clock frequency ratio (aka HCLK)
drivers/clk/clk.c+1−2
@@ -24,7 +24,6 @@ · 23 unmodified lines
2424 #include <linux/pm_runtime.h>
2525 #include <linux/sched.h>
2626 #include <linux/clkdev.h>
27−#include <linux/stringify.h>
2827
2928 #include "clk.h"
3029
@@ -2559,7 +2558,7 @@ static const struct { · 2528 unmodified lines
25592558 unsigned long flag;
25602559 const char *name;
25612560 } clk_flags[] = {
2562−#define ENTRY(f) { f, __stringify(f) }
2561+#define ENTRY(f) { f, #f }
25632562 ENTRY(CLK_SET_RATE_GATE),
25642563 ENTRY(CLK_SET_PARENT_GATE),
25652564 ENTRY(CLK_SET_RATE_PARENT),
drivers/clk/davinci/da8xx-cfgchip.c+1−1
@@ -672,7 +672,7 @@ static int of_da8xx_usb_phy_clk_init(struct device *dev, struct regmap *regmap) · 671 unmodified lines
672672
673673 usb1 = da8xx_cfgchip_register_usb1_clk48(dev, regmap);
674674 if (IS_ERR(usb1)) {
675− if (PTR_ERR(usb0) == -EPROBE_DEFER)
675+ if (PTR_ERR(usb1) == -EPROBE_DEFER)
676676 return -EPROBE_DEFER;
677677
678678 dev_warn(dev, "Failed to register usb1_clk48 (%ld)\n",
drivers/clk/davinci/psc.h+1−1
@@ -107,7 +107,7 @@ extern const struct davinci_psc_init_data of_da850_psc1_init_data; · 106 unmodified lines
107107 #ifdef CONFIG_ARCH_DAVINCI_DM355
108108 extern const struct davinci_psc_init_data dm355_psc_init_data;
109109 #endif
110−#ifdef CONFIG_ARCH_DAVINCI_DM356
110+#ifdef CONFIG_ARCH_DAVINCI_DM365
111111 extern const struct davinci_psc_init_data dm365_psc_init_data;
112112 #endif
113113 #ifdef CONFIG_ARCH_DAVINCI_DM644x
drivers/clk/meson/clk-audio-divider.c+1−1
@@ -51,7 +51,7 @@ static unsigned long audio_divider_recalc_rate(struct clk_hw *hw, · 50 unmodified lines
5151 struct meson_clk_audio_div_data *adiv = meson_clk_audio_div_data(clk);
5252 unsigned long divider;
5353
54− divider = meson_parm_read(clk->map, &adiv->div);
54+ divider = meson_parm_read(clk->map, &adiv->div) + 1;
5555
5656 return DIV_ROUND_UP_ULL((u64)parent_rate, divider);
5757 }
drivers/clk/meson/gxbb.c+1−0
@@ -498,6 +498,7 @@ static struct clk_regmap gxbb_fclk_div2 = { · 497 unmodified lines
498498 .ops = &clk_regmap_gate_ops,
499499 .parent_names = (const char *[]){ "fclk_div2_div" },
500500 .num_parents = 1,
501+ .flags = CLK_IS_CRITICAL,
501502 },
502503 };
503504
drivers/clk/mvebu/armada-37xx-periph.c+38−0
@@ -35,6 +35,7 @@ · 34 unmodified lines
3535 #define CLK_SEL 0x10
3636 #define CLK_DIS 0x14
3737
38+#define ARMADA_37XX_DVFS_LOAD_1 1
3839 #define LOAD_LEVEL_NR 4
3940
4041 #define ARMADA_37XX_NB_L0L1 0x18
@@ -507,6 +508,40 @@ static long clk_pm_cpu_round_rate(struct clk_hw *hw, unsigned long rate, · 466 unmodified lines
507508 return -EINVAL;
508509 }
509510
511+/*
512+ * Switching the CPU from the L2 or L3 frequencies (300 and 200 Mhz
513+ * respectively) to L0 frequency (1.2 Ghz) requires a significant
514+ * amount of time to let VDD stabilize to the appropriate
515+ * voltage. This amount of time is large enough that it cannot be
516+ * covered by the hardware countdown register. Due to this, the CPU
517+ * might start operating at L0 before the voltage is stabilized,
518+ * leading to CPU stalls.
519+ *
520+ * To work around this problem, we prevent switching directly from the
521+ * L2/L3 frequencies to the L0 frequency, and instead switch to the L1
522+ * frequency in-between. The sequence therefore becomes:
523+ * 1. First switch from L2/L3(200/300MHz) to L1(600MHZ)
524+ * 2. Sleep 20ms for stabling VDD voltage
525+ * 3. Then switch from L1(600MHZ) to L0(1200Mhz).
526+ */
527+static void clk_pm_cpu_set_rate_wa(unsigned long rate, struct regmap *base)
528+{
529+ unsigned int cur_level;
530+
531+ if (rate != 1200 * 1000 * 1000)
532+ return;
533+
534+ regmap_read(base, ARMADA_37XX_NB_CPU_LOAD, &cur_level);
535+ cur_level &= ARMADA_37XX_NB_CPU_LOAD_MASK;
536+ if (cur_level <= ARMADA_37XX_DVFS_LOAD_1)
537+ return;
538+
539+ regmap_update_bits(base, ARMADA_37XX_NB_CPU_LOAD,
540+ ARMADA_37XX_NB_CPU_LOAD_MASK,
541+ ARMADA_37XX_DVFS_LOAD_1);
542+ msleep(20);
543+}
544+
510545 static int clk_pm_cpu_set_rate(struct clk_hw *hw, unsigned long rate,
511546 unsigned long parent_rate)
512547 {
@@ -537,6 +572,9 @@ static int clk_pm_cpu_set_rate(struct clk_hw *hw, unsigned long rate, · 24 unmodified lines
537572 */
538573 reg = ARMADA_37XX_NB_CPU_LOAD;
539574 mask = ARMADA_37XX_NB_CPU_LOAD_MASK;
575+
576+ clk_pm_cpu_set_rate_wa(rate, base);
577+
540578 regmap_update_bits(base, reg, mask, load_level);
541579
542580 return rate;
drivers/clk/qcom/gcc-msm8996.c+1−0
@@ -2781,6 +2781,7 @@ static struct clk_branch gcc_ufs_rx_cfg_clk = { · 2780 unmodified lines
27812781
27822782 static struct clk_branch gcc_ufs_tx_symbol_0_clk = {
27832783 .halt_reg = 0x75018,
2784+ .halt_check = BRANCH_HALT_SKIP,
27842785 .clkr = {
27852786 .enable_reg = 0x75018,
27862787 .enable_mask = BIT(0),
drivers/clk/qcom/mmcc-msm8996.c+1−0
@@ -2910,6 +2910,7 @@ static struct gdsc mmagic_bimc_gdsc = { · 2909 unmodified lines
29102910 .name = "mmagic_bimc",
29112911 },
29122912 .pwrsts = PWRSTS_OFF_ON,
2913+ .flags = ALWAYS_ON,
29132914 };
29142915
29152916 static struct gdsc mmagic_video_gdsc = {
drivers/clk/sunxi-ng/Makefile+15−24
@@ -1,24 +1,24 @@
11 # SPDX-License-Identifier: GPL-2.0
22 # Common objects
3−lib-$(CONFIG_SUNXI_CCU) += ccu_common.o
4−lib-$(CONFIG_SUNXI_CCU) += ccu_mmc_timing.o
5−lib-$(CONFIG_SUNXI_CCU) += ccu_reset.o
3+obj-y += ccu_common.o
4+obj-y += ccu_mmc_timing.o
5+obj-y += ccu_reset.o
66
77 # Base clock types
8−lib-$(CONFIG_SUNXI_CCU) += ccu_div.o
9−lib-$(CONFIG_SUNXI_CCU) += ccu_frac.o
10−lib-$(CONFIG_SUNXI_CCU) += ccu_gate.o
11−lib-$(CONFIG_SUNXI_CCU) += ccu_mux.o
12−lib-$(CONFIG_SUNXI_CCU) += ccu_mult.o
13−lib-$(CONFIG_SUNXI_CCU) += ccu_phase.o
14−lib-$(CONFIG_SUNXI_CCU) += ccu_sdm.o
8+obj-y += ccu_div.o
9+obj-y += ccu_frac.o
10+obj-y += ccu_gate.o
11+obj-y += ccu_mux.o
12+obj-y += ccu_mult.o
13+obj-y += ccu_phase.o
14+obj-y += ccu_sdm.o
1515
1616 # Multi-factor clocks
17−lib-$(CONFIG_SUNXI_CCU) += ccu_nk.o
18−lib-$(CONFIG_SUNXI_CCU) += ccu_nkm.o
19−lib-$(CONFIG_SUNXI_CCU) += ccu_nkmp.o
20−lib-$(CONFIG_SUNXI_CCU) += ccu_nm.o
21−lib-$(CONFIG_SUNXI_CCU) += ccu_mp.o
17+obj-y += ccu_nk.o
18+obj-y += ccu_nkm.o
19+obj-y += ccu_nkmp.o
20+obj-y += ccu_nm.o
21+obj-y += ccu_mp.o
2222
2323 # SoC support
2424 obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o
@@ -38,12 +38,3 @@ obj-$(CONFIG_SUN8I_R40_CCU) += ccu-sun8i-r40.o · 13 unmodified lines
3838 obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80.o
3939 obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-de.o
4040 obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-usb.o
41−
42−# The lib-y file goals is supposed to work only in arch/*/lib or lib/. In our
43−# case, we want to use that goal, but even though lib.a will be properly
44−# generated, it will not be linked in, eventually resulting in a linker error
45−# for missing symbols.
46−#
47−# We can work around that by explicitly adding lib.a to the obj-y goal. This is
48−# an undocumented behaviour, but works well for now.
49−obj-$(CONFIG_SUNXI_CCU) += lib.a
drivers/clocksource/arm_arch_timer.c+1−1
@@ -735,7 +735,7 @@ static void __arch_timer_setup(unsigned type, · 734 unmodified lines
735735 clk->features |= CLOCK_EVT_FEAT_DYNIRQ;
736736 clk->name = "arch_mem_timer";
737737 clk->rating = 400;
738− clk->cpumask = cpu_all_mask;
738+ clk->cpumask = cpu_possible_mask;
739739 if (arch_timer_mem_use_virtual) {
740740 clk->set_state_shutdown = arch_timer_shutdown_virt_mem;
741741 clk->set_state_oneshot_stopped = arch_timer_shutdown_virt_mem;
drivers/clocksource/timer-stm32.c+3−1
@@ -304,8 +304,10 @@ static int __init stm32_timer_init(struct device_node *node) · 303 unmodified lines
304304
305305 to->private_data = kzalloc(sizeof(struct stm32_timer_private),
306306 GFP_KERNEL);
307− if (!to->private_data)
307+ if (!to->private_data) {
308+ ret = -ENOMEM;
308309 goto deinit;
310+ }
309311
310312 rstc = of_reset_control_get(node, NULL);
311313 if (!IS_ERR(rstc)) {
drivers/cpufreq/intel_pstate.c+53−8
@@ -294,6 +294,7 @@ struct pstate_funcs { · 293 unmodified lines
294294 static struct pstate_funcs pstate_funcs __read_mostly;
295295
296296 static int hwp_active __read_mostly;
297+static int hwp_mode_bdw __read_mostly;
297298 static bool per_cpu_limits __read_mostly;
298299 static bool hwp_boost __read_mostly;
299300
@@ -310,12 +311,20 @@ static DEFINE_MUTEX(intel_pstate_limits_lock); · 10 unmodified lines
310311
311312 #ifdef CONFIG_ACPI
312313
313−static bool intel_pstate_get_ppc_enable_status(void)
314+static bool intel_pstate_acpi_pm_profile_server(void)
314315 {
315316 if (acpi_gbl_FADT.preferred_profile == PM_ENTERPRISE_SERVER ||
316317 acpi_gbl_FADT.preferred_profile == PM_PERFORMANCE_SERVER)
317318 return true;
318319
320+ return false;
321+}
322+
323+static bool intel_pstate_get_ppc_enable_status(void)
324+{
325+ if (intel_pstate_acpi_pm_profile_server())
326+ return true;
327+
319328 return acpi_ppc;
320329 }
321330
@@ -458,6 +467,11 @@ static inline void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *pol · 136 unmodified lines
458467 static inline void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
459468 {
460469 }
470+
471+static inline bool intel_pstate_acpi_pm_profile_server(void)
472+{
473+ return false;
474+}
461475 #endif
462476
463477 static inline void update_turbo_state(void)
@@ -1413,7 +1427,15 @@ static void intel_pstate_get_cpu_pstates(struct cpudata *cpu) · 949 unmodified lines
14131427 cpu->pstate.turbo_pstate = pstate_funcs.get_turbo();
14141428 cpu->pstate.scaling = pstate_funcs.get_scaling();
14151429 cpu->pstate.max_freq = cpu->pstate.max_pstate * cpu->pstate.scaling;
1416− cpu->pstate.turbo_freq = cpu->pstate.turbo_pstate * cpu->pstate.scaling;
1430+
1431+ if (hwp_active && !hwp_mode_bdw) {
1432+ unsigned int phy_max, current_max;
1433+
1434+ intel_pstate_get_hwp_max(cpu->cpu, &phy_max, &current_max);
1435+ cpu->pstate.turbo_freq = phy_max * cpu->pstate.scaling;
1436+ } else {
1437+ cpu->pstate.turbo_freq = cpu->pstate.turbo_pstate * cpu->pstate.scaling;
1438+ }
14171439
14181440 if (pstate_funcs.get_aperf_mperf_shift)
14191441 cpu->aperf_mperf_shift = pstate_funcs.get_aperf_mperf_shift();
@@ -1832,7 +1854,7 @@ static int intel_pstate_init_cpu(unsigned int cpunum) · 412 unmodified lines
18321854 intel_pstate_hwp_enable(cpu);
18331855
18341856 id = x86_match_cpu(intel_pstate_hwp_boost_ids);
1835− if (id)
1857+ if (id && intel_pstate_acpi_pm_profile_server())
18361858 hwp_boost = true;
18371859 }
18381860
@@ -2385,6 +2407,18 @@ static bool __init intel_pstate_no_acpi_pss(void) · 546 unmodified lines
23852407 return true;
23862408 }
23872409
2410+static bool __init intel_pstate_no_acpi_pcch(void)
2411+{
2412+ acpi_status status;
2413+ acpi_handle handle;
2414+
2415+ status = acpi_get_handle(NULL, "\\_SB", &handle);
2416+ if (ACPI_FAILURE(status))
2417+ return true;
2418+
2419+ return !acpi_has_method(handle, "PCCH");
2420+}
2421+
23882422 static bool __init intel_pstate_has_acpi_ppc(void)
23892423 {
23902424 int i;
@@ -2444,7 +2478,10 @@ static bool __init intel_pstate_platform_pwr_mgmt_exists(void) · 53 unmodified lines
24442478
24452479 switch (plat_info[idx].data) {
24462480 case PSS:
2447− return intel_pstate_no_acpi_pss();
2481+ if (!intel_pstate_no_acpi_pss())
2482+ return false;
2483+
2484+ return intel_pstate_no_acpi_pcch();
24482485 case PPC:
24492486 return intel_pstate_has_acpi_ppc() && !force_load;
24502487 }
@@ -2467,28 +2504,36 @@ static inline bool intel_pstate_has_acpi_ppc(void) { return false; } · 16 unmodified lines
24672504 static inline void intel_pstate_request_control_from_smm(void) {}
24682505 #endif /* CONFIG_ACPI */
24692506
2507+#define INTEL_PSTATE_HWP_BROADWELL 0x01
2508+
2509+#define ICPU_HWP(model, hwp_mode) \
2510+ { X86_VENDOR_INTEL, 6, model, X86_FEATURE_HWP, hwp_mode }
2511+
24702512 static const struct x86_cpu_id hwp_support_ids[] __initconst = {
2471− { X86_VENDOR_INTEL, 6, X86_MODEL_ANY, X86_FEATURE_HWP },
2513+ ICPU_HWP(INTEL_FAM6_BROADWELL_X, INTEL_PSTATE_HWP_BROADWELL),
2514+ ICPU_HWP(INTEL_FAM6_BROADWELL_XEON_D, INTEL_PSTATE_HWP_BROADWELL),
2515+ ICPU_HWP(X86_MODEL_ANY, 0),
24722516 {}
24732517 };
24742518
24752519 static int __init intel_pstate_init(void)
24762520 {
2521+ const struct x86_cpu_id *id;
24772522 int rc;
24782523
24792524 if (no_load)
24802525 return -ENODEV;
24812526
2482− if (x86_match_cpu(hwp_support_ids)) {
2527+ id = x86_match_cpu(hwp_support_ids);
2528+ if (id) {
24832529 copy_cpu_funcs(&core_funcs);
24842530 if (!no_hwp) {
24852531 hwp_active++;
2532+ hwp_mode_bdw = id->driver_data;
24862533 intel_pstate.attr = hwp_cpufreq_attrs;
24872534 goto hwp_cpu_matched;
24882535 }
24892536 } else {
2490− const struct x86_cpu_id *id;
2491−
24922537 id = x86_match_cpu(intel_pstate_cpu_ids);
24932538 if (!id)
24942539 return -ENODEV;
drivers/cpufreq/pcc-cpufreq.c+4−0
@@ -580,6 +580,10 @@ static int __init pcc_cpufreq_init(void) · 579 unmodified lines
580580 {
581581 int ret;
582582
583+ /* Skip initialization if another cpufreq driver is there. */
584+ if (cpufreq_get_current_driver())
585+ return 0;
586+
583587 if (acpi_disabled)
584588 return 0;
585589
drivers/cpufreq/qcom-cpufreq-kryo.c+27−7
@@ -42,6 +42,8 @@ enum _msm8996_version { · 41 unmodified lines
4242 NUM_OF_MSM8996_VERSIONS,
4343 };
4444
45+struct platform_device *cpufreq_dt_pdev, *kryo_cpufreq_pdev;
46+
4547 static enum _msm8996_version __init qcom_cpufreq_kryo_get_msm_id(void)
4648 {
4749 size_t len;
@@ -74,7 +76,6 @@ static enum _msm8996_version __init qcom_cpufreq_kryo_get_msm_id(void) · 26 unmodified lines
7476 static int qcom_cpufreq_kryo_probe(struct platform_device *pdev)
7577 {
7678 struct opp_table *opp_tables[NR_CPUS] = {0};
77− struct platform_device *cpufreq_dt_pdev;
7879 enum _msm8996_version msm8996_version;
7980 struct nvmem_cell *speedbin_nvmem;
8081 struct device_node *np;
@@ -86,8 +87,8 @@ static int qcom_cpufreq_kryo_probe(struct platform_device *pdev) · 5 unmodified lines
8687 int ret;
8788
8889 cpu_dev = get_cpu_device(0);
89− if (NULL == cpu_dev)
90− ret = -ENODEV;
90+ if (!cpu_dev)
91+ return -ENODEV;
9192
9293 msm8996_version = qcom_cpufreq_kryo_get_msm_id();
9394 if (NUM_OF_MSM8996_VERSIONS == msm8996_version) {
@@ -96,8 +97,8 @@ static int qcom_cpufreq_kryo_probe(struct platform_device *pdev) · 2 unmodified lines
9697 }
9798
9899 np = dev_pm_opp_of_get_opp_desc_node(cpu_dev);
99− if (IS_ERR(np))
100− return PTR_ERR(np);
100+ if (!np)
101+ return -ENOENT;
101102
102103 ret = of_device_is_compatible(np, "operating-points-v2-kryo-cpu");
103104 if (!ret) {
@@ -115,6 +116,8 @@ static int qcom_cpufreq_kryo_probe(struct platform_device *pdev) · 11 unmodified lines
115116
116117 speedbin = nvmem_cell_read(speedbin_nvmem, &len);
117118 nvmem_cell_put(speedbin_nvmem);
119+ if (IS_ERR(speedbin))
120+ return PTR_ERR(speedbin);
118121
119122 switch (msm8996_version) {
120123 case MSM8996_V3:
@@ -127,6 +130,7 @@ static int qcom_cpufreq_kryo_probe(struct platform_device *pdev) · 6 unmodified lines
127130 BUG();
128131 break;
129132 }
133+ kfree(speedbin);
130134
131135 for_each_possible_cpu(cpu) {
132136 cpu_dev = get_cpu_device(cpu);
@@ -162,8 +166,15 @@ free_opp: · 29 unmodified lines
162166 return ret;
163167 }
164168
169+static int qcom_cpufreq_kryo_remove(struct platform_device *pdev)
170+{
171+ platform_device_unregister(cpufreq_dt_pdev);
172+ return 0;
173+}
174+
165175 static struct platform_driver qcom_cpufreq_kryo_driver = {
166176 .probe = qcom_cpufreq_kryo_probe,
177+ .remove = qcom_cpufreq_kryo_remove,
167178 .driver = {
168179 .name = "qcom-cpufreq-kryo",
169180 },
@@ -172,6 +183,7 @@ static struct platform_driver qcom_cpufreq_kryo_driver = { · 2 unmodified lines
172183 static const struct of_device_id qcom_cpufreq_kryo_match_list[] __initconst = {
173184 { .compatible = "qcom,apq8096", },
174185 { .compatible = "qcom,msm8996", },
186+ {}
175187 };
176188
177189 /*
@@ -198,8 +210,9 @@ static int __init qcom_cpufreq_kryo_init(void) · 20 unmodified lines
198210 if (unlikely(ret < 0))
199211 return ret;
200212
201− ret = PTR_ERR_OR_ZERO(platform_device_register_simple(
202− "qcom-cpufreq-kryo", -1, NULL, 0));
213+ kryo_cpufreq_pdev = platform_device_register_simple(
214+ "qcom-cpufreq-kryo", -1, NULL, 0);
215+ ret = PTR_ERR_OR_ZERO(kryo_cpufreq_pdev);
203216 if (0 == ret)
204217 return 0;
205218
@@ -208,5 +221,12 @@ static int __init qcom_cpufreq_kryo_init(void) · 2 unmodified lines
208221 }
209222 module_init(qcom_cpufreq_kryo_init);
210223
224+static void __init qcom_cpufreq_kryo_exit(void)
225+{
226+ platform_device_unregister(kryo_cpufreq_pdev);
227+ platform_driver_unregister(&qcom_cpufreq_kryo_driver);
228+}
229+module_exit(qcom_cpufreq_kryo_exit);
230+
211231 MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Kryo CPUfreq driver");
212232 MODULE_LICENSE("GPL v2");
drivers/crypto/chelsio/chtls/chtls_io.c+2−3
@@ -1548,15 +1548,14 @@ skip_copy: · 1547 unmodified lines
15481548 tp->urg_data = 0;
15491549
15501550 if ((avail + offset) >= skb->len) {
1551− if (likely(skb))
1552− chtls_free_skb(sk, skb);
1553− buffers_freed++;
15541551 if (ULP_SKB_CB(skb)->flags & ULPCB_FLAG_TLS_HDR) {
15551552 tp->copied_seq += skb->len;
15561553 hws->rcvpld = skb->hdr_len;
15571554 } else {
15581555 tp->copied_seq += hws->rcvpld;
15591556 }
1557+ chtls_free_skb(sk, skb);
1558+ buffers_freed++;
15601559 hws->copied_seq = 0;
15611560 if (copied >= target &&
15621561 !skb_peek(&sk->sk_receive_queue))
drivers/crypto/padlock-aes.c+6−2
@@ -266,6 +266,8 @@ static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key, · 265 unmodified lines
266266 return;
267267 }
268268
269+ count -= initial;
270+
269271 if (initial)
270272 asm volatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */
271273 : "+S"(input), "+D"(output)
@@ -273,7 +275,7 @@ static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key, · 1 unmodified line
273275
274276 asm volatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */
275277 : "+S"(input), "+D"(output)
276− : "d"(control_word), "b"(key), "c"(count - initial));
278+ : "d"(control_word), "b"(key), "c"(count));
277279 }
278280
279281 static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key,
@@ -284,6 +286,8 @@ static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key, · 4 unmodified lines
284286 if (count < cbc_fetch_blocks)
285287 return cbc_crypt(input, output, key, iv, control_word, count);
286288
289+ count -= initial;
290+
287291 if (initial)
288292 asm volatile (".byte 0xf3,0x0f,0xa7,0xd0" /* rep xcryptcbc */
289293 : "+S" (input), "+D" (output), "+a" (iv)
@@ -291,7 +295,7 @@ static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key, · 1 unmodified line
291295
292296 asm volatile (".byte 0xf3,0x0f,0xa7,0xd0" /* rep xcryptcbc */
293297 : "+S" (input), "+D" (output), "+a" (iv)
294− : "d" (control_word), "b" (key), "c" (count-initial));
298+ : "d" (control_word), "b" (key), "c" (count));
295299 return iv;
296300 }
297301
drivers/dax/device.c+8−4
@@ -189,14 +189,16 @@ static int check_vma(struct dev_dax *dev_dax, struct vm_area_struct *vma, · 188 unmodified lines
189189
190190 /* prevent private mappings from being established */
191191 if ((vma->vm_flags & VM_MAYSHARE) != VM_MAYSHARE) {
192− dev_info(dev, "%s: %s: fail, attempted private mapping\n",
192+ dev_info_ratelimited(dev,
193+ "%s: %s: fail, attempted private mapping\n",
193194 current->comm, func);
194195 return -EINVAL;
195196 }
196197
197198 mask = dax_region->align - 1;
198199 if (vma->vm_start & mask || vma->vm_end & mask) {
199− dev_info(dev, "%s: %s: fail, unaligned vma (%#lx - %#lx, %#lx)\n",
200+ dev_info_ratelimited(dev,
201+ "%s: %s: fail, unaligned vma (%#lx - %#lx, %#lx)\n",
200202 current->comm, func, vma->vm_start, vma->vm_end,
201203 mask);
202204 return -EINVAL;
@@ -204,13 +206,15 @@ static int check_vma(struct dev_dax *dev_dax, struct vm_area_struct *vma, · 1 unmodified line
204206
205207 if ((dax_region->pfn_flags & (PFN_DEV|PFN_MAP)) == PFN_DEV
206208 && (vma->vm_flags & VM_DONTCOPY) == 0) {
207− dev_info(dev, "%s: %s: fail, dax range requires MADV_DONTFORK\n",
209+ dev_info_ratelimited(dev,
210+ "%s: %s: fail, dax range requires MADV_DONTFORK\n",
208211 current->comm, func);
209212 return -EINVAL;
210213 }
211214
212215 if (!vma_is_dax(vma)) {
213− dev_info(dev, "%s: %s: fail, vma is not DAX capable\n",
216+ dev_info_ratelimited(dev,
217+ "%s: %s: fail, vma is not DAX capable\n",
214218 current->comm, func);
215219 return -EINVAL;
216220 }
drivers/dax/super.c+8−0
@@ -86,6 +86,7 @@ bool __bdev_dax_supported(struct block_device *bdev, int blocksize) · 85 unmodified lines
8686 {
8787 struct dax_device *dax_dev;
8888 bool dax_enabled = false;
89+ struct request_queue *q;
8990 pgoff_t pgoff;
9091 int err, id;
9192 void *kaddr;
@@ -99,6 +100,13 @@ bool __bdev_dax_supported(struct block_device *bdev, int blocksize) · 7 unmodified lines
99100 return false;
100101 }
101102
103+ q = bdev_get_queue(bdev);
104+ if (!q || !blk_queue_dax(q)) {
105+ pr_debug("%s: error: request queue doesn't support dax\n",
106+ bdevname(bdev, buf));
107+ return false;
108+ }
109+
102110 err = bdev_dax_pgoff(bdev, 0, PAGE_SIZE, &pgoff);
103111 if (err) {
104112 pr_debug("%s: error: unaligned partition for dax\n",
drivers/dma/k3dma.c+1−1
@@ -794,7 +794,7 @@ static struct dma_chan *k3_of_dma_simple_xlate(struct of_phandle_args *dma_spec, · 793 unmodified lines
794794 struct k3_dma_dev *d = ofdma->of_dma_data;
795795 unsigned int request = dma_spec->args[0];
796796
797− if (request > d->dma_requests)
797+ if (request >= d->dma_requests)
798798 return NULL;
799799
800800 return dma_get_slave_channel(&(d->chans[request].vc.chan));
drivers/dma/pl330.c+1−1
@@ -3033,7 +3033,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) · 3032 unmodified lines
30333033 pd->src_addr_widths = PL330_DMA_BUSWIDTHS;
30343034 pd->dst_addr_widths = PL330_DMA_BUSWIDTHS;
30353035 pd->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
3036− pd->residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;
3036+ pd->residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
30373037 pd->max_burst = ((pl330->quirks & PL330_QUIRK_BROKEN_NO_FLUSHP) ?
30383038 1 : PL330_MAX_BURST);
30393039
drivers/dma/ti/omap-dma.c+5−1
@@ -1485,7 +1485,11 @@ static int omap_dma_probe(struct platform_device *pdev) · 1484 unmodified lines
14851485 od->ddev.src_addr_widths = OMAP_DMA_BUSWIDTHS;
14861486 od->ddev.dst_addr_widths = OMAP_DMA_BUSWIDTHS;
14871487 od->ddev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
1488− od->ddev.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
1488+ if (__dma_omap15xx(od->plat->dma_attr))
1489+ od->ddev.residue_granularity =
1490+ DMA_RESIDUE_GRANULARITY_DESCRIPTOR;
1491+ else
1492+ od->ddev.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
14891493 od->ddev.max_burst = SZ_16M - 1; /* CCEN: 24bit unsigned */
14901494 od->ddev.dev = &pdev->dev;
14911495 INIT_LIST_HEAD(&od->ddev.channels);
drivers/firmware/dmi-id.c+2−0
@@ -47,6 +47,7 @@ DEFINE_DMI_ATTR_WITH_SHOW(product_name, 0444, DMI_PRODUCT_NAME); · 46 unmodified lines
4747 DEFINE_DMI_ATTR_WITH_SHOW(product_version, 0444, DMI_PRODUCT_VERSION);
4848 DEFINE_DMI_ATTR_WITH_SHOW(product_serial, 0400, DMI_PRODUCT_SERIAL);
4949 DEFINE_DMI_ATTR_WITH_SHOW(product_uuid, 0400, DMI_PRODUCT_UUID);
50+DEFINE_DMI_ATTR_WITH_SHOW(product_sku, 0444, DMI_PRODUCT_SKU);
5051 DEFINE_DMI_ATTR_WITH_SHOW(product_family, 0444, DMI_PRODUCT_FAMILY);
5152 DEFINE_DMI_ATTR_WITH_SHOW(board_vendor, 0444, DMI_BOARD_VENDOR);
5253 DEFINE_DMI_ATTR_WITH_SHOW(board_name, 0444, DMI_BOARD_NAME);
@@ -193,6 +194,7 @@ static void __init dmi_id_init_attr_table(void) · 140 unmodified lines
193194 ADD_DMI_ATTR(product_serial, DMI_PRODUCT_SERIAL);
194195 ADD_DMI_ATTR(product_uuid, DMI_PRODUCT_UUID);
195196 ADD_DMI_ATTR(product_family, DMI_PRODUCT_FAMILY);
197+ ADD_DMI_ATTR(product_sku, DMI_PRODUCT_SKU);
196198 ADD_DMI_ATTR(board_vendor, DMI_BOARD_VENDOR);
197199 ADD_DMI_ATTR(board_name, DMI_BOARD_NAME);
198200 ADD_DMI_ATTR(board_version, DMI_BOARD_VERSION);
drivers/firmware/dmi_scan.c+1−0
@@ -447,6 +447,7 @@ static void __init dmi_decode(const struct dmi_header *dm, void *dummy) · 446 unmodified lines
447447 dmi_save_ident(dm, DMI_PRODUCT_VERSION, 6);
448448 dmi_save_ident(dm, DMI_PRODUCT_SERIAL, 7);
449449 dmi_save_uuid(dm, DMI_PRODUCT_UUID, 8);
450+ dmi_save_ident(dm, DMI_PRODUCT_SKU, 25);
450451 dmi_save_ident(dm, DMI_PRODUCT_FAMILY, 26);
451452 break;
452453 case 2: /* Base Board Information */
drivers/firmware/efi/libstub/tpm.c+1−1
@@ -64,7 +64,7 @@ static void efi_retrieve_tpm2_eventlog_1_2(efi_system_table_t *sys_table_arg) · 63 unmodified lines
6464 efi_guid_t tcg2_guid = EFI_TCG2_PROTOCOL_GUID;
6565 efi_guid_t linux_eventlog_guid = LINUX_EFI_TPM_EVENT_LOG_GUID;
6666 efi_status_t status;
67− efi_physical_addr_t log_location, log_last_entry;
67+ efi_physical_addr_t log_location = 0, log_last_entry = 0;
6868 struct linux_efi_tpm_eventlog *log_tbl = NULL;
6969 unsigned long first_entry_addr, last_entry_addr;
7070 size_t log_size, last_entry_size;
drivers/fpga/altera-cvp.c+4−2
@@ -455,8 +455,10 @@ static int altera_cvp_probe(struct pci_dev *pdev, · 454 unmodified lines
455455
456456 mgr = fpga_mgr_create(&pdev->dev, conf->mgr_name,
457457 &altera_cvp_ops, conf);
458− if (!mgr)
459− return -ENOMEM;
458+ if (!mgr) {
459+ ret = -ENOMEM;
460+ goto err_unmap;
461+ }
460462
461463 pci_set_drvdata(pdev, mgr);
462464
drivers/gpio/gpio-uniphier.c+5−1
@@ -181,7 +181,11 @@ static int uniphier_gpio_to_irq(struct gpio_chip *chip, unsigned int offset) · 180 unmodified lines
181181 fwspec.fwnode = of_node_to_fwnode(chip->parent->of_node);
182182 fwspec.param_count = 2;
183183 fwspec.param[0] = offset - UNIPHIER_GPIO_IRQ_OFFSET;
184− fwspec.param[1] = IRQ_TYPE_NONE;
184+ /*
185+ * IRQ_TYPE_NONE is rejected by the parent irq domain. Set LEVEL_HIGH
186+ * temporarily. Anyway, ->irq_set_type() will override it later.
187+ */
188+ fwspec.param[1] = IRQ_TYPE_LEVEL_HIGH;
185189
186190 return irq_create_fwspec_mapping(&fwspec);
187191 }
drivers/gpio/gpiolib-acpi.c+55−1
@@ -25,6 +25,7 @@ · 24 unmodified lines
2525
2626 struct acpi_gpio_event {
2727 struct list_head node;
28+ struct list_head initial_sync_list;
2829 acpi_handle handle;
2930 unsigned int pin;
3031 unsigned int irq;
@@ -50,6 +51,9 @@ struct acpi_gpio_chip { · 19 unmodified lines
5051 struct list_head events;
5152 };
5253
54+static LIST_HEAD(acpi_gpio_initial_sync_list);
55+static DEFINE_MUTEX(acpi_gpio_initial_sync_list_lock);
56+
5357 static int acpi_gpiochip_find(struct gpio_chip *gc, void *data)
5458 {
5559 if (!gc->parent)
@@ -85,6 +89,21 @@ static struct gpio_desc *acpi_get_gpiod(char *path, int pin) · 29 unmodified lines
8589 return gpiochip_get_desc(chip, pin);
8690 }
8791
92+static void acpi_gpio_add_to_initial_sync_list(struct acpi_gpio_event *event)
93+{
94+ mutex_lock(&acpi_gpio_initial_sync_list_lock);
95+ list_add(&event->initial_sync_list, &acpi_gpio_initial_sync_list);
96+ mutex_unlock(&acpi_gpio_initial_sync_list_lock);
97+}
98+
99+static void acpi_gpio_del_from_initial_sync_list(struct acpi_gpio_event *event)
100+{
101+ mutex_lock(&acpi_gpio_initial_sync_list_lock);
102+ if (!list_empty(&event->initial_sync_list))
103+ list_del_init(&event->initial_sync_list);
104+ mutex_unlock(&acpi_gpio_initial_sync_list_lock);
105+}
106+
88107 static irqreturn_t acpi_gpio_irq_handler(int irq, void *data)
89108 {
90109 struct acpi_gpio_event *event = data;
@@ -136,7 +155,7 @@ static acpi_status acpi_gpiochip_request_interrupt(struct acpi_resource *ares, · 45 unmodified lines
136155 irq_handler_t handler = NULL;
137156 struct gpio_desc *desc;
138157 unsigned long irqflags;
139− int ret, pin, irq;
158+ int ret, pin, irq, value;
140159
141160 if (!acpi_gpio_get_irq_resource(ares, &agpio))
142161 return AE_OK;
@@ -167,6 +186,8 @@ static acpi_status acpi_gpiochip_request_interrupt(struct acpi_resource *ares, · 24 unmodified lines
167186
168187 gpiod_direction_input(desc);
169188
189+ value = gpiod_get_value(desc);
190+
170191 ret = gpiochip_lock_as_irq(chip, pin);
171192 if (ret) {
172193 dev_err(chip->parent, "Failed to lock GPIO as interrupt\n");
@@ -208,6 +229,7 @@ static acpi_status acpi_gpiochip_request_interrupt(struct acpi_resource *ares, · 35 unmodified lines
208229 event->irq = irq;
209230 event->pin = pin;
210231 event->desc = desc;
232+ INIT_LIST_HEAD(&event->initial_sync_list);
211233
212234 ret = request_threaded_irq(event->irq, NULL, handler, irqflags,
213235 "ACPI:Event", event);
@@ -222,6 +244,18 @@ static acpi_status acpi_gpiochip_request_interrupt(struct acpi_resource *ares, · 8 unmodified lines
222244 enable_irq_wake(irq);
223245
224246 list_add_tail(&event->node, &acpi_gpio->events);
247+
248+ /*
249+ * Make sure we trigger the initial state of the IRQ when using RISING
250+ * or FALLING. Note we run the handlers on late_init, the AML code
251+ * may refer to OperationRegions from other (builtin) drivers which
252+ * may be probed after us.
253+ */
254+ if (handler == acpi_gpio_irq_handler &&
255+ (((irqflags & IRQF_TRIGGER_RISING) && value == 1) ||
256+ ((irqflags & IRQF_TRIGGER_FALLING) && value == 0)))
257+ acpi_gpio_add_to_initial_sync_list(event);
258+
225259 return AE_OK;
226260
227261 fail_free_event:
@@ -294,6 +328,8 @@ void acpi_gpiochip_free_interrupts(struct gpio_chip *chip) · 66 unmodified lines
294328 list_for_each_entry_safe_reverse(event, ep, &acpi_gpio->events, node) {
295329 struct gpio_desc *desc;
296330
331+ acpi_gpio_del_from_initial_sync_list(event);
332+
297333 if (irqd_is_wakeup_set(irq_get_irq_data(event->irq)))
298334 disable_irq_wake(event->irq);
299335
@@ -1158,3 +1194,21 @@ bool acpi_can_fallback_to_crs(struct acpi_device *adev, const char *con_id) · 858 unmodified lines
11581194
11591195 return con_id == NULL;
11601196 }
1197+
1198+/* Sync the initial state of handlers after all builtin drivers have probed */
1199+static int acpi_gpio_initial_sync(void)
1200+{
1201+ struct acpi_gpio_event *event, *ep;
1202+
1203+ mutex_lock(&acpi_gpio_initial_sync_list_lock);
1204+ list_for_each_entry_safe(event, ep, &acpi_gpio_initial_sync_list,
1205+ initial_sync_list) {
1206+ acpi_evaluate_object(event->handle, NULL, NULL, NULL);
1207+ list_del_init(&event->initial_sync_list);
1208+ }
1209+ mutex_unlock(&acpi_gpio_initial_sync_list_lock);
1210+
1211+ return 0;
1212+}
1213+/* We must use _sync so that this runs after the first deferred_probe run */
1214+late_initcall_sync(acpi_gpio_initial_sync);
drivers/gpio/gpiolib-of.c+2−1
@@ -64,7 +64,8 @@ static void of_gpio_flags_quirks(struct device_node *np, · 63 unmodified lines
6464 * Note that active low is the default.
6565 */
6666 if (IS_ENABLED(CONFIG_REGULATOR) &&
67− (of_device_is_compatible(np, "reg-fixed-voltage") ||
67+ (of_device_is_compatible(np, "regulator-fixed") ||
68+ of_device_is_compatible(np, "reg-fixed-voltage") ||
6869 of_device_is_compatible(np, "regulator-gpio"))) {
6970 /*
7071 * The regulator GPIO handles are specified such that the
drivers/gpu/drm/amd/amdgpu/amdgpu.h+8−38
@@ -190,6 +190,7 @@ struct amdgpu_job; · 189 unmodified lines
190190 struct amdgpu_irq_src;
191191 struct amdgpu_fpriv;
192192 struct amdgpu_bo_va_mapping;
193+struct amdgpu_atif;
193194
194195 enum amdgpu_cp_irq {
195196 AMDGPU_CP_IRQ_GFX_EOP = 0,
@@ -1269,43 +1270,6 @@ struct amdgpu_vram_scratch { · 1073 unmodified lines
12691270 /*
12701271 * ACPI
12711272 */
1272−struct amdgpu_atif_notification_cfg {
1273− bool enabled;
1274− int command_code;
1275−};
1276−
1277−struct amdgpu_atif_notifications {
1278− bool display_switch;
1279− bool expansion_mode_change;
1280− bool thermal_state;
1281− bool forced_power_state;
1282− bool system_power_state;
1283− bool display_conf_change;
1284− bool px_gfx_switch;
1285− bool brightness_change;
1286− bool dgpu_display_event;
1287−};
1288−
1289−struct amdgpu_atif_functions {
1290− bool system_params;
1291− bool sbios_requests;
1292− bool select_active_disp;
1293− bool lid_state;
1294− bool get_tv_standard;
1295− bool set_tv_standard;
1296− bool get_panel_expansion_mode;
1297− bool set_panel_expansion_mode;
1298− bool temperature_change;
1299− bool graphics_device_types;
1300−};
1301−
1302−struct amdgpu_atif {
1303− struct amdgpu_atif_notifications notifications;
1304− struct amdgpu_atif_functions functions;
1305− struct amdgpu_atif_notification_cfg notification_cfg;
1306− struct amdgpu_encoder *encoder_for_bl;
1307−};
1308−
13091273 struct amdgpu_atcs_functions {
13101274 bool get_ext_state;
13111275 bool pcie_perf_req;
@@ -1466,7 +1430,7 @@ struct amdgpu_device { · 154 unmodified lines
14661430 #if defined(CONFIG_DEBUG_FS)
14671431 struct dentry *debugfs_regs[AMDGPU_DEBUGFS_MAX_COMPONENTS];
14681432 #endif
1469− struct amdgpu_atif atif;
1433+ struct amdgpu_atif *atif;
14701434 struct amdgpu_atcs atcs;
14711435 struct mutex srbm_mutex;
14721436 /* GRBM index mutex. Protects concurrent access to GRBM index */
@@ -1894,6 +1858,12 @@ static inline bool amdgpu_atpx_dgpu_req_power_for_displays(void) { return false; · 421 unmodified lines
18941858 static inline bool amdgpu_has_atpx(void) { return false; }
18951859 #endif
18961860
1861+#if defined(CONFIG_VGA_SWITCHEROO) && defined(CONFIG_ACPI)
1862+void *amdgpu_atpx_get_dhandle(void);
1863+#else
1864+static inline void *amdgpu_atpx_get_dhandle(void) { return NULL; }
1865+#endif
1866+
18971867 /*
18981868 * KMS
18991869 */
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c+37−10
@@ -57,6 +57,10 @@ · 56 unmodified lines
5757 #define ACP_I2S_COMP2_CAP_REG_OFFSET 0xa8
5858 #define ACP_I2S_COMP1_PLAY_REG_OFFSET 0x6c
5959 #define ACP_I2S_COMP2_PLAY_REG_OFFSET 0x68
60+#define ACP_BT_PLAY_REGS_START 0x14970
61+#define ACP_BT_PLAY_REGS_END 0x14a24
62+#define ACP_BT_COMP1_REG_OFFSET 0xac
63+#define ACP_BT_COMP2_REG_OFFSET 0xa8
6064
6165 #define mmACP_PGFSM_RETAIN_REG 0x51c9
6266 #define mmACP_PGFSM_CONFIG_REG 0x51ca
@@ -77,7 +81,7 @@ · 14 unmodified lines
7781 #define ACP_SOFT_RESET_DONE_TIME_OUT_VALUE 0x000000FF
7882
7983 #define ACP_TIMEOUT_LOOP 0x000000FF
80−#define ACP_DEVS 3
84+#define ACP_DEVS 4
8185 #define ACP_SRC_ID 162
8286
8387 enum {
@@ -316,14 +320,13 @@ static int acp_hw_init(void *handle) · 232 unmodified lines
316320 if (adev->acp.acp_cell == NULL)
317321 return -ENOMEM;
318322
319− adev->acp.acp_res = kcalloc(4, sizeof(struct resource), GFP_KERNEL);
320−
323+ adev->acp.acp_res = kcalloc(5, sizeof(struct resource), GFP_KERNEL);
321324 if (adev->acp.acp_res == NULL) {
322325 kfree(adev->acp.acp_cell);
323326 return -ENOMEM;
324327 }
325328
326− i2s_pdata = kcalloc(2, sizeof(struct i2s_platform_data), GFP_KERNEL);
329+ i2s_pdata = kcalloc(3, sizeof(struct i2s_platform_data), GFP_KERNEL);
327330 if (i2s_pdata == NULL) {
328331 kfree(adev->acp.acp_res);
329332 kfree(adev->acp.acp_cell);
@@ -358,6 +361,20 @@ static int acp_hw_init(void *handle) · 28 unmodified lines
358361 i2s_pdata[1].i2s_reg_comp1 = ACP_I2S_COMP1_CAP_REG_OFFSET;
359362 i2s_pdata[1].i2s_reg_comp2 = ACP_I2S_COMP2_CAP_REG_OFFSET;
360363
364+ i2s_pdata[2].quirks = DW_I2S_QUIRK_COMP_REG_OFFSET;
365+ switch (adev->asic_type) {
366+ case CHIP_STONEY:
367+ i2s_pdata[2].quirks |= DW_I2S_QUIRK_16BIT_IDX_OVERRIDE;
368+ break;
369+ default:
370+ break;
371+ }
372+
373+ i2s_pdata[2].cap = DWC_I2S_PLAY | DWC_I2S_RECORD;
374+ i2s_pdata[2].snd_rates = SNDRV_PCM_RATE_8000_96000;
375+ i2s_pdata[2].i2s_reg_comp1 = ACP_BT_COMP1_REG_OFFSET;
376+ i2s_pdata[2].i2s_reg_comp2 = ACP_BT_COMP2_REG_OFFSET;
377+
361378 adev->acp.acp_res[0].name = "acp2x_dma";
362379 adev->acp.acp_res[0].flags = IORESOURCE_MEM;
363380 adev->acp.acp_res[0].start = acp_base;
@@ -373,13 +390,18 @@ static int acp_hw_init(void *handle) · 9 unmodified lines
373390 adev->acp.acp_res[2].start = acp_base + ACP_I2S_CAP_REGS_START;
374391 adev->acp.acp_res[2].end = acp_base + ACP_I2S_CAP_REGS_END;
375392
376− adev->acp.acp_res[3].name = "acp2x_dma_irq";
377− adev->acp.acp_res[3].flags = IORESOURCE_IRQ;
378− adev->acp.acp_res[3].start = amdgpu_irq_create_mapping(adev, 162);
379− adev->acp.acp_res[3].end = adev->acp.acp_res[3].start;
393+ adev->acp.acp_res[3].name = "acp2x_dw_bt_i2s_play_cap";
394+ adev->acp.acp_res[3].flags = IORESOURCE_MEM;
395+ adev->acp.acp_res[3].start = acp_base + ACP_BT_PLAY_REGS_START;
396+ adev->acp.acp_res[3].end = acp_base + ACP_BT_PLAY_REGS_END;
397+
398+ adev->acp.acp_res[4].name = "acp2x_dma_irq";
399+ adev->acp.acp_res[4].flags = IORESOURCE_IRQ;
400+ adev->acp.acp_res[4].start = amdgpu_irq_create_mapping(adev, 162);
401+ adev->acp.acp_res[4].end = adev->acp.acp_res[4].start;
380402
381403 adev->acp.acp_cell[0].name = "acp_audio_dma";
382− adev->acp.acp_cell[0].num_resources = 4;
404+ adev->acp.acp_cell[0].num_resources = 5;
383405 adev->acp.acp_cell[0].resources = &adev->acp.acp_res[0];
384406 adev->acp.acp_cell[0].platform_data = &adev->asic_type;
385407 adev->acp.acp_cell[0].pdata_size = sizeof(adev->asic_type);
@@ -396,6 +418,12 @@ static int acp_hw_init(void *handle) · 10 unmodified lines
396418 adev->acp.acp_cell[2].platform_data = &i2s_pdata[1];
397419 adev->acp.acp_cell[2].pdata_size = sizeof(struct i2s_platform_data);
398420
421+ adev->acp.acp_cell[3].name = "designware-i2s";
422+ adev->acp.acp_cell[3].num_resources = 1;
423+ adev->acp.acp_cell[3].resources = &adev->acp.acp_res[3];
424+ adev->acp.acp_cell[3].platform_data = &i2s_pdata[2];
425+ adev->acp.acp_cell[3].pdata_size = sizeof(struct i2s_platform_data);
426+
399427 r = mfd_add_hotplug_devices(adev->acp.parent, adev->acp.acp_cell,
400428 ACP_DEVS);
401429 if (r)
@@ -451,7 +479,6 @@ static int acp_hw_init(void *handle) · 49 unmodified lines
451479 val = cgs_read_register(adev->acp.cgs_device, mmACP_SOFT_RESET);
452480 val &= ~ACP_SOFT_RESET__SoftResetAud_MASK;
453481 cgs_write_register(adev->acp.cgs_device, mmACP_SOFT_RESET, val);
454−
455482 return 0;
456483 }
457484
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c+108−23
@@ -34,6 +34,45 @@ · 33 unmodified lines
3434 #include "amd_acpi.h"
3535 #include "atom.h"
3636
37+struct amdgpu_atif_notification_cfg {
38+ bool enabled;
39+ int command_code;
40+};
41+
42+struct amdgpu_atif_notifications {
43+ bool display_switch;
44+ bool expansion_mode_change;
45+ bool thermal_state;
46+ bool forced_power_state;
47+ bool system_power_state;
48+ bool display_conf_change;
49+ bool px_gfx_switch;
50+ bool brightness_change;
51+ bool dgpu_display_event;
52+};
53+
54+struct amdgpu_atif_functions {
55+ bool system_params;
56+ bool sbios_requests;
57+ bool select_active_disp;
58+ bool lid_state;
59+ bool get_tv_standard;
60+ bool set_tv_standard;
61+ bool get_panel_expansion_mode;
62+ bool set_panel_expansion_mode;
63+ bool temperature_change;
64+ bool graphics_device_types;
65+};
66+
67+struct amdgpu_atif {
68+ acpi_handle handle;
69+
70+ struct amdgpu_atif_notifications notifications;
71+ struct amdgpu_atif_functions functions;
72+ struct amdgpu_atif_notification_cfg notification_cfg;
73+ struct amdgpu_encoder *encoder_for_bl;
74+};
75+
3776 /* Call the ATIF method
3877 */
3978 /**
@@ -46,8 +85,9 @@ · 6 unmodified lines
4685 * Executes the requested ATIF function (all asics).
4786 * Returns a pointer to the acpi output buffer.
4887 */
49−static union acpi_object *amdgpu_atif_call(acpi_handle handle, int function,
50− struct acpi_buffer *params)
88+static union acpi_object *amdgpu_atif_call(struct amdgpu_atif *atif,
89+ int function,
90+ struct acpi_buffer *params)
5191 {
5292 acpi_status status;
5393 union acpi_object atif_arg_elements[2];
@@ -70,7 +110,8 @@ static union acpi_object *amdgpu_atif_call(acpi_handle handle, int function, · 16 unmodified lines
70110 atif_arg_elements[1].integer.value = 0;
71111 }
72112
73− status = acpi_evaluate_object(handle, "ATIF", &atif_arg, &buffer);
113+ status = acpi_evaluate_object(atif->handle, NULL, &atif_arg,
114+ &buffer);
74115
75116 /* Fail only if calling the method fails and ATIF is supported */
76117 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
@@ -141,15 +182,14 @@ static void amdgpu_atif_parse_functions(struct amdgpu_atif_functions *f, u32 mas · 64 unmodified lines
141182 * (all asics).
142183 * returns 0 on success, error on failure.
143184 */
144−static int amdgpu_atif_verify_interface(acpi_handle handle,
145− struct amdgpu_atif *atif)
185+static int amdgpu_atif_verify_interface(struct amdgpu_atif *atif)
146186 {
147187 union acpi_object *info;
148188 struct atif_verify_interface output;
149189 size_t size;
150190 int err = 0;
151191
152− info = amdgpu_atif_call(handle, ATIF_FUNCTION_VERIFY_INTERFACE, NULL);
192+ info = amdgpu_atif_call(atif, ATIF_FUNCTION_VERIFY_INTERFACE, NULL);
153193 if (!info)
154194 return -EIO;
155195
@@ -176,6 +216,35 @@ out: · 20 unmodified lines
176216 return err;
177217 }
178218
219+static acpi_handle amdgpu_atif_probe_handle(acpi_handle dhandle)
220+{
221+ acpi_handle handle = NULL;
222+ char acpi_method_name[255] = { 0 };
223+ struct acpi_buffer buffer = { sizeof(acpi_method_name), acpi_method_name };
224+ acpi_status status;
225+
226+ /* For PX/HG systems, ATIF and ATPX are in the iGPU's namespace, on dGPU only
227+ * systems, ATIF is in the dGPU's namespace.
228+ */
229+ status = acpi_get_handle(dhandle, "ATIF", &handle);
230+ if (ACPI_SUCCESS(status))
231+ goto out;
232+
233+ if (amdgpu_has_atpx()) {
234+ status = acpi_get_handle(amdgpu_atpx_get_dhandle(), "ATIF",
235+ &handle);
236+ if (ACPI_SUCCESS(status))
237+ goto out;
238+ }
239+
240+ DRM_DEBUG_DRIVER("No ATIF handle found\n");
241+ return NULL;
242+out:
243+ acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
244+ DRM_DEBUG_DRIVER("Found ATIF handle %s\n", acpi_method_name);
245+ return handle;
246+}
247+
179248 /**
180249 * amdgpu_atif_get_notification_params - determine notify configuration
181250 *
@@ -188,15 +257,16 @@ out: · 6 unmodified lines
188257 * where n is specified in the result if a notifier is used.
189258 * Returns 0 on success, error on failure.
190259 */
191−static int amdgpu_atif_get_notification_params(acpi_handle handle,
192− struct amdgpu_atif_notification_cfg *n)
260+static int amdgpu_atif_get_notification_params(struct amdgpu_atif *atif)
193261 {
194262 union acpi_object *info;
263+ struct amdgpu_atif_notification_cfg *n = &atif->notification_cfg;
195264 struct atif_system_params params;
196265 size_t size;
197266 int err = 0;
198267
199− info = amdgpu_atif_call(handle, ATIF_FUNCTION_GET_SYSTEM_PARAMETERS, NULL);
268+ info = amdgpu_atif_call(atif, ATIF_FUNCTION_GET_SYSTEM_PARAMETERS,
269+ NULL);
200270 if (!info) {
201271 err = -EIO;
202272 goto out;
@@ -250,14 +320,15 @@ out: · 47 unmodified lines
250320 * (all asics).
251321 * Returns 0 on success, error on failure.
252322 */
253−static int amdgpu_atif_get_sbios_requests(acpi_handle handle,
254− struct atif_sbios_requests *req)
323+static int amdgpu_atif_get_sbios_requests(struct amdgpu_atif *atif,
324+ struct atif_sbios_requests *req)
255325 {
256326 union acpi_object *info;
257327 size_t size;
258328 int count = 0;
259329
260− info = amdgpu_atif_call(handle, ATIF_FUNCTION_GET_SYSTEM_BIOS_REQUESTS, NULL);
330+ info = amdgpu_atif_call(atif, ATIF_FUNCTION_GET_SYSTEM_BIOS_REQUESTS,
331+ NULL);
261332 if (!info)
262333 return -EIO;
263334
@@ -290,11 +361,10 @@ out: · 26 unmodified lines
290361 * Returns NOTIFY code
291362 */
292363 static int amdgpu_atif_handler(struct amdgpu_device *adev,
293− struct acpi_bus_event *event)
364+ struct acpi_bus_event *event)
294365 {
295− struct amdgpu_atif *atif = &adev->atif;
366+ struct amdgpu_atif *atif = adev->atif;
296367 struct atif_sbios_requests req;
297− acpi_handle handle;
298368 int count;
299369
300370 DRM_DEBUG_DRIVER("event, device_class = %s, type = %#x\n",
@@ -303,14 +373,14 @@ static int amdgpu_atif_handler(struct amdgpu_device *adev, · 2 unmodified lines
303373 if (strcmp(event->device_class, ACPI_VIDEO_CLASS) != 0)
304374 return NOTIFY_DONE;
305375
306− if (!atif->notification_cfg.enabled ||
376+ if (!atif ||
377+ !atif->notification_cfg.enabled ||
307378 event->type != atif->notification_cfg.command_code)
308379 /* Not our event */
309380 return NOTIFY_DONE;
310381
311382 /* Check pending SBIOS requests */
312− handle = ACPI_HANDLE(&adev->pdev->dev);
313− count = amdgpu_atif_get_sbios_requests(handle, &req);
383+ count = amdgpu_atif_get_sbios_requests(atif, &req);
314384
315385 if (count <= 0)
316386 return NOTIFY_DONE;
@@ -641,8 +711,8 @@ static int amdgpu_acpi_event(struct notifier_block *nb, · 324 unmodified lines
641711 */
642712 int amdgpu_acpi_init(struct amdgpu_device *adev)
643713 {
644− acpi_handle handle;
645− struct amdgpu_atif *atif = &adev->atif;
714+ acpi_handle handle, atif_handle;
715+ struct amdgpu_atif *atif;
646716 struct amdgpu_atcs *atcs = &adev->atcs;
647717 int ret;
648718
@@ -658,12 +728,26 @@ int amdgpu_acpi_init(struct amdgpu_device *adev) · 9 unmodified lines
658728 DRM_DEBUG_DRIVER("Call to ATCS verify_interface failed: %d\n", ret);
659729 }
660730
731+ /* Probe for ATIF, and initialize it if found */
732+ atif_handle = amdgpu_atif_probe_handle(handle);
733+ if (!atif_handle)
734+ goto out;
735+
736+ atif = kzalloc(sizeof(*atif), GFP_KERNEL);
737+ if (!atif) {
738+ DRM_WARN("Not enough memory to initialize ATIF\n");
739+ goto out;
740+ }
741+ atif->handle = atif_handle;
742+
661743 /* Call the ATIF method */
662− ret = amdgpu_atif_verify_interface(handle, atif);
744+ ret = amdgpu_atif_verify_interface(atif);
663745 if (ret) {
664746 DRM_DEBUG_DRIVER("Call to ATIF verify_interface failed: %d\n", ret);
747+ kfree(atif);
665748 goto out;
666749 }
750+ adev->atif = atif;
667751
668752 if (atif->notifications.brightness_change) {
669753 struct drm_encoder *tmp;
@@ -693,8 +777,7 @@ int amdgpu_acpi_init(struct amdgpu_device *adev) · 23 unmodified lines
693777 }
694778
695779 if (atif->functions.system_params) {
696− ret = amdgpu_atif_get_notification_params(handle,
697− &atif->notification_cfg);
780+ ret = amdgpu_atif_get_notification_params(atif);
698781 if (ret) {
699782 DRM_DEBUG_DRIVER("Call to GET_SYSTEM_PARAMS failed: %d\n",
700783 ret);
@@ -720,4 +803,6 @@ out: · 19 unmodified lines
720803 void amdgpu_acpi_fini(struct amdgpu_device *adev)
721804 {
722805 unregister_acpi_notifier(&adev->acpi_nb);
806+ if (adev->atif)
807+ kfree(adev->atif);
723808 }
drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c+7−0
@@ -90,6 +90,12 @@ bool amdgpu_atpx_dgpu_req_power_for_displays(void) { · 89 unmodified lines
9090 return amdgpu_atpx_priv.atpx.dgpu_req_power_for_displays;
9191 }
9292
93+#if defined(CONFIG_ACPI)
94+void *amdgpu_atpx_get_dhandle(void) {
95+ return amdgpu_atpx_priv.dhandle;
96+}
97+#endif
98+
9399 /**
94100 * amdgpu_atpx_call - call an ATPX method
95101 *
@@ -569,6 +575,7 @@ static const struct amdgpu_px_quirk amdgpu_px_quirk_list[] = { · 473 unmodified lines
569575 { 0x1002, 0x6900, 0x1002, 0x0124, AMDGPU_PX_QUIRK_FORCE_ATPX },
570576 { 0x1002, 0x6900, 0x1028, 0x0812, AMDGPU_PX_QUIRK_FORCE_ATPX },
571577 { 0x1002, 0x6900, 0x1028, 0x0813, AMDGPU_PX_QUIRK_FORCE_ATPX },
578+ { 0x1002, 0x6900, 0x1025, 0x125A, AMDGPU_PX_QUIRK_FORCE_ATPX },
572579 { 0, 0, 0, 0, 0 },
573580 };
574581
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c+4−0
@@ -927,6 +927,10 @@ static int amdgpu_cs_ib_vm_chunk(struct amdgpu_device *adev, · 926 unmodified lines
927927 r = amdgpu_bo_vm_update_pte(p);
928928 if (r)
929929 return r;
930+
931+ r = reservation_object_reserve_shared(vm->root.base.bo->tbo.resv);
932+ if (r)
933+ return r;
930934 }
931935
932936 return amdgpu_cs_sync_rings(p);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c+12−1
@@ -2158,10 +2158,18 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type) · 2157 unmodified lines
21582158 switch (asic_type) {
21592159 #if defined(CONFIG_DRM_AMD_DC)
21602160 case CHIP_BONAIRE:
2161− case CHIP_HAWAII:
21622161 case CHIP_KAVERI:
21632162 case CHIP_KABINI:
21642163 case CHIP_MULLINS:
2164+ /*
2165+ * We have systems in the wild with these ASICs that require
2166+ * LVDS and VGA support which is not supported with DC.
2167+ *
2168+ * Fallback to the non-DC driver here by default so as not to
2169+ * cause regressions.
2170+ */
2171+ return amdgpu_dc > 0;
2172+ case CHIP_HAWAII:
21652173 case CHIP_CARRIZO:
21662174 case CHIP_STONEY:
21672175 case CHIP_POLARIS10:
@@ -2739,6 +2747,9 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon) · 571 unmodified lines
27392747 if (r)
27402748 return r;
27412749
2750+ /* Make sure IB tests flushed */
2751+ flush_delayed_work(&adev->late_init_work);
2752+
27422753 /* blat the mode back in */
27432754 if (fbcon) {
27442755 if (!amdgpu_device_has_dc_support(adev)) {
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c+1−1
@@ -376,7 +376,7 @@ int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring, · 375 unmodified lines
376376 struct amdgpu_device *adev = ring->adev;
377377 uint64_t index;
378378
379− if (ring != &adev->uvd.inst[ring->me].ring) {
379+ if (ring->funcs->type != AMDGPU_RING_TYPE_UVD) {
380380 ring->fence_drv.cpu_addr = &adev->wb.wb[ring->fence_offs];
381381 ring->fence_drv.gpu_addr = adev->wb.gpu_addr + (ring->fence_offs * 4);
382382 } else {
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c+6−6
@@ -231,6 +231,12 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, · 230 unmodified lines
231231 if (ib->flags & AMDGPU_IB_FLAG_TC_WB_NOT_INVALIDATE)
232232 fence_flags |= AMDGPU_FENCE_FLAG_TC_WB_ONLY;
233233
234+ /* wrap the last IB with fence */
235+ if (job && job->uf_addr) {
236+ amdgpu_ring_emit_fence(ring, job->uf_addr, job->uf_sequence,
237+ fence_flags | AMDGPU_FENCE_FLAG_64BIT);
238+ }
239+
234240 r = amdgpu_fence_emit(ring, f, fence_flags);
235241 if (r) {
236242 dev_err(adev->dev, "failed to emit fence (%d)\n", r);
@@ -243,12 +249,6 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, · 6 unmodified lines
243249 if (ring->funcs->insert_end)
244250 ring->funcs->insert_end(ring);
245251
246− /* wrap the last IB with fence */
247− if (job && job->uf_addr) {
248− amdgpu_ring_emit_fence(ring, job->uf_addr, job->uf_sequence,
249− fence_flags | AMDGPU_FENCE_FLAG_64BIT);
250− }
251−
252252 if (patch_offset != ~0 && ring->funcs->patch_cond_exec)
253253 amdgpu_ring_patch_cond_exec(ring, patch_offset);
254254
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c+10−14
@@ -762,8 +762,7 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain, · 761 unmodified lines
762762 domain = amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type);
763763 if (domain == AMDGPU_GEM_DOMAIN_VRAM) {
764764 adev->vram_pin_size += amdgpu_bo_size(bo);
765− if (bo->flags & AMDGPU_GEM_CREATE_NO_CPU_ACCESS)
766− adev->invisible_pin_size += amdgpu_bo_size(bo);
765+ adev->invisible_pin_size += amdgpu_vram_mgr_bo_invisible_size(bo);
767766 } else if (domain == AMDGPU_GEM_DOMAIN_GTT) {
768767 adev->gart_pin_size += amdgpu_bo_size(bo);
769768 }
@@ -790,25 +789,22 @@ int amdgpu_bo_unpin(struct amdgpu_bo *bo) · 20 unmodified lines
790789 bo->pin_count--;
791790 if (bo->pin_count)
792791 return 0;
793− for (i = 0; i < bo->placement.num_placement; i++) {
794− bo->placements[i].lpfn = 0;
795− bo->placements[i].flags &= ~TTM_PL_FLAG_NO_EVICT;
796− }
797− r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
798− if (unlikely(r)) {
799− dev_err(adev->dev, "%p validate failed for unpin\n", bo);
800− goto error;
801− }
802792
803793 if (bo->tbo.mem.mem_type == TTM_PL_VRAM) {
804794 adev->vram_pin_size -= amdgpu_bo_size(bo);
805− if (bo->flags & AMDGPU_GEM_CREATE_NO_CPU_ACCESS)
806− adev->invisible_pin_size -= amdgpu_bo_size(bo);
795+ adev->invisible_pin_size -= amdgpu_vram_mgr_bo_invisible_size(bo);
807796 } else if (bo->tbo.mem.mem_type == TTM_PL_TT) {
808797 adev->gart_pin_size -= amdgpu_bo_size(bo);
809798 }
810799
811−error:
800+ for (i = 0; i < bo->placement.num_placement; i++) {
801+ bo->placements[i].lpfn = 0;
802+ bo->placements[i].flags &= ~TTM_PL_FLAG_NO_EVICT;
803+ }
804+ r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
805+ if (unlikely(r))
806+ dev_err(adev->dev, "%p validate failed for unpin\n", bo);
807+
812808 return r;
813809 }
814810
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c+1−1
@@ -1882,7 +1882,7 @@ void amdgpu_pm_compute_clocks(struct amdgpu_device *adev) · 1881 unmodified lines
18821882 if (!amdgpu_device_has_dc_support(adev)) {
18831883 mutex_lock(&adev->pm.mutex);
18841884 amdgpu_dpm_get_active_displays(adev);
1885− adev->pm.pm_display_cfg.num_display = adev->pm.dpm.new_active_crtcs;
1885+ adev->pm.pm_display_cfg.num_display = adev->pm.dpm.new_active_crtc_count;
18861886 adev->pm.pm_display_cfg.vrefresh = amdgpu_dpm_get_vrefresh(adev);
18871887 adev->pm.pm_display_cfg.min_vblank_time = amdgpu_dpm_get_vblank_time(adev);
18881888 /* we have issues with mclk switching with refresh rates over 120 hz on the non-DC code. */
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h+1−0
@@ -73,6 +73,7 @@ bool amdgpu_gtt_mgr_has_gart_addr(struct ttm_mem_reg *mem); · 72 unmodified lines
7373 uint64_t amdgpu_gtt_mgr_usage(struct ttm_mem_type_manager *man);
7474 int amdgpu_gtt_mgr_recover(struct ttm_mem_type_manager *man);
7575
76+u64 amdgpu_vram_mgr_bo_invisible_size(struct amdgpu_bo *bo);
7677 uint64_t amdgpu_vram_mgr_usage(struct ttm_mem_type_manager *man);
7778 uint64_t amdgpu_vram_mgr_vis_usage(struct ttm_mem_type_manager *man);
7879
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c+7−7
@@ -130,7 +130,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev) · 129 unmodified lines
130130 unsigned version_major, version_minor, family_id;
131131 int i, j, r;
132132
133− INIT_DELAYED_WORK(&adev->uvd.inst->idle_work, amdgpu_uvd_idle_work_handler);
133+ INIT_DELAYED_WORK(&adev->uvd.idle_work, amdgpu_uvd_idle_work_handler);
134134
135135 switch (adev->asic_type) {
136136 #ifdef CONFIG_DRM_AMDGPU_CIK
@@ -314,12 +314,12 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev) · 177 unmodified lines
314314 void *ptr;
315315 int i, j;
316316
317+ cancel_delayed_work_sync(&adev->uvd.idle_work);
318+
317319 for (j = 0; j < adev->uvd.num_uvd_inst; ++j) {
318320 if (adev->uvd.inst[j].vcpu_bo == NULL)
319321 continue;
320322
321− cancel_delayed_work_sync(&adev->uvd.inst[j].idle_work);
322−
323323 /* only valid for physical mode */
324324 if (adev->asic_type < CHIP_POLARIS10) {
325325 for (i = 0; i < adev->uvd.max_handles; ++i)
@@ -1145,7 +1145,7 @@ int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle, · 819 unmodified lines
11451145 static void amdgpu_uvd_idle_work_handler(struct work_struct *work)
11461146 {
11471147 struct amdgpu_device *adev =
1148− container_of(work, struct amdgpu_device, uvd.inst->idle_work.work);
1148+ container_of(work, struct amdgpu_device, uvd.idle_work.work);
11491149 unsigned fences = 0, i, j;
11501150
11511151 for (i = 0; i < adev->uvd.num_uvd_inst; ++i) {
@@ -1167,7 +1167,7 @@ static void amdgpu_uvd_idle_work_handler(struct work_struct *work) · 15 unmodified lines
11671167 AMD_CG_STATE_GATE);
11681168 }
11691169 } else {
1170− schedule_delayed_work(&adev->uvd.inst->idle_work, UVD_IDLE_TIMEOUT);
1170+ schedule_delayed_work(&adev->uvd.idle_work, UVD_IDLE_TIMEOUT);
11711171 }
11721172 }
11731173
@@ -1179,7 +1179,7 @@ void amdgpu_uvd_ring_begin_use(struct amdgpu_ring *ring) · 5 unmodified lines
11791179 if (amdgpu_sriov_vf(adev))
11801180 return;
11811181
1182− set_clocks = !cancel_delayed_work_sync(&adev->uvd.inst->idle_work);
1182+ set_clocks = !cancel_delayed_work_sync(&adev->uvd.idle_work);
11831183 if (set_clocks) {
11841184 if (adev->pm.dpm_enabled) {
11851185 amdgpu_dpm_enable_uvd(adev, true);
@@ -1196,7 +1196,7 @@ void amdgpu_uvd_ring_begin_use(struct amdgpu_ring *ring) · 10 unmodified lines
11961196 void amdgpu_uvd_ring_end_use(struct amdgpu_ring *ring)
11971197 {
11981198 if (!amdgpu_sriov_vf(ring->adev))
1199− schedule_delayed_work(&ring->adev->uvd.inst->idle_work, UVD_IDLE_TIMEOUT);
1199+ schedule_delayed_work(&ring->adev->uvd.idle_work, UVD_IDLE_TIMEOUT);
12001200 }
12011201
12021202 /**
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h+1−1
@@ -44,7 +44,6 @@ struct amdgpu_uvd_inst { · 43 unmodified lines
4444 void *saved_bo;
4545 atomic_t handles[AMDGPU_MAX_UVD_HANDLES];
4646 struct drm_file *filp[AMDGPU_MAX_UVD_HANDLES];
47− struct delayed_work idle_work;
4847 struct amdgpu_ring ring;
4948 struct amdgpu_ring ring_enc[AMDGPU_MAX_UVD_ENC_RINGS];
5049 struct amdgpu_irq_src irq;
@@ -62,6 +61,7 @@ struct amdgpu_uvd { · 11 unmodified lines
6261 bool address_64_bit;
6362 bool use_ctx_buf;
6463 struct amdgpu_uvd_inst inst[AMDGPU_MAX_UVD_INSTANCES];
64+ struct delayed_work idle_work;
6565 };
6666
6767 int amdgpu_uvd_sw_init(struct amdgpu_device *adev);
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c+27−6
@@ -52,7 +52,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev) · 51 unmodified lines
5252 unsigned long bo_size;
5353 const char *fw_name;
5454 const struct common_firmware_header *hdr;
55− unsigned version_major, version_minor, family_id;
55+ unsigned char fw_check;
5656 int r;
5757
5858 INIT_DELAYED_WORK(&adev->vcn.idle_work, amdgpu_vcn_idle_work_handler);
@@ -83,12 +83,33 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev) · 24 unmodified lines
8383
8484 hdr = (const struct common_firmware_header *)adev->vcn.fw->data;
8585 adev->vcn.fw_version = le32_to_cpu(hdr->ucode_version);
86− family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
87− version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
88− version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
89− DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
90− version_major, version_minor, family_id);
9186
87+ /* Bit 20-23, it is encode major and non-zero for new naming convention.
88+ * This field is part of version minor and DRM_DISABLED_FLAG in old naming
89+ * convention. Since the l:wq!atest version minor is 0x5B and DRM_DISABLED_FLAG
90+ * is zero in old naming convention, this field is always zero so far.
91+ * These four bits are used to tell which naming convention is present.
92+ */
93+ fw_check = (le32_to_cpu(hdr->ucode_version) >> 20) & 0xf;
94+ if (fw_check) {
95+ unsigned int dec_ver, enc_major, enc_minor, vep, fw_rev;
96+
97+ fw_rev = le32_to_cpu(hdr->ucode_version) & 0xfff;
98+ enc_minor = (le32_to_cpu(hdr->ucode_version) >> 12) & 0xff;
99+ enc_major = fw_check;
100+ dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
101+ vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
102+ DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
103+ enc_major, enc_minor, dec_ver, vep, fw_rev);
104+ } else {
105+ unsigned int version_major, version_minor, family_id;
106+
107+ family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
108+ version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
109+ version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
110+ DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
111+ version_major, version_minor, family_id);
112+ }
92113
93114 bo_size = AMDGPU_GPU_PAGE_ALIGN(le32_to_cpu(hdr->ucode_size_bytes) + 8)
94115 + AMDGPU_VCN_STACK_SIZE + AMDGPU_VCN_HEAP_SIZE
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c+8−4
@@ -107,6 +107,9 @@ static void amdgpu_vm_bo_base_init(struct amdgpu_vm_bo_base *base, · 106 unmodified lines
107107 return;
108108 list_add_tail(&base->bo_list, &bo->va);
109109
110+ if (bo->tbo.type == ttm_bo_type_kernel)
111+ list_move(&base->vm_status, &vm->relocated);
112+
110113 if (bo->tbo.resv != vm->root.base.bo->tbo.resv)
111114 return;
112115
@@ -468,7 +471,6 @@ static int amdgpu_vm_alloc_levels(struct amdgpu_device *adev, · 355 unmodified lines
468471 pt->parent = amdgpu_bo_ref(parent->base.bo);
469472
470473 amdgpu_vm_bo_base_init(&entry->base, vm, pt);
471− list_move(&entry->base.vm_status, &vm->relocated);
472474 }
473475
474476 if (level < AMDGPU_VM_PTB) {
@@ -1463,7 +1465,9 @@ static int amdgpu_vm_bo_split_mapping(struct amdgpu_device *adev, · 988 unmodified lines
14631465 uint64_t count;
14641466
14651467 max_entries = min(max_entries, 16ull * 1024ull);
1466− for (count = 1; count < max_entries; ++count) {
1468+ for (count = 1;
1469+ count < max_entries / (PAGE_SIZE / AMDGPU_GPU_PAGE_SIZE);
1470+ ++count) {
14671471 uint64_t idx = pfn + count;
14681472
14691473 if (pages_addr[idx] !=
@@ -1476,7 +1480,7 @@ static int amdgpu_vm_bo_split_mapping(struct amdgpu_device *adev, · 6 unmodified lines
14761480 dma_addr = pages_addr;
14771481 } else {
14781482 addr = pages_addr[pfn];
1479− max_entries = count;
1483+ max_entries = count * (PAGE_SIZE / AMDGPU_GPU_PAGE_SIZE);
14801484 }
14811485
14821486 } else if (flags & AMDGPU_PTE_VALID) {
@@ -1491,7 +1495,7 @@ static int amdgpu_vm_bo_split_mapping(struct amdgpu_device *adev, · 8 unmodified lines
14911495 if (r)
14921496 return r;
14931497
1494− pfn += last - start + 1;
1498+ pfn += (last - start + 1) / (PAGE_SIZE / AMDGPU_GPU_PAGE_SIZE);
14951499 if (nodes && nodes->size == pfn) {
14961500 pfn = 0;
14971501 ++nodes;
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c+36−3
@@ -96,6 +96,38 @@ static u64 amdgpu_vram_mgr_vis_size(struct amdgpu_device *adev, · 95 unmodified lines
9696 adev->gmc.visible_vram_size : end) - start;
9797 }
9898
99+/**
100+ * amdgpu_vram_mgr_bo_invisible_size - CPU invisible BO size
101+ *
102+ * @bo: &amdgpu_bo buffer object (must be in VRAM)
103+ *
104+ * Returns:
105+ * How much of the given &amdgpu_bo buffer object lies in CPU invisible VRAM.
106+ */
107+u64 amdgpu_vram_mgr_bo_invisible_size(struct amdgpu_bo *bo)
108+{
109+ struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
110+ struct ttm_mem_reg *mem = &bo->tbo.mem;
111+ struct drm_mm_node *nodes = mem->mm_node;
112+ unsigned pages = mem->num_pages;
113+ u64 usage = 0;
114+
115+ if (adev->gmc.visible_vram_size == adev->gmc.real_vram_size)
116+ return 0;
117+
118+ if (mem->start >= adev->gmc.visible_vram_size >> PAGE_SHIFT)
119+ return amdgpu_bo_size(bo);
120+
121+ while (nodes && pages) {
122+ usage += nodes->size << PAGE_SHIFT;
123+ usage -= amdgpu_vram_mgr_vis_size(adev, nodes);
124+ pages -= nodes->size;
125+ ++nodes;
126+ }
127+
128+ return usage;
129+}
130+
99131 /**
100132 * amdgpu_vram_mgr_new - allocate new ranges
101133 *
@@ -135,7 +167,8 @@ static int amdgpu_vram_mgr_new(struct ttm_mem_type_manager *man, · 33 unmodified lines
135167 num_nodes = DIV_ROUND_UP(mem->num_pages, pages_per_node);
136168 }
137169
138− nodes = kcalloc(num_nodes, sizeof(*nodes), GFP_KERNEL);
170+ nodes = kvmalloc_array(num_nodes, sizeof(*nodes),
171+ GFP_KERNEL | __GFP_ZERO);
139172 if (!nodes)
140173 return -ENOMEM;
141174
@@ -190,7 +223,7 @@ error: · 48 unmodified lines
190223 drm_mm_remove_node(&nodes[i]);
191224 spin_unlock(&mgr->lock);
192225
193− kfree(nodes);
226+ kvfree(nodes);
194227 return r == -ENOSPC ? 0 : r;
195228 }
196229
@@ -229,7 +262,7 @@ static void amdgpu_vram_mgr_del(struct ttm_mem_type_manager *man, · 32 unmodified lines
229262 atomic64_sub(usage, &mgr->usage);
230263 atomic64_sub(vis_usage, &mgr->vis_usage);
231264
232− kfree(mem->mm_node);
265+ kvfree(mem->mm_node);
233266 mem->mm_node = NULL;
234267 }
235268
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c+2−2
@@ -900,7 +900,7 @@ static const struct amdgpu_ring_funcs vce_v3_0_ring_phys_funcs = { · 899 unmodified lines
900900 .emit_frame_size =
901901 4 + /* vce_v3_0_emit_pipeline_sync */
902902 6, /* amdgpu_vce_ring_emit_fence x1 no user fence */
903− .emit_ib_size = 5, /* vce_v3_0_ring_emit_ib */
903+ .emit_ib_size = 4, /* amdgpu_vce_ring_emit_ib */
904904 .emit_ib = amdgpu_vce_ring_emit_ib,
905905 .emit_fence = amdgpu_vce_ring_emit_fence,
906906 .test_ring = amdgpu_vce_ring_test_ring,
@@ -924,7 +924,7 @@ static const struct amdgpu_ring_funcs vce_v3_0_ring_vm_funcs = { · 17 unmodified lines
924924 6 + /* vce_v3_0_emit_vm_flush */
925925 4 + /* vce_v3_0_emit_pipeline_sync */
926926 6 + 6, /* amdgpu_vce_ring_emit_fence x2 vm fence */
927− .emit_ib_size = 4, /* amdgpu_vce_ring_emit_ib */
927+ .emit_ib_size = 5, /* vce_v3_0_ring_emit_ib */
928928 .emit_ib = vce_v3_0_ring_emit_ib,
929929 .emit_vm_flush = vce_v3_0_emit_vm_flush,
930930 .emit_pipeline_sync = vce_v3_0_emit_pipeline_sync,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c+55−10
@@ -2175,6 +2175,46 @@ get_output_color_space(const struct dc_crtc_timing *dc_crtc_timing) · 2174 unmodified lines
21752175 return color_space;
21762176 }
21772177
2178+static void reduce_mode_colour_depth(struct dc_crtc_timing *timing_out)
2179+{
2180+ if (timing_out->display_color_depth <= COLOR_DEPTH_888)
2181+ return;
2182+
2183+ timing_out->display_color_depth--;
2184+}
2185+
2186+static void adjust_colour_depth_from_display_info(struct dc_crtc_timing *timing_out,
2187+ const struct drm_display_info *info)
2188+{
2189+ int normalized_clk;
2190+ if (timing_out->display_color_depth <= COLOR_DEPTH_888)
2191+ return;
2192+ do {
2193+ normalized_clk = timing_out->pix_clk_khz;
2194+ /* YCbCr 4:2:0 requires additional adjustment of 1/2 */
2195+ if (timing_out->pixel_encoding == PIXEL_ENCODING_YCBCR420)
2196+ normalized_clk /= 2;
2197+ /* Adjusting pix clock following on HDMI spec based on colour depth */
2198+ switch (timing_out->display_color_depth) {
2199+ case COLOR_DEPTH_101010:
2200+ normalized_clk = (normalized_clk * 30) / 24;
2201+ break;
2202+ case COLOR_DEPTH_121212:
2203+ normalized_clk = (normalized_clk * 36) / 24;
2204+ break;
2205+ case COLOR_DEPTH_161616:
2206+ normalized_clk = (normalized_clk * 48) / 24;
2207+ break;
2208+ default:
2209+ return;
2210+ }
2211+ if (normalized_clk <= info->max_tmds_clock)
2212+ return;
2213+ reduce_mode_colour_depth(timing_out);
2214+
2215+ } while (timing_out->display_color_depth > COLOR_DEPTH_888);
2216+
2217+}
21782218 /*****************************************************************************/
21792219
21802220 static void
@@ -2183,6 +2223,7 @@ fill_stream_properties_from_drm_display_mode(struct dc_stream_state *stream, · 2 unmodified lines
21832223 const struct drm_connector *connector)
21842224 {
21852225 struct dc_crtc_timing *timing_out = &stream->timing;
2226+ const struct drm_display_info *info = &connector->display_info;
21862227
21872228 memset(timing_out, 0, sizeof(struct dc_crtc_timing));
21882229
@@ -2191,8 +2232,10 @@ fill_stream_properties_from_drm_display_mode(struct dc_stream_state *stream, · 2 unmodified lines
21912232 timing_out->v_border_top = 0;
21922233 timing_out->v_border_bottom = 0;
21932234 /* TODO: un-hardcode */
2194−
2195− if ((connector->display_info.color_formats & DRM_COLOR_FORMAT_YCRCB444)
2235+ if (drm_mode_is_420_only(info, mode_in)
2236+ && stream->sink->sink_signal == SIGNAL_TYPE_HDMI_TYPE_A)
2237+ timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR420;
2238+ else if ((connector->display_info.color_formats & DRM_COLOR_FORMAT_YCRCB444)
21962239 && stream->sink->sink_signal == SIGNAL_TYPE_HDMI_TYPE_A)
21972240 timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR444;
21982241 else
@@ -2228,6 +2271,8 @@ fill_stream_properties_from_drm_display_mode(struct dc_stream_state *stream, · 29 unmodified lines
22282271
22292272 stream->out_transfer_func->type = TF_TYPE_PREDEFINED;
22302273 stream->out_transfer_func->tf = TRANSFER_FUNCTION_SRGB;
2274+ if (stream->sink->sink_signal == SIGNAL_TYPE_HDMI_TYPE_A)
2275+ adjust_colour_depth_from_display_info(timing_out, info);
22312276 }
22322277
22332278 static void fill_audio_info(struct audio_info *audio_info,
@@ -3928,10 +3973,11 @@ static void amdgpu_dm_do_flip(struct drm_crtc *crtc, · 1694 unmodified lines
39283973 if (acrtc->base.state->event)
39293974 prepare_flip_isr(acrtc);
39303975
3976+ spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
3977+
39313978 surface_updates->surface = dc_stream_get_status(acrtc_state->stream)->plane_states[0];
39323979 surface_updates->flip_addr = &addr;
39333980
3934−
39353981 dc_commit_updates_for_stream(adev->dm.dc,
39363982 surface_updates,
39373983 1,
@@ -3944,9 +3990,6 @@ static void amdgpu_dm_do_flip(struct drm_crtc *crtc, · 6 unmodified lines
39443990 __func__,
39453991 addr.address.grph.addr.high_part,
39463992 addr.address.grph.addr.low_part);
3947−
3948−
3949− spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
39503993 }
39513994
39523995 /*
@@ -4206,6 +4249,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) · 253 unmodified lines
42064249 struct drm_connector *connector;
42074250 struct drm_connector_state *old_con_state, *new_con_state;
42084251 struct dm_crtc_state *dm_old_crtc_state, *dm_new_crtc_state;
4252+ int crtc_disable_count = 0;
42094253
42104254 drm_atomic_helper_update_legacy_modeset_state(dev, state);
42114255
@@ -4410,6 +4454,9 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) · 198 unmodified lines
44104454 struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc);
44114455 bool modeset_needed;
44124456
4457+ if (old_crtc_state->active && !new_crtc_state->active)
4458+ crtc_disable_count++;
4459+
44134460 dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
44144461 dm_old_crtc_state = to_dm_crtc_state(old_crtc_state);
44154462 modeset_needed = modeset_required(
@@ -4463,11 +4510,9 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) · 47 unmodified lines
44634510 * so we can put the GPU into runtime suspend if we're not driving any
44644511 * displays anymore
44654512 */
4513+ for (i = 0; i < crtc_disable_count; i++)
4514+ pm_runtime_put_autosuspend(dev->dev);
44664515 pm_runtime_mark_last_busy(dev->dev);
4467− for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
4468− if (old_crtc_state->active && !new_crtc_state->active)
4469− pm_runtime_put_autosuspend(dev->dev);
4470− }
44714516 }
44724517
44734518
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c+8−12
@@ -83,22 +83,21 @@ static ssize_t dm_dp_aux_transfer(struct drm_dp_aux *aux, · 82 unmodified lines
8383 enum i2c_mot_mode mot = (msg->request & DP_AUX_I2C_MOT) ?
8484 I2C_MOT_TRUE : I2C_MOT_FALSE;
8585 enum ddc_result res;
86− uint32_t read_bytes = msg->size;
86+ ssize_t read_bytes;
8787
8888 if (WARN_ON(msg->size > 16))
8989 return -E2BIG;
9090
9191 switch (msg->request & ~DP_AUX_I2C_MOT) {
9292 case DP_AUX_NATIVE_READ:
93− res = dal_ddc_service_read_dpcd_data(
93+ read_bytes = dal_ddc_service_read_dpcd_data(
9494 TO_DM_AUX(aux)->ddc_service,
9595 false,
9696 I2C_MOT_UNDEF,
9797 msg->address,
9898 msg->buffer,
99− msg->size,
100− &read_bytes);
101− break;
99+ msg->size);
100+ return read_bytes;
102101 case DP_AUX_NATIVE_WRITE:
103102 res = dal_ddc_service_write_dpcd_data(
104103 TO_DM_AUX(aux)->ddc_service,
@@ -109,15 +108,14 @@ static ssize_t dm_dp_aux_transfer(struct drm_dp_aux *aux, · 4 unmodified lines
109108 msg->size);
110109 break;
111110 case DP_AUX_I2C_READ:
112− res = dal_ddc_service_read_dpcd_data(
111+ read_bytes = dal_ddc_service_read_dpcd_data(
113112 TO_DM_AUX(aux)->ddc_service,
114113 true,
115114 mot,
116115 msg->address,
117116 msg->buffer,
118− msg->size,
119− &read_bytes);
120− break;
117+ msg->size);
118+ return read_bytes;
121119 case DP_AUX_I2C_WRITE:
122120 res = dal_ddc_service_write_dpcd_data(
123121 TO_DM_AUX(aux)->ddc_service,
@@ -139,9 +137,7 @@ static ssize_t dm_dp_aux_transfer(struct drm_dp_aux *aux, · 15 unmodified lines
139137 r == DDC_RESULT_SUCESSFULL);
140138 #endif
141139
142− if (res != DDC_RESULT_SUCESSFULL)
143− return -EIO;
144− return read_bytes;
140+ return msg->size;
145141 }
146142
147143 static enum drm_connector_status
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c+3−2
@@ -255,8 +255,9 @@ static void pp_to_dc_clock_levels_with_latency( · 254 unmodified lines
255255 DC_DECODE_PP_CLOCK_TYPE(dc_clk_type));
256256
257257 for (i = 0; i < clk_level_info->num_levels; i++) {
258− DRM_DEBUG("DM_PPLIB:\t %d\n", pp_clks->data[i].clocks_in_khz);
259− clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz;
258+ DRM_DEBUG("DM_PPLIB:\t %d in 10kHz\n", pp_clks->data[i].clocks_in_khz);
259+ /* translate 10kHz to kHz */
260+ clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz * 10;
260261 clk_level_info->data[i].latency_in_us = pp_clks->data[i].latency_in_us;
261262 }
262263 }
drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c+3−7
@@ -629,14 +629,13 @@ bool dal_ddc_service_query_ddc_data( · 628 unmodified lines
629629 return ret;
630630 }
631631
632−enum ddc_result dal_ddc_service_read_dpcd_data(
632+ssize_t dal_ddc_service_read_dpcd_data(
633633 struct ddc_service *ddc,
634634 bool i2c,
635635 enum i2c_mot_mode mot,
636636 uint32_t address,
637637 uint8_t *data,
638− uint32_t len,
639− uint32_t *read)
638+ uint32_t len)
640639 {
641640 struct aux_payload read_payload = {
642641 .i2c_over_aux = i2c,
@@ -653,8 +652,6 @@ enum ddc_result dal_ddc_service_read_dpcd_data( · 10 unmodified lines
653652 .mot = mot
654653 };
655654
656− *read = 0;
657−
658655 if (len > DEFAULT_AUX_MAX_DATA_SIZE) {
659656 BREAK_TO_DEBUGGER();
660657 return DDC_RESULT_FAILED_INVALID_OPERATION;
@@ -664,8 +661,7 @@ enum ddc_result dal_ddc_service_read_dpcd_data( · 3 unmodified lines
664661 ddc->ctx->i2caux,
665662 ddc->ddc_pin,
666663 &command)) {
667− *read = command.payloads->length;
668− return DDC_RESULT_SUCESSFULL;
664+ return (ssize_t)command.payloads->length;
669665 }
670666
671667 return DDC_RESULT_FAILED_OPERATION;
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c+3−5
@@ -1767,12 +1767,10 @@ static void dp_test_send_link_training(struct dc_link *link) · 1766 unmodified lines
17671767 dp_retrain_link_dp_test(link, &link_settings, false);
17681768 }
17691769
1770−/* TODO hbr2 compliance eye output is unstable
1770+/* TODO Raven hbr2 compliance eye output is unstable
17711771 * (toggling on and off) with debugger break
17721772 * This caueses intermittent PHY automation failure
17731773 * Need to look into the root cause */
1774−static uint8_t force_tps4_for_cp2520 = 1;
1775−
17761774 static void dp_test_send_phy_test_pattern(struct dc_link *link)
17771775 {
17781776 union phy_test_pattern dpcd_test_pattern;
@@ -1832,13 +1830,13 @@ static void dp_test_send_phy_test_pattern(struct dc_link *link) · 53 unmodified lines
18321830 break;
18331831 case PHY_TEST_PATTERN_CP2520_1:
18341832 /* CP2520 pattern is unstable, temporarily use TPS4 instead */
1835− test_pattern = (force_tps4_for_cp2520 == 1) ?
1833+ test_pattern = (link->dc->caps.force_dp_tps4_for_cp2520 == 1) ?
18361834 DP_TEST_PATTERN_TRAINING_PATTERN4 :
18371835 DP_TEST_PATTERN_HBR2_COMPLIANCE_EYE;
18381836 break;
18391837 case PHY_TEST_PATTERN_CP2520_2:
18401838 /* CP2520 pattern is unstable, temporarily use TPS4 instead */
1841− test_pattern = (force_tps4_for_cp2520 == 1) ?
1839+ test_pattern = (link->dc->caps.force_dp_tps4_for_cp2520 == 1) ?
18421840 DP_TEST_PATTERN_TRAINING_PATTERN4 :
18431841 DP_TEST_PATTERN_HBR2_COMPLIANCE_EYE;
18441842 break;
drivers/gpu/drm/amd/display/dc/dc.h+1−0
@@ -76,6 +76,7 @@ struct dc_caps { · 75 unmodified lines
7676 bool is_apu;
7777 bool dual_link_dvi;
7878 bool post_blend_color_processing;
79+ bool force_dp_tps4_for_cp2520;
7980 };
8081
8182 struct dc_dcc_surface_param {
drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c+25−2
@@ -741,6 +741,29 @@ static struct mem_input_funcs dce_mi_funcs = { · 740 unmodified lines
741741 .mem_input_is_flip_pending = dce_mi_is_flip_pending
742742 };
743743
744+static struct mem_input_funcs dce112_mi_funcs = {
745+ .mem_input_program_display_marks = dce112_mi_program_display_marks,
746+ .allocate_mem_input = dce_mi_allocate_dmif,
747+ .free_mem_input = dce_mi_free_dmif,
748+ .mem_input_program_surface_flip_and_addr =
749+ dce_mi_program_surface_flip_and_addr,
750+ .mem_input_program_pte_vm = dce_mi_program_pte_vm,
751+ .mem_input_program_surface_config =
752+ dce_mi_program_surface_config,
753+ .mem_input_is_flip_pending = dce_mi_is_flip_pending
754+};
755+
756+static struct mem_input_funcs dce120_mi_funcs = {
757+ .mem_input_program_display_marks = dce120_mi_program_display_marks,
758+ .allocate_mem_input = dce_mi_allocate_dmif,
759+ .free_mem_input = dce_mi_free_dmif,
760+ .mem_input_program_surface_flip_and_addr =
761+ dce_mi_program_surface_flip_and_addr,
762+ .mem_input_program_pte_vm = dce_mi_program_pte_vm,
763+ .mem_input_program_surface_config =
764+ dce_mi_program_surface_config,
765+ .mem_input_is_flip_pending = dce_mi_is_flip_pending
766+};
744767
745768 void dce_mem_input_construct(
746769 struct dce_mem_input *dce_mi,
@@ -769,7 +792,7 @@ void dce112_mem_input_construct( · 22 unmodified lines
769792 const struct dce_mem_input_mask *mi_mask)
770793 {
771794 dce_mem_input_construct(dce_mi, ctx, inst, regs, mi_shift, mi_mask);
772− dce_mi->base.funcs->mem_input_program_display_marks = dce112_mi_program_display_marks;
795+ dce_mi->base.funcs = &dce112_mi_funcs;
773796 }
774797
775798 void dce120_mem_input_construct(
@@ -781,5 +804,5 @@ void dce120_mem_input_construct( · 5 unmodified lines
781804 const struct dce_mem_input_mask *mi_mask)
782805 {
783806 dce_mem_input_construct(dce_mi, ctx, inst, regs, mi_shift, mi_mask);
784− dce_mi->base.funcs->mem_input_program_display_marks = dce120_mi_program_display_marks;
807+ dce_mi->base.funcs = &dce120_mi_funcs;
785808 }
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c+16−3
@@ -678,9 +678,22 @@ bool dce100_validate_bandwidth( · 677 unmodified lines
678678 struct dc *dc,
679679 struct dc_state *context)
680680 {
681− /* TODO implement when needed but for now hardcode max value*/
682− context->bw.dce.dispclk_khz = 681000;
683− context->bw.dce.yclk_khz = 250000 * MEMORY_TYPE_MULTIPLIER;
681+ int i;
682+ bool at_least_one_pipe = false;
683+
684+ for (i = 0; i < dc->res_pool->pipe_count; i++) {
685+ if (context->res_ctx.pipe_ctx[i].stream)
686+ at_least_one_pipe = true;
687+ }
688+
689+ if (at_least_one_pipe) {
690+ /* TODO implement when needed but for now hardcode max value*/
691+ context->bw.dce.dispclk_khz = 681000;
692+ context->bw.dce.yclk_khz = 250000 * MEMORY_TYPE_MULTIPLIER;
693+ } else {
694+ context->bw.dce.dispclk_khz = 0;
695+ context->bw.dce.yclk_khz = 0;
696+ }
684697
685698 return true;
686699 }
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c+2−0
@@ -1027,6 +1027,8 @@ static bool construct( · 1026 unmodified lines
10271027 dc->caps.max_slave_planes = 1;
10281028 dc->caps.is_apu = true;
10291029 dc->caps.post_blend_color_processing = false;
1030+ /* Raven DP PHY HBR2 eye diagram pattern is not stable. Use TP4 */
1031+ dc->caps.force_dp_tps4_for_cp2520 = true;
10301032
10311033 if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
10321034 dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/inc/dc_link_ddc.h+2−3
@@ -102,14 +102,13 @@ bool dal_ddc_service_query_ddc_data( · 101 unmodified lines
102102 uint8_t *read_buf,
103103 uint32_t read_size);
104104
105−enum ddc_result dal_ddc_service_read_dpcd_data(
105+ssize_t dal_ddc_service_read_dpcd_data(
106106 struct ddc_service *ddc,
107107 bool i2c,
108108 enum i2c_mot_mode mot,
109109 uint32_t address,
110110 uint8_t *data,
111− uint32_t len,
112− uint32_t *read);
111+ uint32_t len);
113112
114113 enum ddc_result dal_ddc_service_write_dpcd_data(
115114 struct ddc_service *ddc,
drivers/gpu/drm/amd/include/atomfirmware.h+4−1
@@ -1433,7 +1433,10 @@ struct atom_smc_dpm_info_v4_1 · 1432 unmodified lines
14331433 uint8_t acggfxclkspreadpercent;
14341434 uint16_t acggfxclkspreadfreq;
14351435
1436− uint32_t boardreserved[10];
1436+ uint8_t Vr2_I2C_address;
1437+ uint8_t padding_vr2[3];
1438+
1439+ uint32_t boardreserved[9];
14371440 };
14381441
14391442 /*
drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c+84−12
@@ -512,14 +512,82 @@ int pp_atomfwctrl_get_clk_information_by_clkid(struct pp_hwmgr *hwmgr, BIOS_CLKI · 511 unmodified lines
512512 return 0;
513513 }
514514
515+static void pp_atomfwctrl_copy_vbios_bootup_values_3_2(struct pp_hwmgr *hwmgr,
516+ struct pp_atomfwctrl_bios_boot_up_values *boot_values,
517+ struct atom_firmware_info_v3_2 *fw_info)
518+{
519+ uint32_t frequency = 0;
520+
521+ boot_values->ulRevision = fw_info->firmware_revision;
522+ boot_values->ulGfxClk = fw_info->bootup_sclk_in10khz;
523+ boot_values->ulUClk = fw_info->bootup_mclk_in10khz;
524+ boot_values->usVddc = fw_info->bootup_vddc_mv;
525+ boot_values->usVddci = fw_info->bootup_vddci_mv;
526+ boot_values->usMvddc = fw_info->bootup_mvddc_mv;
527+ boot_values->usVddGfx = fw_info->bootup_vddgfx_mv;
528+ boot_values->ucCoolingID = fw_info->coolingsolution_id;
529+ boot_values->ulSocClk = 0;
530+ boot_values->ulDCEFClk = 0;
531+
532+ if (!pp_atomfwctrl_get_clk_information_by_clkid(hwmgr, SMU11_SYSPLL0_SOCCLK_ID, &frequency))
533+ boot_values->ulSocClk = frequency;
534+
535+ if (!pp_atomfwctrl_get_clk_information_by_clkid(hwmgr, SMU11_SYSPLL0_DCEFCLK_ID, &frequency))
536+ boot_values->ulDCEFClk = frequency;
537+
538+ if (!pp_atomfwctrl_get_clk_information_by_clkid(hwmgr, SMU11_SYSPLL0_ECLK_ID, &frequency))
539+ boot_values->ulEClk = frequency;
540+
541+ if (!pp_atomfwctrl_get_clk_information_by_clkid(hwmgr, SMU11_SYSPLL0_VCLK_ID, &frequency))
542+ boot_values->ulVClk = frequency;
543+
544+ if (!pp_atomfwctrl_get_clk_information_by_clkid(hwmgr, SMU11_SYSPLL0_DCLK_ID, &frequency))
545+ boot_values->ulDClk = frequency;
546+}
547+
548+static void pp_atomfwctrl_copy_vbios_bootup_values_3_1(struct pp_hwmgr *hwmgr,
549+ struct pp_atomfwctrl_bios_boot_up_values *boot_values,
550+ struct atom_firmware_info_v3_1 *fw_info)
551+{
552+ uint32_t frequency = 0;
553+
554+ boot_values->ulRevision = fw_info->firmware_revision;
555+ boot_values->ulGfxClk = fw_info->bootup_sclk_in10khz;
556+ boot_values->ulUClk = fw_info->bootup_mclk_in10khz;
557+ boot_values->usVddc = fw_info->bootup_vddc_mv;
558+ boot_values->usVddci = fw_info->bootup_vddci_mv;
559+ boot_values->usMvddc = fw_info->bootup_mvddc_mv;
560+ boot_values->usVddGfx = fw_info->bootup_vddgfx_mv;
561+ boot_values->ucCoolingID = fw_info->coolingsolution_id;
562+ boot_values->ulSocClk = 0;
563+ boot_values->ulDCEFClk = 0;
564+
565+ if (!pp_atomfwctrl_get_clk_information_by_clkid(hwmgr, SMU9_SYSPLL0_SOCCLK_ID, &frequency))
566+ boot_values->ulSocClk = frequency;
567+
568+ if (!pp_atomfwctrl_get_clk_information_by_clkid(hwmgr, SMU9_SYSPLL0_DCEFCLK_ID, &frequency))
569+ boot_values->ulDCEFClk = frequency;
570+
571+ if (!pp_atomfwctrl_get_clk_information_by_clkid(hwmgr, SMU9_SYSPLL0_ECLK_ID, &frequency))
572+ boot_values->ulEClk = frequency;
573+
574+ if (!pp_atomfwctrl_get_clk_information_by_clkid(hwmgr, SMU9_SYSPLL0_VCLK_ID, &frequency))
575+ boot_values->ulVClk = frequency;
576+
577+ if (!pp_atomfwctrl_get_clk_information_by_clkid(hwmgr, SMU9_SYSPLL0_DCLK_ID, &frequency))
578+ boot_values->ulDClk = frequency;
579+}
580+
515581 int pp_atomfwctrl_get_vbios_bootup_values(struct pp_hwmgr *hwmgr,
516582 struct pp_atomfwctrl_bios_boot_up_values *boot_values)
517583 {
518− struct atom_firmware_info_v3_1 *info = NULL;
584+ struct atom_firmware_info_v3_2 *fwinfo_3_2;
585+ struct atom_firmware_info_v3_1 *fwinfo_3_1;
586+ struct atom_common_table_header *info = NULL;
519587 uint16_t ix;
520588
521589 ix = GetIndexIntoMasterDataTable(firmwareinfo);
522− info = (struct atom_firmware_info_v3_1 *)
590+ info = (struct atom_common_table_header *)
523591 smu_atom_get_data_table(hwmgr->adev,
524592 ix, NULL, NULL, NULL);
525593
@@ -528,16 +596,18 @@ int pp_atomfwctrl_get_vbios_bootup_values(struct pp_hwmgr *hwmgr, · 2 unmodified lines
528596 return -EINVAL;
529597 }
530598
531− boot_values->ulRevision = info->firmware_revision;
532− boot_values->ulGfxClk = info->bootup_sclk_in10khz;
533− boot_values->ulUClk = info->bootup_mclk_in10khz;
534− boot_values->usVddc = info->bootup_vddc_mv;
535− boot_values->usVddci = info->bootup_vddci_mv;
536− boot_values->usMvddc = info->bootup_mvddc_mv;
537− boot_values->usVddGfx = info->bootup_vddgfx_mv;
538− boot_values->ucCoolingID = info->coolingsolution_id;
539− boot_values->ulSocClk = 0;
540− boot_values->ulDCEFClk = 0;
599+ if ((info->format_revision == 3) && (info->content_revision == 2)) {
600+ fwinfo_3_2 = (struct atom_firmware_info_v3_2 *)info;
601+ pp_atomfwctrl_copy_vbios_bootup_values_3_2(hwmgr,
602+ boot_values, fwinfo_3_2);
603+ } else if ((info->format_revision == 3) && (info->content_revision == 1)) {
604+ fwinfo_3_1 = (struct atom_firmware_info_v3_1 *)info;
605+ pp_atomfwctrl_copy_vbios_bootup_values_3_1(hwmgr,
606+ boot_values, fwinfo_3_1);
607+ } else {
608+ pr_info("Fw info table revision does not match!");
609+ return -EINVAL;
610+ }
541611
542612 return 0;
543613 }
@@ -629,5 +699,7 @@ int pp_atomfwctrl_get_smc_dpm_information(struct pp_hwmgr *hwmgr, · 85 unmodified lines
629699 param->acggfxclkspreadpercent = info->acggfxclkspreadpercent;
630700 param->acggfxclkspreadfreq = info->acggfxclkspreadfreq;
631701
702+ param->Vr2_I2C_address = info->Vr2_I2C_address;
703+
632704 return 0;
633705 }
drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.h+5−0
@@ -136,6 +136,9 @@ struct pp_atomfwctrl_bios_boot_up_values { · 135 unmodified lines
136136 uint32_t ulUClk;
137137 uint32_t ulSocClk;
138138 uint32_t ulDCEFClk;
139+ uint32_t ulEClk;
140+ uint32_t ulVClk;
141+ uint32_t ulDClk;
139142 uint16_t usVddc;
140143 uint16_t usVddci;
141144 uint16_t usMvddc;
@@ -207,6 +210,8 @@ struct pp_atomfwctrl_smc_dpm_parameters · 65 unmodified lines
207210 uint8_t acggfxclkspreadenabled;
208211 uint8_t acggfxclkspreadpercent;
209212 uint16_t acggfxclkspreadfreq;
213+
214+ uint8_t Vr2_I2C_address;
210215 };
211216
212217 int pp_atomfwctrl_get_gpu_pll_dividers_vega10(struct pp_hwmgr *hwmgr,
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c+1−1
@@ -1090,7 +1090,7 @@ static int vega10_disable_se_edc_config(struct pp_hwmgr *hwmgr) · 1089 unmodified lines
10901090 static int vega10_enable_psm_gc_edc_config(struct pp_hwmgr *hwmgr)
10911091 {
10921092 struct amdgpu_device *adev = hwmgr->adev;
1093− int result;
1093+ int result = 0;
10941094 uint32_t num_se = 0;
10951095 uint32_t count, data;
10961096
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c+4−0
@@ -81,6 +81,7 @@ static void vega12_set_default_registry_data(struct pp_hwmgr *hwmgr) · 80 unmodified lines
8181
8282 data->registry_data.disallowed_features = 0x0;
8383 data->registry_data.od_state_in_dc_support = 0;
84+ data->registry_data.thermal_support = 1;
8485 data->registry_data.skip_baco_hardware = 0;
8586
8687 data->registry_data.log_avfs_param = 0;
@@ -803,6 +804,9 @@ static int vega12_init_smc_table(struct pp_hwmgr *hwmgr) · 716 unmodified lines
803804 data->vbios_boot_state.soc_clock = boot_up_values.ulSocClk;
804805 data->vbios_boot_state.dcef_clock = boot_up_values.ulDCEFClk;
805806 data->vbios_boot_state.uc_cooling_id = boot_up_values.ucCoolingID;
807+ data->vbios_boot_state.eclock = boot_up_values.ulEClk;
808+ data->vbios_boot_state.dclock = boot_up_values.ulDClk;
809+ data->vbios_boot_state.vclock = boot_up_values.ulVClk;
806810 smum_send_msg_to_smc_with_parameter(hwmgr,
807811 PPSMC_MSG_SetMinDeepSleepDcefclk,
808812 (uint32_t)(data->vbios_boot_state.dcef_clock / 100));
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.h+3−0
@@ -167,6 +167,9 @@ struct vega12_vbios_boot_state { · 166 unmodified lines
167167 uint32_t mem_clock;
168168 uint32_t soc_clock;
169169 uint32_t dcef_clock;
170+ uint32_t eclock;
171+ uint32_t dclock;
172+ uint32_t vclock;
170173 };
171174
172175 #define DPMTABLE_OD_UPDATE_SCLK 0x00000001
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c+2−0
@@ -230,6 +230,8 @@ static int append_vbios_pptable(struct pp_hwmgr *hwmgr, PPTable_t *ppsmc_pptable · 229 unmodified lines
230230 ppsmc_pptable->AcgThresholdFreqLow = 0xFFFF;
231231 }
232232
233+ ppsmc_pptable->Vr2_I2C_address = smc_dpm_table.Vr2_I2C_address;
234+
233235 return 0;
234236 }
235237
drivers/gpu/drm/amd/powerplay/inc/vega12/smu9_driver_if.h+4−1
@@ -499,7 +499,10 @@ typedef struct { · 498 unmodified lines
499499 uint8_t AcgGfxclkSpreadPercent;
500500 uint16_t AcgGfxclkSpreadFreq;
501501
502− uint32_t BoardReserved[10];
502+ uint8_t Vr2_I2C_address;
503+ uint8_t padding_vr2[3];
504+
505+ uint32_t BoardReserved[9];
503506
504507
505508 uint32_t MmHubPadding[7];
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c+12−11
@@ -381,6 +381,7 @@ int smu7_request_smu_load_fw(struct pp_hwmgr *hwmgr) · 380 unmodified lines
381381 uint32_t fw_to_load;
382382 int result = 0;
383383 struct SMU_DRAMData_TOC *toc;
384+ uint32_t num_entries = 0;
384385
385386 if (!hwmgr->reload_fw) {
386387 pr_info("skip reloading...\n");
@@ -422,41 +423,41 @@ int smu7_request_smu_load_fw(struct pp_hwmgr *hwmgr) · 35 unmodified lines
422423 }
423424
424425 toc = (struct SMU_DRAMData_TOC *)smu_data->header;
425− toc->num_entries = 0;
426426 toc->structure_version = 1;
427427
428428 PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
429− UCODE_ID_RLC_G, &toc->entry[toc->num_entries++]),
429+ UCODE_ID_RLC_G, &toc->entry[num_entries++]),
430430 "Failed to Get Firmware Entry.", return -EINVAL);
431431 PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
432− UCODE_ID_CP_CE, &toc->entry[toc->num_entries++]),
432+ UCODE_ID_CP_CE, &toc->entry[num_entries++]),
433433 "Failed to Get Firmware Entry.", return -EINVAL);
434434 PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
435− UCODE_ID_CP_PFP, &toc->entry[toc->num_entries++]),
435+ UCODE_ID_CP_PFP, &toc->entry[num_entries++]),
436436 "Failed to Get Firmware Entry.", return -EINVAL);
437437 PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
438− UCODE_ID_CP_ME, &toc->entry[toc->num_entries++]),
438+ UCODE_ID_CP_ME, &toc->entry[num_entries++]),
439439 "Failed to Get Firmware Entry.", return -EINVAL);
440440 PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
441− UCODE_ID_CP_MEC, &toc->entry[toc->num_entries++]),
441+ UCODE_ID_CP_MEC, &toc->entry[num_entries++]),
442442 "Failed to Get Firmware Entry.", return -EINVAL);
443443 PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
444− UCODE_ID_CP_MEC_JT1, &toc->entry[toc->num_entries++]),
444+ UCODE_ID_CP_MEC_JT1, &toc->entry[num_entries++]),
445445 "Failed to Get Firmware Entry.", return -EINVAL);
446446 PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
447− UCODE_ID_CP_MEC_JT2, &toc->entry[toc->num_entries++]),
447+ UCODE_ID_CP_MEC_JT2, &toc->entry[num_entries++]),
448448 "Failed to Get Firmware Entry.", return -EINVAL);
449449 PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
450− UCODE_ID_SDMA0, &toc->entry[toc->num_entries++]),
450+ UCODE_ID_SDMA0, &toc->entry[num_entries++]),
451451 "Failed to Get Firmware Entry.", return -EINVAL);
452452 PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
453− UCODE_ID_SDMA1, &toc->entry[toc->num_entries++]),
453+ UCODE_ID_SDMA1, &toc->entry[num_entries++]),
454454 "Failed to Get Firmware Entry.", return -EINVAL);
455455 if (!hwmgr->not_vf)
456456 PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
457− UCODE_ID_MEC_STORAGE, &toc->entry[toc->num_entries++]),
457+ UCODE_ID_MEC_STORAGE, &toc->entry[num_entries++]),
458458 "Failed to Get Firmware Entry.", return -EINVAL);
459459
460+ toc->num_entries = num_entries;
460461 smu7_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_DRV_DRAM_ADDR_HI, upper_32_bits(smu_data->header_buffer.mc_addr));
461462 smu7_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_DRV_DRAM_ADDR_LO, lower_32_bits(smu_data->header_buffer.mc_addr));
462463
drivers/gpu/drm/arm/malidp_drv.c+2−1
@@ -278,7 +278,6 @@ static int malidp_init(struct drm_device *drm) · 277 unmodified lines
278278
279279 static void malidp_fini(struct drm_device *drm)
280280 {
281− drm_atomic_helper_shutdown(drm);
282281 drm_mode_config_cleanup(drm);
283282 }
284283
@@ -646,6 +645,7 @@ vblank_fail: · 361 unmodified lines
646645 malidp_de_irq_fini(drm);
647646 drm->irq_enabled = false;
648647 irq_init_fail:
648+ drm_atomic_helper_shutdown(drm);
649649 component_unbind_all(dev, drm);
650650 bind_fail:
651651 of_node_put(malidp->crtc.port);
@@ -681,6 +681,7 @@ static void malidp_unbind(struct device *dev) · 29 unmodified lines
681681 malidp_se_irq_fini(drm);
682682 malidp_de_irq_fini(drm);
683683 drm->irq_enabled = false;
684+ drm_atomic_helper_shutdown(drm);
684685 component_unbind_all(dev, drm);
685686 of_node_put(malidp->crtc.port);
686687 malidp->crtc.port = NULL;
drivers/gpu/drm/arm/malidp_hw.c+2−1
@@ -634,7 +634,8 @@ const struct malidp_hw malidp_device[MALIDP_MAX_DEVICES] = { · 633 unmodified lines
634634 .vsync_irq = MALIDP500_DE_IRQ_VSYNC,
635635 },
636636 .se_irq_map = {
637− .irq_mask = MALIDP500_SE_IRQ_CONF_MODE,
637+ .irq_mask = MALIDP500_SE_IRQ_CONF_MODE |
638+ MALIDP500_SE_IRQ_GLOBAL,
638639 .vsync_irq = 0,
639640 },
640641 .dc_irq_map = {
drivers/gpu/drm/arm/malidp_planes.c+6−3
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323
2424 /* Layer specific register offsets */
2525 #define MALIDP_LAYER_FORMAT 0x000
26+#define LAYER_FORMAT_MASK 0x3f
2627 #define MALIDP_LAYER_CONTROL 0x004
2728 #define LAYER_ENABLE (1 << 0)
2829 #define LAYER_FLOWCFG_MASK 7
@@ -235,8 +236,8 @@ static int malidp_de_plane_check(struct drm_plane *plane, · 206 unmodified lines
235236 if (state->rotation & MALIDP_ROTATED_MASK) {
236237 int val;
237238
238− val = mp->hwdev->hw->rotmem_required(mp->hwdev, state->crtc_h,
239− state->crtc_w,
239+ val = mp->hwdev->hw->rotmem_required(mp->hwdev, state->crtc_w,
240+ state->crtc_h,
240241 fb->format->format);
241242 if (val < 0)
242243 return val;
@@ -337,7 +338,9 @@ static void malidp_de_plane_update(struct drm_plane *plane, · 94 unmodified lines
337338 dest_w = plane->state->crtc_w;
338339 dest_h = plane->state->crtc_h;
339340
340− malidp_hw_write(mp->hwdev, ms->format, mp->layer->base);
341+ val = malidp_hw_read(mp->hwdev, mp->layer->base);
342+ val = (val & ~LAYER_FORMAT_MASK) | ms->format;
343+ malidp_hw_write(mp->hwdev, val, mp->layer->base);
341344
342345 for (i = 0; i < ms->n_planes; i++) {
343346 /* calculate the offset for the layer's plane registers */
drivers/gpu/drm/armada/armada_crtc.c+10−2
@@ -519,8 +519,9 @@ static irqreturn_t armada_drm_irq(int irq, void *arg) · 518 unmodified lines
519519 u32 v, stat = readl_relaxed(dcrtc->base + LCD_SPU_IRQ_ISR);
520520
521521 /*
522− * This is rediculous - rather than writing bits to clear, we
523− * have to set the actual status register value. This is racy.
522+ * Reading the ISR appears to clear bits provided CLEAN_SPU_IRQ_ISR
523+ * is set. Writing has some other effect to acknowledge the IRQ -
524+ * without this, we only get a single IRQ.
524525 */
525526 writel_relaxed(0, dcrtc->base + LCD_SPU_IRQ_ISR);
526527
@@ -1116,16 +1117,22 @@ armada_drm_crtc_set_property(struct drm_crtc *crtc, · 589 unmodified lines
11161117 static int armada_drm_crtc_enable_vblank(struct drm_crtc *crtc)
11171118 {
11181119 struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc);
1120+ unsigned long flags;
11191121
1122+ spin_lock_irqsave(&dcrtc->irq_lock, flags);
11201123 armada_drm_crtc_enable_irq(dcrtc, VSYNC_IRQ_ENA);
1124+ spin_unlock_irqrestore(&dcrtc->irq_lock, flags);
11211125 return 0;
11221126 }
11231127
11241128 static void armada_drm_crtc_disable_vblank(struct drm_crtc *crtc)
11251129 {
11261130 struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc);
1131+ unsigned long flags;
11271132
1133+ spin_lock_irqsave(&dcrtc->irq_lock, flags);
11281134 armada_drm_crtc_disable_irq(dcrtc, VSYNC_IRQ_ENA);
1135+ spin_unlock_irqrestore(&dcrtc->irq_lock, flags);
11291136 }
11301137
11311138 static const struct drm_crtc_funcs armada_crtc_funcs = {
@@ -1415,6 +1422,7 @@ static int armada_drm_crtc_create(struct drm_device *drm, struct device *dev, · 283 unmodified lines
14151422 CFG_PDWN64x66, dcrtc->base + LCD_SPU_SRAM_PARA1);
14161423 writel_relaxed(0x2032ff81, dcrtc->base + LCD_SPU_DMA_CTRL1);
14171424 writel_relaxed(dcrtc->irq_ena, dcrtc->base + LCD_SPU_IRQ_ENA);
1425+ readl_relaxed(dcrtc->base + LCD_SPU_IRQ_ISR);
14181426 writel_relaxed(0, dcrtc->base + LCD_SPU_IRQ_ISR);
14191427
14201428 ret = devm_request_irq(dev, irq, armada_drm_irq, 0, "armada_drm_crtc",
drivers/gpu/drm/armada/armada_hw.h+1−0
@@ -160,6 +160,7 @@ enum { · 159 unmodified lines
160160 CFG_ALPHAM_GRA = 0x1 << 16,
161161 CFG_ALPHAM_CFG = 0x2 << 16,
162162 CFG_ALPHA_MASK = 0xff << 8,
163+#define CFG_ALPHA(x) ((x) << 8)
163164 CFG_PIXCMD_MASK = 0xff,
164165 };
165166
drivers/gpu/drm/armada/armada_overlay.c+22−8
@@ -28,6 +28,7 @@ struct armada_ovl_plane_properties { · 27 unmodified lines
2828 uint16_t contrast;
2929 uint16_t saturation;
3030 uint32_t colorkey_mode;
31+ uint32_t colorkey_enable;
3132 };
3233
3334 struct armada_ovl_plane {
@@ -54,11 +55,13 @@ armada_ovl_update_attr(struct armada_ovl_plane_properties *prop, · 20 unmodified lines
5455 writel_relaxed(0x00002000, dcrtc->base + LCD_SPU_CBSH_HUE);
5556
5657 spin_lock_irq(&dcrtc->irq_lock);
57− armada_updatel(prop->colorkey_mode | CFG_ALPHAM_GRA,
58− CFG_CKMODE_MASK | CFG_ALPHAM_MASK | CFG_ALPHA_MASK,
59− dcrtc->base + LCD_SPU_DMA_CTRL1);
60−
61− armada_updatel(ADV_GRACOLORKEY, 0, dcrtc->base + LCD_SPU_ADV_REG);
58+ armada_updatel(prop->colorkey_mode,
59+ CFG_CKMODE_MASK | CFG_ALPHAM_MASK | CFG_ALPHA_MASK,
60+ dcrtc->base + LCD_SPU_DMA_CTRL1);
61+ if (dcrtc->variant->has_spu_adv_reg)
62+ armada_updatel(prop->colorkey_enable,
63+ ADV_GRACOLORKEY | ADV_VIDCOLORKEY,
64+ dcrtc->base + LCD_SPU_ADV_REG);
6265 spin_unlock_irq(&dcrtc->irq_lock);
6366 }
6467
@@ -321,8 +324,17 @@ static int armada_ovl_plane_set_property(struct drm_plane *plane, · 256 unmodified lines
321324 dplane->prop.colorkey_vb |= K2B(val);
322325 update_attr = true;
323326 } else if (property == priv->colorkey_mode_prop) {
324− dplane->prop.colorkey_mode &= ~CFG_CKMODE_MASK;
325− dplane->prop.colorkey_mode |= CFG_CKMODE(val);
327+ if (val == CKMODE_DISABLE) {
328+ dplane->prop.colorkey_mode =
329+ CFG_CKMODE(CKMODE_DISABLE) |
330+ CFG_ALPHAM_CFG | CFG_ALPHA(255);
331+ dplane->prop.colorkey_enable = 0;
332+ } else {
333+ dplane->prop.colorkey_mode =
334+ CFG_CKMODE(val) |
335+ CFG_ALPHAM_GRA | CFG_ALPHA(0);
336+ dplane->prop.colorkey_enable = ADV_GRACOLORKEY;
337+ }
326338 update_attr = true;
327339 } else if (property == priv->brightness_prop) {
328340 dplane->prop.brightness = val - 256;
@@ -453,7 +465,9 @@ int armada_overlay_plane_create(struct drm_device *dev, unsigned long crtcs) · 124 unmodified lines
453465 dplane->prop.colorkey_yr = 0xfefefe00;
454466 dplane->prop.colorkey_ug = 0x01010100;
455467 dplane->prop.colorkey_vb = 0x01010100;
456− dplane->prop.colorkey_mode = CFG_CKMODE(CKMODE_RGB);
468+ dplane->prop.colorkey_mode = CFG_CKMODE(CKMODE_RGB) |
469+ CFG_ALPHAM_GRA | CFG_ALPHA(0);
470+ dplane->prop.colorkey_enable = ADV_GRACOLORKEY;
457471 dplane->prop.brightness = 0;
458472 dplane->prop.contrast = 0x4000;
459473 dplane->prop.saturation = 0x4000;
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c+1−1
@@ -839,7 +839,7 @@ static int atmel_hlcdc_plane_init_properties(struct atmel_hlcdc_plane *plane) · 838 unmodified lines
839839 return ret;
840840 }
841841
842− if (desc->layout.xstride && desc->layout.pstride) {
842+ if (desc->layout.xstride[0] && desc->layout.pstride[0]) {
843843 int ret;
844844
845845 ret = drm_plane_create_rotation_property(&plane->base,
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c+12−0
@@ -429,6 +429,18 @@ static void adv7511_hpd_work(struct work_struct *work) · 428 unmodified lines
429429 else
430430 status = connector_status_disconnected;
431431
432+ /*
433+ * The bridge resets its registers on unplug. So when we get a plug
434+ * event and we're already supposed to be powered, cycle the bridge to
435+ * restore its state.
436+ */
437+ if (status == connector_status_connected &&
438+ adv7511->connector.status == connector_status_disconnected &&
439+ adv7511->powered) {
440+ regcache_mark_dirty(adv7511->regmap);
441+ adv7511_power_on(adv7511);
442+ }
443+
432444 if (adv7511->connector.status != status) {
433445 adv7511->connector.status = status;
434446 if (status == connector_status_disconnected)
drivers/gpu/drm/bridge/sil-sii8620.c+157−208
@@ -14,6 +14,7 @@ · 13 unmodified lines
1414 #include <drm/bridge/mhl.h>
1515 #include <drm/drm_crtc.h>
1616 #include <drm/drm_edid.h>
17+#include <drm/drm_encoder.h>
1718
1819 #include <linux/clk.h>
1920 #include <linux/delay.h>
@@ -36,8 +37,11 @@ · 16 unmodified lines
3637
3738 #define SII8620_BURST_BUF_LEN 288
3839 #define VAL_RX_HDMI_CTRL2_DEFVAL VAL_RX_HDMI_CTRL2_IDLE_CNT(3)
39−#define MHL1_MAX_LCLK 225000
40−#define MHL3_MAX_LCLK 600000
40+
41+#define MHL1_MAX_PCLK 75000
42+#define MHL1_MAX_PCLK_PP_MODE 150000
43+#define MHL3_MAX_PCLK 200000
44+#define MHL3_MAX_PCLK_PP_MODE 300000
4145
4246 enum sii8620_mode {
4347 CM_DISCONNECTED,
@@ -69,9 +73,7 @@ struct sii8620 { · 25 unmodified lines
6973 struct regulator_bulk_data supplies[2];
7074 struct mutex lock; /* context lock, protects fields below */
7175 int error;
72− int pixel_clock;
7376 unsigned int use_packed_pixel:1;
74− int video_code;
7577 enum sii8620_mode mode;
7678 enum sii8620_sink_type sink_type;
7779 u8 cbus_status;
@@ -79,7 +81,9 @@ struct sii8620 { · 1 unmodified line
7981 u8 xstat[MHL_XDS_SIZE];
8082 u8 devcap[MHL_DCAP_SIZE];
8183 u8 xdevcap[MHL_XDC_SIZE];
82− u8 avif[HDMI_INFOFRAME_SIZE(AVI)];
84+ bool feature_complete;
85+ bool devcap_read;
86+ bool sink_detected;
8387 struct edid *edid;
8488 unsigned int gen2_write_burst:1;
8589 enum sii8620_mt_state mt_state;
@@ -476,7 +480,7 @@ static void sii8620_update_array(u8 *dst, u8 *src, int count) · 390 unmodified lines
476480 }
477481 }
478482
479−static void sii8620_sink_detected(struct sii8620 *ctx, int ret)
483+static void sii8620_identify_sink(struct sii8620 *ctx)
480484 {
481485 static const char * const sink_str[] = {
482486 [SINK_NONE] = "NONE",
@@ -487,7 +491,7 @@ static void sii8620_sink_detected(struct sii8620 *ctx, int ret) · 4 unmodified lines
487491 char sink_name[20];
488492 struct device *dev = ctx->dev;
489493
490− if (ret < 0)
494+ if (!ctx->sink_detected || !ctx->devcap_read)
491495 return;
492496
493497 sii8620_fetch_edid(ctx);
@@ -496,6 +500,7 @@ static void sii8620_sink_detected(struct sii8620 *ctx, int ret) · 2 unmodified lines
496500 sii8620_mhl_disconnected(ctx);
497501 return;
498502 }
503+ sii8620_set_upstream_edid(ctx);
499504
500505 if (drm_detect_hdmi_monitor(ctx->edid))
501506 ctx->sink_type = SINK_HDMI;
@@ -508,53 +513,6 @@ static void sii8620_sink_detected(struct sii8620 *ctx, int ret) · 6 unmodified lines
508513 sink_str[ctx->sink_type], sink_name);
509514 }
510515
511−static void sii8620_hsic_init(struct sii8620 *ctx)
512−{
513− if (!sii8620_is_mhl3(ctx))
514− return;
515−
516− sii8620_write(ctx, REG_FCGC,
517− BIT_FCGC_HSIC_HOSTMODE | BIT_FCGC_HSIC_ENABLE);
518− sii8620_setbits(ctx, REG_HRXCTRL3,
519− BIT_HRXCTRL3_HRX_STAY_RESET | BIT_HRXCTRL3_STATUS_EN, ~0);
520− sii8620_setbits(ctx, REG_TTXNUMB, MSK_TTXNUMB_TTX_NUMBPS, 4);
521− sii8620_setbits(ctx, REG_TRXCTRL, BIT_TRXCTRL_TRX_FROM_SE_COC, ~0);
522− sii8620_setbits(ctx, REG_HTXCTRL, BIT_HTXCTRL_HTX_DRVCONN1, 0);
523− sii8620_setbits(ctx, REG_KEEPER, MSK_KEEPER_MODE, VAL_KEEPER_MODE_HOST);
524− sii8620_write_seq_static(ctx,
525− REG_TDMLLCTL, 0,
526− REG_UTSRST, BIT_UTSRST_HRX_SRST | BIT_UTSRST_HTX_SRST |
527− BIT_UTSRST_KEEPER_SRST | BIT_UTSRST_FC_SRST,
528− REG_UTSRST, BIT_UTSRST_HRX_SRST | BIT_UTSRST_HTX_SRST,
529− REG_HRXINTL, 0xff,
530− REG_HRXINTH, 0xff,
531− REG_TTXINTL, 0xff,
532− REG_TTXINTH, 0xff,
533− REG_TRXINTL, 0xff,
534− REG_TRXINTH, 0xff,
535− REG_HTXINTL, 0xff,
536− REG_HTXINTH, 0xff,
537− REG_FCINTR0, 0xff,
538− REG_FCINTR1, 0xff,
539− REG_FCINTR2, 0xff,
540− REG_FCINTR3, 0xff,
541− REG_FCINTR4, 0xff,
542− REG_FCINTR5, 0xff,
543− REG_FCINTR6, 0xff,
544− REG_FCINTR7, 0xff
545− );
546−}
547−
548−static void sii8620_edid_read(struct sii8620 *ctx, int ret)
549−{
550− if (ret < 0)
551− return;
552−
553− sii8620_set_upstream_edid(ctx);
554− sii8620_hsic_init(ctx);
555− sii8620_enable_hpd(ctx);
556−}
557−
558516 static void sii8620_mr_devcap(struct sii8620 *ctx)
559517 {
560518 u8 dcap[MHL_DCAP_SIZE];
@@ -570,6 +528,8 @@ static void sii8620_mr_devcap(struct sii8620 *ctx) · 9 unmodified lines
570528 dcap[MHL_DCAP_ADOPTER_ID_H], dcap[MHL_DCAP_ADOPTER_ID_L],
571529 dcap[MHL_DCAP_DEVICE_ID_H], dcap[MHL_DCAP_DEVICE_ID_L]);
572530 sii8620_update_array(ctx->devcap, dcap, MHL_DCAP_SIZE);
531+ ctx->devcap_read = true;
532+ sii8620_identify_sink(ctx);
573533 }
574534
575535 static void sii8620_mr_xdevcap(struct sii8620 *ctx)
@@ -807,6 +767,7 @@ static void sii8620_burst_rx_all(struct sii8620 *ctx) · 231 unmodified lines
807767 static void sii8620_fetch_edid(struct sii8620 *ctx)
808768 {
809769 u8 lm_ddc, ddc_cmd, int3, cbus;
770+ unsigned long timeout;
810771 int fetched, i;
811772 int edid_len = EDID_LENGTH;
812773 u8 *edid;
@@ -856,23 +817,31 @@ static void sii8620_fetch_edid(struct sii8620 *ctx) · 43 unmodified lines
856817 REG_DDC_CMD, ddc_cmd | VAL_DDC_CMD_ENH_DDC_READ_NO_ACK
857818 );
858819
859− do {
860− int3 = sii8620_readb(ctx, REG_INTR3);
820+ int3 = 0;
821+ timeout = jiffies + msecs_to_jiffies(200);
822+ for (;;) {
861823 cbus = sii8620_readb(ctx, REG_CBUS_STATUS);
862−
863− if (int3 & BIT_DDC_CMD_DONE)
864− break;
865−
866− if (!(cbus & BIT_CBUS_STATUS_CBUS_CONNECTED)) {
824+ if (~cbus & BIT_CBUS_STATUS_CBUS_CONNECTED) {
825+ kfree(edid);
826+ edid = NULL;
827+ goto end;
828+ }
829+ if (int3 & BIT_DDC_CMD_DONE) {
830+ if (sii8620_readb(ctx, REG_DDC_DOUT_CNT)
831+ >= FETCH_SIZE)
832+ break;
833+ } else {
834+ int3 = sii8620_readb(ctx, REG_INTR3);
835+ }
836+ if (time_is_before_jiffies(timeout)) {
837+ ctx->error = -ETIMEDOUT;
838+ dev_err(ctx->dev, "timeout during EDID read\n");
867839 kfree(edid);
868840 edid = NULL;
869841 goto end;
870842 }
871− } while (1);
872−
873− sii8620_readb(ctx, REG_DDC_STATUS);
874− while (sii8620_readb(ctx, REG_DDC_DOUT_CNT) < FETCH_SIZE)
875843 usleep_range(10, 20);
844+ }
876845
877846 sii8620_read_buf(ctx, REG_DDC_DATA, edid + fetched, FETCH_SIZE);
878847 if (fetched + FETCH_SIZE == EDID_LENGTH) {
@@ -971,8 +940,17 @@ static int sii8620_hw_on(struct sii8620 *ctx) · 92 unmodified lines
971940 ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
972941 if (ret)
973942 return ret;
943+
974944 usleep_range(10000, 20000);
975− return clk_prepare_enable(ctx->clk_xtal);
945+ ret = clk_prepare_enable(ctx->clk_xtal);
946+ if (ret)
947+ return ret;
948+
949+ msleep(100);
950+ gpiod_set_value(ctx->gpio_reset, 0);
951+ msleep(100);
952+
953+ return 0;
976954 }
977955
978956 static int sii8620_hw_off(struct sii8620 *ctx)
@@ -982,17 +960,6 @@ static int sii8620_hw_off(struct sii8620 *ctx) · 3 unmodified lines
982960 return regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
983961 }
984962
985−static void sii8620_hw_reset(struct sii8620 *ctx)
986−{
987− usleep_range(10000, 20000);
988− gpiod_set_value(ctx->gpio_reset, 0);
989− usleep_range(5000, 20000);
990− gpiod_set_value(ctx->gpio_reset, 1);
991− usleep_range(10000, 20000);
992− gpiod_set_value(ctx->gpio_reset, 0);
993− msleep(300);
994−}
995−
996963 static void sii8620_cbus_reset(struct sii8620 *ctx)
997964 {
998965 sii8620_write(ctx, REG_PWD_SRST, BIT_PWD_SRST_CBUS_RST
@@ -1055,23 +1022,23 @@ static void sii8620_set_format(struct sii8620 *ctx) · 56 unmodified lines
10551022 BIT_M3_P0CTRL_MHL3_P0_PIXEL_MODE_PACKED,
10561023 ctx->use_packed_pixel ? ~0 : 0);
10571024 } else {
1058− if (ctx->use_packed_pixel)
1025+ if (ctx->use_packed_pixel) {
10591026 sii8620_write_seq_static(ctx,
10601027 REG_VID_MODE, BIT_VID_MODE_M1080P,
10611028 REG_MHL_TOP_CTL, BIT_MHL_TOP_CTL_MHL_PP_SEL | 1,
10621029 REG_MHLTX_CTL6, 0x60
10631030 );
1064− else
1031+ } else {
10651032 sii8620_write_seq_static(ctx,
10661033 REG_VID_MODE, 0,
10671034 REG_MHL_TOP_CTL, 1,
10681035 REG_MHLTX_CTL6, 0xa0
10691036 );
1037+ }
10701038 }
10711039
10721040 if (ctx->use_packed_pixel)
1073− out_fmt = VAL_TPI_FORMAT(YCBCR422, FULL) |
1074− BIT_TPI_OUTPUT_CSCMODE709;
1041+ out_fmt = VAL_TPI_FORMAT(YCBCR422, FULL);
10751042 else
10761043 out_fmt = VAL_TPI_FORMAT(RGB, FULL);
10771044
@@ -1128,18 +1095,28 @@ static ssize_t mhl3_infoframe_pack(struct mhl3_infoframe *frame, · 50 unmodified lines
11281095 return frm_len;
11291096 }
11301097
1131−static void sii8620_set_infoframes(struct sii8620 *ctx)
1098+static void sii8620_set_infoframes(struct sii8620 *ctx,
1099+ struct drm_display_mode *mode)
11321100 {
11331101 struct mhl3_infoframe mhl_frm;
11341102 union hdmi_infoframe frm;
11351103 u8 buf[31];
11361104 int ret;
11371105
1106+ ret = drm_hdmi_avi_infoframe_from_display_mode(&frm.avi,
1107+ mode,
1108+ true);
1109+ if (ctx->use_packed_pixel)
1110+ frm.avi.colorspace = HDMI_COLORSPACE_YUV422;
1111+
1112+ if (!ret)
1113+ ret = hdmi_avi_infoframe_pack(&frm.avi, buf, ARRAY_SIZE(buf));
1114+ if (ret > 0)
1115+ sii8620_write_buf(ctx, REG_TPI_AVI_CHSUM, buf + 3, ret - 3);
1116+
11381117 if (!sii8620_is_mhl3(ctx) || !ctx->use_packed_pixel) {
11391118 sii8620_write(ctx, REG_TPI_SC,
11401119 BIT_TPI_SC_TPI_OUTPUT_MODE_0_HDMI);
1141− sii8620_write_buf(ctx, REG_TPI_AVI_CHSUM, ctx->avif + 3,
1142− ARRAY_SIZE(ctx->avif) - 3);
11431120 sii8620_write(ctx, REG_PKT_FILTER_0,
11441121 BIT_PKT_FILTER_0_DROP_CEA_GAMUT_PKT |
11451122 BIT_PKT_FILTER_0_DROP_MPEG_PKT |
@@ -1148,16 +1125,6 @@ static void sii8620_set_infoframes(struct sii8620 *ctx) · 2 unmodified lines
11481125 return;
11491126 }
11501127
1151− ret = hdmi_avi_infoframe_init(&frm.avi);
1152− frm.avi.colorspace = HDMI_COLORSPACE_YUV422;
1153− frm.avi.active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
1154− frm.avi.picture_aspect = HDMI_PICTURE_ASPECT_16_9;
1155− frm.avi.colorimetry = HDMI_COLORIMETRY_ITU_709;
1156− frm.avi.video_code = ctx->video_code;
1157− if (!ret)
1158− ret = hdmi_avi_infoframe_pack(&frm.avi, buf, ARRAY_SIZE(buf));
1159− if (ret > 0)
1160− sii8620_write_buf(ctx, REG_TPI_AVI_CHSUM, buf + 3, ret - 3);
11611128 sii8620_write(ctx, REG_PKT_FILTER_0,
11621129 BIT_PKT_FILTER_0_DROP_CEA_GAMUT_PKT |
11631130 BIT_PKT_FILTER_0_DROP_MPEG_PKT |
@@ -1177,6 +1144,9 @@ static void sii8620_set_infoframes(struct sii8620 *ctx) · 13 unmodified lines
11771144
11781145 static void sii8620_start_video(struct sii8620 *ctx)
11791146 {
1147+ struct drm_display_mode *mode =
1148+ &ctx->bridge.encoder->crtc->state->adjusted_mode;
1149+
11801150 if (!sii8620_is_mhl3(ctx))
11811151 sii8620_stop_video(ctx);
11821152
@@ -1195,8 +1165,14 @@ static void sii8620_start_video(struct sii8620 *ctx) · 12 unmodified lines
11951165 sii8620_set_format(ctx);
11961166
11971167 if (!sii8620_is_mhl3(ctx)) {
1198− sii8620_mt_write_stat(ctx, MHL_DST_REG(LINK_MODE),
1199− MHL_DST_LM_CLK_MODE_NORMAL | MHL_DST_LM_PATH_ENABLED);
1168+ u8 link_mode = MHL_DST_LM_PATH_ENABLED;
1169+
1170+ if (ctx->use_packed_pixel)
1171+ link_mode |= MHL_DST_LM_CLK_MODE_PACKED_PIXEL;
1172+ else
1173+ link_mode |= MHL_DST_LM_CLK_MODE_NORMAL;
1174+
1175+ sii8620_mt_write_stat(ctx, MHL_DST_REG(LINK_MODE), link_mode);
12001176 sii8620_set_auto_zone(ctx);
12011177 } else {
12021178 static const struct {
@@ -1213,10 +1189,10 @@ static void sii8620_start_video(struct sii8620 *ctx) · 10 unmodified lines
12131189 MHL_XDS_LINK_RATE_6_0_GBPS, 0x40 },
12141190 };
12151191 u8 p0_ctrl = BIT_M3_P0CTRL_MHL3_P0_PORT_EN;
1216− int clk = ctx->pixel_clock * (ctx->use_packed_pixel ? 2 : 3);
1192+ int clk = mode->clock * (ctx->use_packed_pixel ? 2 : 3);
12171193 int i;
12181194
1219− for (i = 0; i < ARRAY_SIZE(clk_spec); ++i)
1195+ for (i = 0; i < ARRAY_SIZE(clk_spec) - 1; ++i)
12201196 if (clk < clk_spec[i].max_clk)
12211197 break;
12221198
@@ -1242,7 +1218,7 @@ static void sii8620_start_video(struct sii8620 *ctx) · 19 unmodified lines
12421218 clk_spec[i].link_rate);
12431219 }
12441220
1245− sii8620_set_infoframes(ctx);
1221+ sii8620_set_infoframes(ctx, mode);
12461222 }
12471223
12481224 static void sii8620_disable_hpd(struct sii8620 *ctx)
@@ -1534,6 +1510,16 @@ static void sii8620_set_mode(struct sii8620 *ctx, enum sii8620_mode mode) · 285 unmodified lines
15341510 );
15351511 }
15361512
1513+static void sii8620_hpd_unplugged(struct sii8620 *ctx)
1514+{
1515+ sii8620_disable_hpd(ctx);
1516+ ctx->sink_type = SINK_NONE;
1517+ ctx->sink_detected = false;
1518+ ctx->feature_complete = false;
1519+ kfree(ctx->edid);
1520+ ctx->edid = NULL;
1521+}
1522+
15371523 static void sii8620_disconnect(struct sii8620 *ctx)
15381524 {
15391525 sii8620_disable_gen2_write_burst(ctx);
@@ -1561,7 +1547,7 @@ static void sii8620_disconnect(struct sii8620 *ctx) · 21 unmodified lines
15611547 REG_MHL_DP_CTL6, 0x2A,
15621548 REG_MHL_DP_CTL7, 0x03
15631549 );
1564− sii8620_disable_hpd(ctx);
1550+ sii8620_hpd_unplugged(ctx);
15651551 sii8620_write_seq_static(ctx,
15661552 REG_M3_CTRL, VAL_M3_CTRL_MHL3_VALUE,
15671553 REG_MHL_COC_CTL1, 0x07,
@@ -1609,10 +1595,8 @@ static void sii8620_disconnect(struct sii8620 *ctx) · 41 unmodified lines
16091595 memset(ctx->xstat, 0, sizeof(ctx->xstat));
16101596 memset(ctx->devcap, 0, sizeof(ctx->devcap));
16111597 memset(ctx->xdevcap, 0, sizeof(ctx->xdevcap));
1598+ ctx->devcap_read = false;
16121599 ctx->cbus_status = 0;
1613− ctx->sink_type = SINK_NONE;
1614− kfree(ctx->edid);
1615− ctx->edid = NULL;
16161600 sii8620_mt_cleanup(ctx);
16171601 }
16181602
@@ -1699,17 +1683,18 @@ static void sii8620_status_dcap_ready(struct sii8620 *ctx) · 80 unmodified lines
16991683
17001684 static void sii8620_status_changed_path(struct sii8620 *ctx)
17011685 {
1702− if (ctx->stat[MHL_DST_LINK_MODE] & MHL_DST_LM_PATH_ENABLED) {
1703− sii8620_mt_write_stat(ctx, MHL_DST_REG(LINK_MODE),
1704− MHL_DST_LM_CLK_MODE_NORMAL
1705− | MHL_DST_LM_PATH_ENABLED);
1706− if (!sii8620_is_mhl3(ctx))
1707− sii8620_mt_read_devcap(ctx, false);
1708− sii8620_mt_set_cont(ctx, sii8620_sink_detected);
1709− } else {
1710− sii8620_mt_write_stat(ctx, MHL_DST_REG(LINK_MODE),
1711− MHL_DST_LM_CLK_MODE_NORMAL);
1712− }
1686+ u8 link_mode;
1687+
1688+ if (ctx->use_packed_pixel)
1689+ link_mode = MHL_DST_LM_CLK_MODE_PACKED_PIXEL;
1690+ else
1691+ link_mode = MHL_DST_LM_CLK_MODE_NORMAL;
1692+
1693+ if (ctx->stat[MHL_DST_LINK_MODE] & MHL_DST_LM_PATH_ENABLED)
1694+ link_mode |= MHL_DST_LM_PATH_ENABLED;
1695+
1696+ sii8620_mt_write_stat(ctx, MHL_DST_REG(LINK_MODE),
1697+ link_mode);
17131698 }
17141699
17151700 static void sii8620_msc_mr_write_stat(struct sii8620 *ctx)
@@ -1722,9 +1707,14 @@ static void sii8620_msc_mr_write_stat(struct sii8620 *ctx) · 6 unmodified lines
17221707 sii8620_update_array(ctx->stat, st, MHL_DST_SIZE);
17231708 sii8620_update_array(ctx->xstat, xst, MHL_XDS_SIZE);
17241709
1725− if (ctx->stat[MHL_DST_CONNECTED_RDY] & MHL_DST_CONN_DCAP_RDY)
1710+ if (ctx->stat[MHL_DST_CONNECTED_RDY] & st[MHL_DST_CONNECTED_RDY] &
1711+ MHL_DST_CONN_DCAP_RDY) {
17261712 sii8620_status_dcap_ready(ctx);
17271713
1714+ if (!sii8620_is_mhl3(ctx))
1715+ sii8620_mt_read_devcap(ctx, false);
1716+ }
1717+
17281718 if (st[MHL_DST_LINK_MODE] & MHL_DST_LM_PATH_ENABLED)
17291719 sii8620_status_changed_path(ctx);
17301720 }
@@ -1808,8 +1798,11 @@ static void sii8620_msc_mr_set_int(struct sii8620 *ctx) · 77 unmodified lines
18081798 }
18091799 if (ints[MHL_INT_RCHANGE] & MHL_INT_RC_FEAT_REQ)
18101800 sii8620_send_features(ctx);
1811− if (ints[MHL_INT_RCHANGE] & MHL_INT_RC_FEAT_COMPLETE)
1812− sii8620_edid_read(ctx, 0);
1801+ if (ints[MHL_INT_RCHANGE] & MHL_INT_RC_FEAT_COMPLETE) {
1802+ ctx->feature_complete = true;
1803+ if (ctx->edid)
1804+ sii8620_enable_hpd(ctx);
1805+ }
18131806 }
18141807
18151808 static struct sii8620_mt_msg *sii8620_msc_msg_first(struct sii8620 *ctx)
@@ -1884,6 +1877,15 @@ static void sii8620_irq_msc(struct sii8620 *ctx) · 68 unmodified lines
18841877 if (stat & BIT_CBUS_MSC_MR_WRITE_STAT)
18851878 sii8620_msc_mr_write_stat(ctx);
18861879
1880+ if (stat & BIT_CBUS_HPD_CHG) {
1881+ if (ctx->cbus_status & BIT_CBUS_STATUS_CBUS_HPD) {
1882+ ctx->sink_detected = true;
1883+ sii8620_identify_sink(ctx);
1884+ } else {
1885+ sii8620_hpd_unplugged(ctx);
1886+ }
1887+ }
1888+
18871889 if (stat & BIT_CBUS_MSC_MR_SET_INT)
18881890 sii8620_msc_mr_set_int(ctx);
18891891
@@ -1931,14 +1933,6 @@ static void sii8620_irq_edid(struct sii8620 *ctx) · 41 unmodified lines
19311933 ctx->mt_state = MT_STATE_DONE;
19321934 }
19331935
1934−static void sii8620_scdt_high(struct sii8620 *ctx)
1935−{
1936− sii8620_write_seq_static(ctx,
1937− REG_INTR8_MASK, BIT_CEA_NEW_AVI | BIT_CEA_NEW_VSI,
1938− REG_TPI_SC, BIT_TPI_SC_TPI_OUTPUT_MODE_0_HDMI,
1939− );
1940−}
1941−
19421936 static void sii8620_irq_scdt(struct sii8620 *ctx)
19431937 {
19441938 u8 stat = sii8620_readb(ctx, REG_INTR5);
@@ -1946,53 +1940,13 @@ static void sii8620_irq_scdt(struct sii8620 *ctx) · 1 unmodified line
19461940 if (stat & BIT_INTR_SCDT_CHANGE) {
19471941 u8 cstat = sii8620_readb(ctx, REG_TMDS_CSTAT_P3);
19481942
1949− if (cstat & BIT_TMDS_CSTAT_P3_SCDT) {
1950− if (ctx->sink_type == SINK_HDMI)
1951− /* enable infoframe interrupt */
1952− sii8620_scdt_high(ctx);
1953− else
1954− sii8620_start_video(ctx);
1955− }
1943+ if (cstat & BIT_TMDS_CSTAT_P3_SCDT)
1944+ sii8620_start_video(ctx);
19561945 }
19571946
19581947 sii8620_write(ctx, REG_INTR5, stat);
19591948 }
19601949
1961−static void sii8620_new_vsi(struct sii8620 *ctx)
1962−{
1963− u8 vsif[11];
1964−
1965− sii8620_write(ctx, REG_RX_HDMI_CTRL2,
1966− VAL_RX_HDMI_CTRL2_DEFVAL |
1967− BIT_RX_HDMI_CTRL2_VSI_MON_SEL_VSI);
1968− sii8620_read_buf(ctx, REG_RX_HDMI_MON_PKT_HEADER1, vsif,
1969− ARRAY_SIZE(vsif));
1970−}
1971−
1972−static void sii8620_new_avi(struct sii8620 *ctx)
1973−{
1974− sii8620_write(ctx, REG_RX_HDMI_CTRL2, VAL_RX_HDMI_CTRL2_DEFVAL);
1975− sii8620_read_buf(ctx, REG_RX_HDMI_MON_PKT_HEADER1, ctx->avif,
1976− ARRAY_SIZE(ctx->avif));
1977−}
1978−
1979−static void sii8620_irq_infr(struct sii8620 *ctx)
1980−{
1981− u8 stat = sii8620_readb(ctx, REG_INTR8)
1982− & (BIT_CEA_NEW_VSI | BIT_CEA_NEW_AVI);
1983−
1984− sii8620_write(ctx, REG_INTR8, stat);
1985−
1986− if (stat & BIT_CEA_NEW_VSI)
1987− sii8620_new_vsi(ctx);
1988−
1989− if (stat & BIT_CEA_NEW_AVI)
1990− sii8620_new_avi(ctx);
1991−
1992− if (stat & (BIT_CEA_NEW_VSI | BIT_CEA_NEW_AVI))
1993− sii8620_start_video(ctx);
1994−}
1995−
19961950 static void sii8620_got_xdevcap(struct sii8620 *ctx, int ret)
19971951 {
19981952 if (ret < 0)
@@ -2043,11 +1997,11 @@ static void sii8620_irq_ddc(struct sii8620 *ctx) · 44 unmodified lines
20431997
20441998 if (stat & BIT_DDC_CMD_DONE) {
20451999 sii8620_write(ctx, REG_INTR3_MASK, 0);
2046− if (sii8620_is_mhl3(ctx))
2000+ if (sii8620_is_mhl3(ctx) && !ctx->feature_complete)
20472001 sii8620_mt_set_int(ctx, MHL_INT_REG(RCHANGE),
20482002 MHL_INT_RC_FEAT_REQ);
20492003 else
2050− sii8620_edid_read(ctx, 0);
2004+ sii8620_enable_hpd(ctx);
20512005 }
20522006 sii8620_write(ctx, REG_INTR3, stat);
20532007 }
@@ -2074,7 +2028,6 @@ static irqreturn_t sii8620_irq_thread(int irq, void *data) · 20 unmodified lines
20742028 { BIT_FAST_INTR_STAT_EDID, sii8620_irq_edid },
20752029 { BIT_FAST_INTR_STAT_DDC, sii8620_irq_ddc },
20762030 { BIT_FAST_INTR_STAT_SCDT, sii8620_irq_scdt },
2077− { BIT_FAST_INTR_STAT_INFR, sii8620_irq_infr },
20782031 };
20792032 struct sii8620 *ctx = data;
20802033 u8 stats[LEN_FAST_INTR_STAT];
@@ -2112,7 +2065,6 @@ static void sii8620_cable_in(struct sii8620 *ctx) · 31 unmodified lines
21122065 dev_err(dev, "Error powering on, %d.\n", ret);
21132066 return;
21142067 }
2115− sii8620_hw_reset(ctx);
21162068
21172069 sii8620_read_buf(ctx, REG_VND_IDL, ver, ARRAY_SIZE(ver));
21182070 ret = sii8620_clear_error(ctx);
@@ -2268,17 +2220,43 @@ static void sii8620_detach(struct drm_bridge *bridge) · 149 unmodified lines
22682220 rc_unregister_device(ctx->rc_dev);
22692221 }
22702222
2223+static int sii8620_is_packing_required(struct sii8620 *ctx,
2224+ const struct drm_display_mode *mode)
2225+{
2226+ int max_pclk, max_pclk_pp_mode;
2227+
2228+ if (sii8620_is_mhl3(ctx)) {
2229+ max_pclk = MHL3_MAX_PCLK;
2230+ max_pclk_pp_mode = MHL3_MAX_PCLK_PP_MODE;
2231+ } else {
2232+ max_pclk = MHL1_MAX_PCLK;
2233+ max_pclk_pp_mode = MHL1_MAX_PCLK_PP_MODE;
2234+ }
2235+
2236+ if (mode->clock < max_pclk)
2237+ return 0;
2238+ else if (mode->clock < max_pclk_pp_mode)
2239+ return 1;
2240+ else
2241+ return -1;
2242+}
2243+
22712244 static enum drm_mode_status sii8620_mode_valid(struct drm_bridge *bridge,
22722245 const struct drm_display_mode *mode)
22732246 {
22742247 struct sii8620 *ctx = bridge_to_sii8620(bridge);
2248+ int pack_required = sii8620_is_packing_required(ctx, mode);
22752249 bool can_pack = ctx->devcap[MHL_DCAP_VID_LINK_MODE] &
22762250 MHL_DCAP_VID_LINK_PPIXEL;
2277− unsigned int max_pclk = sii8620_is_mhl3(ctx) ? MHL3_MAX_LCLK :
2278− MHL1_MAX_LCLK;
2279− max_pclk /= can_pack ? 2 : 3;
22802251
2281− return (mode->clock > max_pclk) ? MODE_CLOCK_HIGH : MODE_OK;
2252+ switch (pack_required) {
2253+ case 0:
2254+ return MODE_OK;
2255+ case 1:
2256+ return (can_pack) ? MODE_OK : MODE_CLOCK_HIGH;
2257+ default:
2258+ return MODE_CLOCK_HIGH;
2259+ }
22822260 }
22832261
22842262 static bool sii8620_mode_fixup(struct drm_bridge *bridge,
@@ -2286,43 +2264,14 @@ static bool sii8620_mode_fixup(struct drm_bridge *bridge, · 1 unmodified line
22862264 struct drm_display_mode *adjusted_mode)
22872265 {
22882266 struct sii8620 *ctx = bridge_to_sii8620(bridge);
2289− int max_lclk;
2290− bool ret = true;
22912267
22922268 mutex_lock(&ctx->lock);
22932269
2294− max_lclk = sii8620_is_mhl3(ctx) ? MHL3_MAX_LCLK : MHL1_MAX_LCLK;
2295− if (max_lclk > 3 * adjusted_mode->clock) {
2296− ctx->use_packed_pixel = 0;
2297− goto end;
2298− }
2299− if ((ctx->devcap[MHL_DCAP_VID_LINK_MODE] & MHL_DCAP_VID_LINK_PPIXEL) &&
2300− max_lclk > 2 * adjusted_mode->clock) {
2301− ctx->use_packed_pixel = 1;
2302− goto end;
2303− }
2304− ret = false;
2305−end:
2306− if (ret) {
2307− u8 vic = drm_match_cea_mode(adjusted_mode);
2308−
2309− if (!vic) {
2310− union hdmi_infoframe frm;
2311− u8 mhl_vic[] = { 0, 95, 94, 93, 98 };
2312−
2313− /* FIXME: We need the connector here */
2314− drm_hdmi_vendor_infoframe_from_display_mode(
2315− &frm.vendor.hdmi, NULL, adjusted_mode);
2316− vic = frm.vendor.hdmi.vic;
2317− if (vic >= ARRAY_SIZE(mhl_vic))
2318− vic = 0;
2319− vic = mhl_vic[vic];
2320− }
2321− ctx->video_code = vic;
2322− ctx->pixel_clock = adjusted_mode->clock;
2323− }
2270+ ctx->use_packed_pixel = sii8620_is_packing_required(ctx, adjusted_mode);
2271+
23242272 mutex_unlock(&ctx->lock);
2325− return ret;
2273+
2274+ return true;
23262275 }
23272276
23282277 static const struct drm_bridge_funcs sii8620_bridge_funcs = {
drivers/gpu/drm/drm_atomic_helper.c+5−3
@@ -1510,8 +1510,9 @@ int drm_atomic_helper_async_check(struct drm_device *dev, · 1509 unmodified lines
15101510 {
15111511 struct drm_crtc *crtc;
15121512 struct drm_crtc_state *crtc_state;
1513− struct drm_plane *plane;
1514− struct drm_plane_state *old_plane_state, *new_plane_state;
1513+ struct drm_plane *plane = NULL;
1514+ struct drm_plane_state *old_plane_state = NULL;
1515+ struct drm_plane_state *new_plane_state = NULL;
15151516 const struct drm_plane_helper_funcs *funcs;
15161517 int i, n_planes = 0;
15171518
@@ -1527,7 +1528,8 @@ int drm_atomic_helper_async_check(struct drm_device *dev, · 9 unmodified lines
15271528 if (n_planes != 1)
15281529 return -EINVAL;
15291530
1530− if (!new_plane_state->crtc)
1531+ if (!new_plane_state->crtc ||
1532+ old_plane_state->crtc != new_plane_state->crtc)
15311533 return -EINVAL;
15321534
15331535 funcs = plane->helper_private;
drivers/gpu/drm/drm_context.c+1−1
@@ -372,7 +372,7 @@ int drm_legacy_addctx(struct drm_device *dev, void *data, · 371 unmodified lines
372372 ctx->handle = drm_legacy_ctxbitmap_next(dev);
373373 }
374374 DRM_DEBUG("%d\n", ctx->handle);
375− if (ctx->handle == -1) {
375+ if (ctx->handle < 0) {
376376 DRM_DEBUG("Not enough free contexts.\n");
377377 /* Should this return -EBUSY instead? */
378378 return -ENOMEM;
drivers/gpu/drm/drm_drv.c+7−7
@@ -369,13 +369,6 @@ EXPORT_SYMBOL(drm_dev_exit); · 368 unmodified lines
369369 */
370370 void drm_dev_unplug(struct drm_device *dev)
371371 {
372− drm_dev_unregister(dev);
373−
374− mutex_lock(&drm_global_mutex);
375− if (dev->open_count == 0)
376− drm_dev_put(dev);
377− mutex_unlock(&drm_global_mutex);
378−
379372 /*
380373 * After synchronizing any critical read section is guaranteed to see
381374 * the new value of ->unplugged, and any critical section which might
@@ -384,6 +377,13 @@ void drm_dev_unplug(struct drm_device *dev) · 2 unmodified lines
384377 */
385378 dev->unplugged = true;
386379 synchronize_srcu(&drm_unplug_srcu);
380+
381+ drm_dev_unregister(dev);
382+
383+ mutex_lock(&drm_global_mutex);
384+ if (dev->open_count == 0)
385+ drm_dev_put(dev);
386+ mutex_unlock(&drm_global_mutex);
387387 }
388388 EXPORT_SYMBOL(drm_dev_unplug);
389389
drivers/gpu/drm/drm_lease.c+1−15
@@ -553,24 +553,13 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev, · 552 unmodified lines
553553
554554 /* Clone the lessor file to create a new file for us */
555555 DRM_DEBUG_LEASE("Allocating lease file\n");
556− path_get(&lessor_file->f_path);
557− lessee_file = alloc_file(&lessor_file->f_path,
558− lessor_file->f_mode,
559− fops_get(lessor_file->f_inode->i_fop));
560−
556+ lessee_file = filp_clone_open(lessor_file);
561557 if (IS_ERR(lessee_file)) {
562558 ret = PTR_ERR(lessee_file);
563559 goto out_lessee;
564560 }
565561
566− /* Initialize the new file for DRM */
567− DRM_DEBUG_LEASE("Initializing the file with %p\n", lessee_file->f_op->open);
568− ret = lessee_file->f_op->open(lessee_file->f_inode, lessee_file);
569− if (ret)
570− goto out_lessee_file;
571−
572562 lessee_priv = lessee_file->private_data;
573−
574563 /* Change the file to a master one */
575564 drm_master_put(&lessee_priv->master);
576565 lessee_priv->master = lessee;
@@ -588,9 +577,6 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev, · 11 unmodified lines
588577 DRM_DEBUG_LEASE("drm_mode_create_lease_ioctl succeeded\n");
589578 return 0;
590579
591−out_lessee_file:
592− fput(lessee_file);
593−
594580 out_lessee:
595581 drm_master_put(&lessee);
596582
drivers/gpu/drm/drm_property.c+3−3
@@ -532,7 +532,7 @@ static void drm_property_free_blob(struct kref *kref) · 531 unmodified lines
532532
533533 drm_mode_object_unregister(blob->dev, &blob->base);
534534
535− kfree(blob);
535+ kvfree(blob);
536536 }
537537
538538 /**
@@ -559,7 +559,7 @@ drm_property_create_blob(struct drm_device *dev, size_t length, · 20 unmodified lines
559559 if (!length || length > ULONG_MAX - sizeof(struct drm_property_blob))
560560 return ERR_PTR(-EINVAL);
561561
562− blob = kzalloc(sizeof(struct drm_property_blob)+length, GFP_KERNEL);
562+ blob = kvzalloc(sizeof(struct drm_property_blob)+length, GFP_KERNEL);
563563 if (!blob)
564564 return ERR_PTR(-ENOMEM);
565565
@@ -576,7 +576,7 @@ drm_property_create_blob(struct drm_device *dev, size_t length, · 10 unmodified lines
576576 ret = __drm_mode_object_add(dev, &blob->base, DRM_MODE_OBJECT_BLOB,
577577 true, drm_property_free_blob);
578578 if (ret) {
579− kfree(blob);
579+ kvfree(blob);
580580 return ERR_PTR(-EINVAL);
581581 }
582582
drivers/gpu/drm/etnaviv/etnaviv_drv.c+20−4
@@ -631,8 +631,11 @@ static struct platform_driver etnaviv_platform_driver = { · 630 unmodified lines
631631 },
632632 };
633633
634+static struct platform_device *etnaviv_drm;
635+
634636 static int __init etnaviv_init(void)
635637 {
638+ struct platform_device *pdev;
636639 int ret;
637640 struct device_node *np;
638641
@@ -644,7 +647,7 @@ static int __init etnaviv_init(void) · 5 unmodified lines
644647
645648 ret = platform_driver_register(&etnaviv_platform_driver);
646649 if (ret != 0)
647− platform_driver_unregister(&etnaviv_gpu_driver);
650+ goto unregister_gpu_driver;
648651
649652 /*
650653 * If the DT contains at least one available GPU device, instantiate
@@ -653,20 +656,33 @@ static int __init etnaviv_init(void) · 2 unmodified lines
653656 for_each_compatible_node(np, NULL, "vivante,gc") {
654657 if (!of_device_is_available(np))
655658 continue;
656−
657− platform_device_register_simple("etnaviv", -1, NULL, 0);
659+ pdev = platform_device_register_simple("etnaviv", -1,
660+ NULL, 0);
661+ if (IS_ERR(pdev)) {
662+ ret = PTR_ERR(pdev);
663+ of_node_put(np);
664+ goto unregister_platform_driver;
665+ }
666+ etnaviv_drm = pdev;
658667 of_node_put(np);
659668 break;
660669 }
661670
671+ return 0;
672+
673+unregister_platform_driver:
674+ platform_driver_unregister(&etnaviv_platform_driver);
675+unregister_gpu_driver:
676+ platform_driver_unregister(&etnaviv_gpu_driver);
662677 return ret;
663678 }
664679 module_init(etnaviv_init);
665680
666681 static void __exit etnaviv_exit(void)
667682 {
668− platform_driver_unregister(&etnaviv_gpu_driver);
683+ platform_device_unregister(etnaviv_drm);
669684 platform_driver_unregister(&etnaviv_platform_driver);
685+ platform_driver_unregister(&etnaviv_gpu_driver);
670686 }
671687 module_exit(etnaviv_exit);
672688
drivers/gpu/drm/etnaviv/etnaviv_gpu.h+3−0
@@ -131,6 +131,9 @@ struct etnaviv_gpu { · 130 unmodified lines
131131 struct work_struct sync_point_work;
132132 int sync_point_event;
133133
134+ /* hang detection */
135+ u32 hangcheck_dma_addr;
136+
134137 void __iomem *mmio;
135138 int irq;
136139
drivers/gpu/drm/etnaviv/etnaviv_sched.c+24−0
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 #include "etnaviv_gem.h"
1111 #include "etnaviv_gpu.h"
1212 #include "etnaviv_sched.h"
13+#include "state.xml.h"
1314
1415 static int etnaviv_job_hang_limit = 0;
1516 module_param_named(job_hang_limit, etnaviv_job_hang_limit, int , 0444);
@@ -85,6 +86,29 @@ static void etnaviv_sched_timedout_job(struct drm_sched_job *sched_job) · 69 unmodified lines
8586 {
8687 struct etnaviv_gem_submit *submit = to_etnaviv_submit(sched_job);
8788 struct etnaviv_gpu *gpu = submit->gpu;
89+ u32 dma_addr;
90+ int change;
91+
92+ /*
93+ * If the GPU managed to complete this jobs fence, the timout is
94+ * spurious. Bail out.
95+ */
96+ if (fence_completed(gpu, submit->out_fence->seqno))
97+ return;
98+
99+ /*
100+ * If the GPU is still making forward progress on the front-end (which
101+ * should never loop) we shift out the timeout to give it a chance to
102+ * finish the job.
103+ */
104+ dma_addr = gpu_read(gpu, VIVS_FE_DMA_ADDRESS);
105+ change = dma_addr - gpu->hangcheck_dma_addr;
106+ if (change < 0 || change > 16) {
107+ gpu->hangcheck_dma_addr = dma_addr;
108+ schedule_delayed_work(&sched_job->work_tdr,
109+ sched_job->sched->timeout);
110+ return;
111+ }
88112
89113 /* block scheduler */
90114 kthread_park(gpu->sched.thread);
drivers/gpu/drm/exynos/exynos5433_drm_decon.c+3−3
@@ -265,7 +265,7 @@ static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win, · 264 unmodified lines
265265 unsigned long val;
266266
267267 val = readl(ctx->addr + DECON_WINCONx(win));
268− val &= ~WINCONx_BPPMODE_MASK;
268+ val &= WINCONx_ENWIN_F;
269269
270270 switch (fb->format->format) {
271271 case DRM_FORMAT_XRGB1555:
@@ -356,8 +356,8 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc, · 84 unmodified lines
356356 writel(val, ctx->addr + DECON_VIDOSDxB(win));
357357 }
358358
359− val = VIDOSD_Wx_ALPHA_R_F(0x0) | VIDOSD_Wx_ALPHA_G_F(0x0) |
360− VIDOSD_Wx_ALPHA_B_F(0x0);
359+ val = VIDOSD_Wx_ALPHA_R_F(0xff) | VIDOSD_Wx_ALPHA_G_F(0xff) |
360+ VIDOSD_Wx_ALPHA_B_F(0xff);
361361 writel(val, ctx->addr + DECON_VIDOSDxC(win));
362362
363363 val = VIDOSD_Wx_ALPHA_R_F(0x0) | VIDOSD_Wx_ALPHA_G_F(0x0) |
drivers/gpu/drm/exynos/exynos_drm_drv.c+2−2
@@ -420,7 +420,7 @@ err_mode_config_cleanup: · 419 unmodified lines
420420 err_free_private:
421421 kfree(private);
422422 err_free_drm:
423− drm_dev_unref(drm);
423+ drm_dev_put(drm);
424424
425425 return ret;
426426 }
@@ -444,7 +444,7 @@ static void exynos_drm_unbind(struct device *dev) · 17 unmodified lines
444444 drm->dev_private = NULL;
445445 dev_set_drvdata(dev, NULL);
446446
447− drm_dev_unref(drm);
447+ drm_dev_put(drm);
448448 }
449449
450450 static const struct component_master_ops exynos_drm_ops = {
drivers/gpu/drm/exynos/exynos_drm_fb.c+1−1
@@ -138,7 +138,7 @@ exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv, · 137 unmodified lines
138138
139139 err:
140140 while (i--)
141− drm_gem_object_unreference_unlocked(&exynos_gem[i]->base);
141+ drm_gem_object_put_unlocked(&exynos_gem[i]->base);
142142
143143 return ERR_PTR(ret);
144144 }
drivers/gpu/drm/exynos/exynos_drm_fimc.c+10−7
@@ -470,17 +470,18 @@ static void fimc_src_set_transf(struct fimc_context *ctx, unsigned int rotation) · 469 unmodified lines
470470 static void fimc_set_window(struct fimc_context *ctx,
471471 struct exynos_drm_ipp_buffer *buf)
472472 {
473+ unsigned int real_width = buf->buf.pitch[0] / buf->format->cpp[0];
473474 u32 cfg, h1, h2, v1, v2;
474475
475476 /* cropped image */
476477 h1 = buf->rect.x;
477− h2 = buf->buf.width - buf->rect.w - buf->rect.x;
478+ h2 = real_width - buf->rect.w - buf->rect.x;
478479 v1 = buf->rect.y;
479480 v2 = buf->buf.height - buf->rect.h - buf->rect.y;
480481
481482 DRM_DEBUG_KMS("x[%d]y[%d]w[%d]h[%d]hsize[%d]vsize[%d]\n",
482483 buf->rect.x, buf->rect.y, buf->rect.w, buf->rect.h,
483− buf->buf.width, buf->buf.height);
484+ real_width, buf->buf.height);
484485 DRM_DEBUG_KMS("h1[%d]h2[%d]v1[%d]v2[%d]\n", h1, h2, v1, v2);
485486
486487 /*
@@ -503,12 +504,13 @@ static void fimc_set_window(struct fimc_context *ctx, · 16 unmodified lines
503504 static void fimc_src_set_size(struct fimc_context *ctx,
504505 struct exynos_drm_ipp_buffer *buf)
505506 {
507+ unsigned int real_width = buf->buf.pitch[0] / buf->format->cpp[0];
506508 u32 cfg;
507509
508− DRM_DEBUG_KMS("hsize[%d]vsize[%d]\n", buf->buf.width, buf->buf.height);
510+ DRM_DEBUG_KMS("hsize[%d]vsize[%d]\n", real_width, buf->buf.height);
509511
510512 /* original size */
511− cfg = (EXYNOS_ORGISIZE_HORIZONTAL(buf->buf.width) |
513+ cfg = (EXYNOS_ORGISIZE_HORIZONTAL(real_width) |
512514 EXYNOS_ORGISIZE_VERTICAL(buf->buf.height));
513515
514516 fimc_write(ctx, cfg, EXYNOS_ORGISIZE);
@@ -529,7 +531,7 @@ static void fimc_src_set_size(struct fimc_context *ctx, · 14 unmodified lines
529531 * for now, we support only ITU601 8 bit mode
530532 */
531533 cfg = (EXYNOS_CISRCFMT_ITU601_8BIT |
532− EXYNOS_CISRCFMT_SOURCEHSIZE(buf->buf.width) |
534+ EXYNOS_CISRCFMT_SOURCEHSIZE(real_width) |
533535 EXYNOS_CISRCFMT_SOURCEVSIZE(buf->buf.height));
534536 fimc_write(ctx, cfg, EXYNOS_CISRCFMT);
535537
@@ -842,12 +844,13 @@ static void fimc_set_scaler(struct fimc_context *ctx, struct fimc_scaler *sc) · 306 unmodified lines
842844 static void fimc_dst_set_size(struct fimc_context *ctx,
843845 struct exynos_drm_ipp_buffer *buf)
844846 {
847+ unsigned int real_width = buf->buf.pitch[0] / buf->format->cpp[0];
845848 u32 cfg, cfg_ext;
846849
847− DRM_DEBUG_KMS("hsize[%d]vsize[%d]\n", buf->buf.width, buf->buf.height);
850+ DRM_DEBUG_KMS("hsize[%d]vsize[%d]\n", real_width, buf->buf.height);
848851
849852 /* original size */
850− cfg = (EXYNOS_ORGOSIZE_HORIZONTAL(buf->buf.width) |
853+ cfg = (EXYNOS_ORGOSIZE_HORIZONTAL(real_width) |
851854 EXYNOS_ORGOSIZE_VERTICAL(buf->buf.height));
852855
853856 fimc_write(ctx, cfg, EXYNOS_ORGOSIZE);
drivers/gpu/drm/exynos/exynos_drm_gem.c+5−5
@@ -143,7 +143,7 @@ static int exynos_drm_gem_handle_create(struct drm_gem_object *obj, · 142 unmodified lines
143143 DRM_DEBUG_KMS("gem handle = 0x%x\n", *handle);
144144
145145 /* drop reference from allocate - handle holds it now. */
146− drm_gem_object_unreference_unlocked(obj);
146+ drm_gem_object_put_unlocked(obj);
147147
148148 return 0;
149149 }
@@ -186,7 +186,7 @@ unsigned long exynos_drm_gem_get_size(struct drm_device *dev, · 36 unmodified lines
186186
187187 exynos_gem = to_exynos_gem(obj);
188188
189− drm_gem_object_unreference_unlocked(obj);
189+ drm_gem_object_put_unlocked(obj);
190190
191191 return exynos_gem->size;
192192 }
@@ -329,13 +329,13 @@ void exynos_drm_gem_put_dma_addr(struct drm_device *dev, · 136 unmodified lines
329329 return;
330330 }
331331
332− drm_gem_object_unreference_unlocked(obj);
332+ drm_gem_object_put_unlocked(obj);
333333
334334 /*
335335 * decrease obj->refcount one more time because we has already
336336 * increased it at exynos_drm_gem_get_dma_addr().
337337 */
338− drm_gem_object_unreference_unlocked(obj);
338+ drm_gem_object_put_unlocked(obj);
339339 }
340340
341341 static int exynos_drm_gem_mmap_buffer(struct exynos_drm_gem *exynos_gem,
@@ -383,7 +383,7 @@ int exynos_drm_gem_get_ioctl(struct drm_device *dev, void *data, · 41 unmodified lines
383383 args->flags = exynos_gem->flags;
384384 args->size = exynos_gem->size;
385385
386− drm_gem_object_unreference_unlocked(obj);
386+ drm_gem_object_put_unlocked(obj);
387387
388388 return 0;
389389 }
drivers/gpu/drm/exynos/exynos_drm_gsc.c+31−20
@@ -492,21 +492,25 @@ static void gsc_src_set_fmt(struct gsc_context *ctx, u32 fmt) · 491 unmodified lines
492492 GSC_IN_CHROMA_ORDER_CRCB);
493493 break;
494494 case DRM_FORMAT_NV21:
495+ cfg |= (GSC_IN_CHROMA_ORDER_CRCB | GSC_IN_YUV420_2P);
496+ break;
495497 case DRM_FORMAT_NV61:
496− cfg |= (GSC_IN_CHROMA_ORDER_CRCB |
497− GSC_IN_YUV420_2P);
498+ cfg |= (GSC_IN_CHROMA_ORDER_CRCB | GSC_IN_YUV422_2P);
498499 break;
499500 case DRM_FORMAT_YUV422:
500501 cfg |= GSC_IN_YUV422_3P;
501502 break;
502503 case DRM_FORMAT_YUV420:
504+ cfg |= (GSC_IN_CHROMA_ORDER_CBCR | GSC_IN_YUV420_3P);
505+ break;
503506 case DRM_FORMAT_YVU420:
504− cfg |= GSC_IN_YUV420_3P;
507+ cfg |= (GSC_IN_CHROMA_ORDER_CRCB | GSC_IN_YUV420_3P);
505508 break;
506509 case DRM_FORMAT_NV12:
510+ cfg |= (GSC_IN_CHROMA_ORDER_CBCR | GSC_IN_YUV420_2P);
511+ break;
507512 case DRM_FORMAT_NV16:
508− cfg |= (GSC_IN_CHROMA_ORDER_CBCR |
509− GSC_IN_YUV420_2P);
513+ cfg |= (GSC_IN_CHROMA_ORDER_CBCR | GSC_IN_YUV422_2P);
510514 break;
511515 }
512516
@@ -523,30 +527,30 @@ static void gsc_src_set_transf(struct gsc_context *ctx, unsigned int rotation) · 10 unmodified lines
523527
524528 switch (degree) {
525529 case DRM_MODE_ROTATE_0:
526− if (rotation & DRM_MODE_REFLECT_Y)
527− cfg |= GSC_IN_ROT_XFLIP;
528530 if (rotation & DRM_MODE_REFLECT_X)
531+ cfg |= GSC_IN_ROT_XFLIP;
532+ if (rotation & DRM_MODE_REFLECT_Y)
529533 cfg |= GSC_IN_ROT_YFLIP;
530534 break;
531535 case DRM_MODE_ROTATE_90:
532536 cfg |= GSC_IN_ROT_90;
533− if (rotation & DRM_MODE_REFLECT_Y)
534− cfg |= GSC_IN_ROT_XFLIP;
535537 if (rotation & DRM_MODE_REFLECT_X)
538+ cfg |= GSC_IN_ROT_XFLIP;
539+ if (rotation & DRM_MODE_REFLECT_Y)
536540 cfg |= GSC_IN_ROT_YFLIP;
537541 break;
538542 case DRM_MODE_ROTATE_180:
539543 cfg |= GSC_IN_ROT_180;
540− if (rotation & DRM_MODE_REFLECT_Y)
541− cfg &= ~GSC_IN_ROT_XFLIP;
542544 if (rotation & DRM_MODE_REFLECT_X)
545+ cfg &= ~GSC_IN_ROT_XFLIP;
546+ if (rotation & DRM_MODE_REFLECT_Y)
543547 cfg &= ~GSC_IN_ROT_YFLIP;
544548 break;
545549 case DRM_MODE_ROTATE_270:
546550 cfg |= GSC_IN_ROT_270;
547− if (rotation & DRM_MODE_REFLECT_Y)
548− cfg &= ~GSC_IN_ROT_XFLIP;
549551 if (rotation & DRM_MODE_REFLECT_X)
552+ cfg &= ~GSC_IN_ROT_XFLIP;
553+ if (rotation & DRM_MODE_REFLECT_Y)
550554 cfg &= ~GSC_IN_ROT_YFLIP;
551555 break;
552556 }
@@ -577,7 +581,7 @@ static void gsc_src_set_size(struct gsc_context *ctx, · 24 unmodified lines
577581 cfg &= ~(GSC_SRCIMG_HEIGHT_MASK |
578582 GSC_SRCIMG_WIDTH_MASK);
579583
580− cfg |= (GSC_SRCIMG_WIDTH(buf->buf.width) |
584+ cfg |= (GSC_SRCIMG_WIDTH(buf->buf.pitch[0] / buf->format->cpp[0]) |
581585 GSC_SRCIMG_HEIGHT(buf->buf.height));
582586
583587 gsc_write(cfg, GSC_SRCIMG_SIZE);
@@ -672,18 +676,25 @@ static void gsc_dst_set_fmt(struct gsc_context *ctx, u32 fmt) · 88 unmodified lines
672676 GSC_OUT_CHROMA_ORDER_CRCB);
673677 break;
674678 case DRM_FORMAT_NV21:
675− case DRM_FORMAT_NV61:
676679 cfg |= (GSC_OUT_CHROMA_ORDER_CRCB | GSC_OUT_YUV420_2P);
677680 break;
681+ case DRM_FORMAT_NV61:
682+ cfg |= (GSC_OUT_CHROMA_ORDER_CRCB | GSC_OUT_YUV422_2P);
683+ break;
678684 case DRM_FORMAT_YUV422:
685+ cfg |= GSC_OUT_YUV422_3P;
686+ break;
679687 case DRM_FORMAT_YUV420:
688+ cfg |= (GSC_OUT_CHROMA_ORDER_CBCR | GSC_OUT_YUV420_3P);
689+ break;
680690 case DRM_FORMAT_YVU420:
681− cfg |= GSC_OUT_YUV420_3P;
691+ cfg |= (GSC_OUT_CHROMA_ORDER_CRCB | GSC_OUT_YUV420_3P);
682692 break;
683693 case DRM_FORMAT_NV12:
694+ cfg |= (GSC_OUT_CHROMA_ORDER_CBCR | GSC_OUT_YUV420_2P);
695+ break;
684696 case DRM_FORMAT_NV16:
685− cfg |= (GSC_OUT_CHROMA_ORDER_CBCR |
686− GSC_OUT_YUV420_2P);
697+ cfg |= (GSC_OUT_CHROMA_ORDER_CBCR | GSC_OUT_YUV422_2P);
687698 break;
688699 }
689700
@@ -868,7 +879,7 @@ static void gsc_dst_set_size(struct gsc_context *ctx, · 178 unmodified lines
868879 /* original size */
869880 cfg = gsc_read(GSC_DSTIMG_SIZE);
870881 cfg &= ~(GSC_DSTIMG_HEIGHT_MASK | GSC_DSTIMG_WIDTH_MASK);
871− cfg |= GSC_DSTIMG_WIDTH(buf->buf.width) |
882+ cfg |= GSC_DSTIMG_WIDTH(buf->buf.pitch[0] / buf->format->cpp[0]) |
872883 GSC_DSTIMG_HEIGHT(buf->buf.height);
873884 gsc_write(cfg, GSC_DSTIMG_SIZE);
874885
@@ -1341,7 +1352,7 @@ static const struct drm_exynos_ipp_limit gsc_5420_limits[] = { · 466 unmodified lines
13411352 };
13421353
13431354 static const struct drm_exynos_ipp_limit gsc_5433_limits[] = {
1344− { IPP_SIZE_LIMIT(BUFFER, .h = { 32, 8191, 2 }, .v = { 16, 8191, 2 }) },
1355+ { IPP_SIZE_LIMIT(BUFFER, .h = { 32, 8191, 16 }, .v = { 16, 8191, 2 }) },
13451356 { IPP_SIZE_LIMIT(AREA, .h = { 16, 4800, 1 }, .v = { 8, 3344, 1 }) },
13461357 { IPP_SIZE_LIMIT(ROTATED, .h = { 32, 2047 }, .v = { 8, 8191 }) },
13471358 { IPP_SCALE_LIMIT(.h = { (1 << 16) / 16, (1 << 16) * 8 },
drivers/gpu/drm/exynos/exynos_drm_ipp.c+58−52
@@ -345,27 +345,6 @@ static int exynos_drm_ipp_task_setup_buffer(struct exynos_drm_ipp_buffer *buf, · 344 unmodified lines
345345 int ret = 0;
346346 int i;
347347
348− /* basic checks */
349− if (buf->buf.width == 0 || buf->buf.height == 0)
350− return -EINVAL;
351− buf->format = drm_format_info(buf->buf.fourcc);
352− for (i = 0; i < buf->format->num_planes; i++) {
353− unsigned int width = (i == 0) ? buf->buf.width :
354− DIV_ROUND_UP(buf->buf.width, buf->format->hsub);
355−
356− if (buf->buf.pitch[i] == 0)
357− buf->buf.pitch[i] = width * buf->format->cpp[i];
358− if (buf->buf.pitch[i] < width * buf->format->cpp[i])
359− return -EINVAL;
360− if (!buf->buf.gem_id[i])
361− return -ENOENT;
362− }
363−
364− /* pitch for additional planes must match */
365− if (buf->format->num_planes > 2 &&
366− buf->buf.pitch[1] != buf->buf.pitch[2])
367− return -EINVAL;
368−
369348 /* get GEM buffers and check their size */
370349 for (i = 0; i < buf->format->num_planes; i++) {
371350 unsigned int height = (i == 0) ? buf->buf.height :
@@ -428,7 +407,7 @@ enum drm_ipp_size_id { · 56 unmodified lines
428407 IPP_LIMIT_BUFFER, IPP_LIMIT_AREA, IPP_LIMIT_ROTATED, IPP_LIMIT_MAX
429408 };
430409
431−static const enum drm_ipp_size_id limit_id_fallback[IPP_LIMIT_MAX][4] = {
410+static const enum drm_exynos_ipp_limit_type limit_id_fallback[IPP_LIMIT_MAX][4] = {
432411 [IPP_LIMIT_BUFFER] = { DRM_EXYNOS_IPP_LIMIT_SIZE_BUFFER },
433412 [IPP_LIMIT_AREA] = { DRM_EXYNOS_IPP_LIMIT_SIZE_AREA,
434413 DRM_EXYNOS_IPP_LIMIT_SIZE_BUFFER },
@@ -495,12 +474,13 @@ static int exynos_drm_ipp_check_size_limits(struct exynos_drm_ipp_buffer *buf, · 60 unmodified lines
495474 enum drm_ipp_size_id id = rotate ? IPP_LIMIT_ROTATED : IPP_LIMIT_AREA;
496475 struct drm_ipp_limit l;
497476 struct drm_exynos_ipp_limit_val *lh = &l.h, *lv = &l.v;
477+ int real_width = buf->buf.pitch[0] / buf->format->cpp[0];
498478
499479 if (!limits)
500480 return 0;
501481
502482 __get_size_limit(limits, num_limits, IPP_LIMIT_BUFFER, &l);
503− if (!__size_limit_check(buf->buf.width, &l.h) ||
483+ if (!__size_limit_check(real_width, &l.h) ||
504484 !__size_limit_check(buf->buf.height, &l.v))
505485 return -EINVAL;
506486
@@ -560,10 +540,62 @@ static int exynos_drm_ipp_check_scale_limits( · 53 unmodified lines
560540 return 0;
561541 }
562542
543+static int exynos_drm_ipp_check_format(struct exynos_drm_ipp_task *task,
544+ struct exynos_drm_ipp_buffer *buf,
545+ struct exynos_drm_ipp_buffer *src,
546+ struct exynos_drm_ipp_buffer *dst,
547+ bool rotate, bool swap)
548+{
549+ const struct exynos_drm_ipp_formats *fmt;
550+ int ret, i;
551+
552+ fmt = __ipp_format_get(task->ipp, buf->buf.fourcc, buf->buf.modifier,
553+ buf == src ? DRM_EXYNOS_IPP_FORMAT_SOURCE :
554+ DRM_EXYNOS_IPP_FORMAT_DESTINATION);
555+ if (!fmt) {
556+ DRM_DEBUG_DRIVER("Task %pK: %s format not supported\n", task,
557+ buf == src ? "src" : "dst");
558+ return -EINVAL;
559+ }
560+
561+ /* basic checks */
562+ if (buf->buf.width == 0 || buf->buf.height == 0)
563+ return -EINVAL;
564+
565+ buf->format = drm_format_info(buf->buf.fourcc);
566+ for (i = 0; i < buf->format->num_planes; i++) {
567+ unsigned int width = (i == 0) ? buf->buf.width :
568+ DIV_ROUND_UP(buf->buf.width, buf->format->hsub);
569+
570+ if (buf->buf.pitch[i] == 0)
571+ buf->buf.pitch[i] = width * buf->format->cpp[i];
572+ if (buf->buf.pitch[i] < width * buf->format->cpp[i])
573+ return -EINVAL;
574+ if (!buf->buf.gem_id[i])
575+ return -ENOENT;
576+ }
577+
578+ /* pitch for additional planes must match */
579+ if (buf->format->num_planes > 2 &&
580+ buf->buf.pitch[1] != buf->buf.pitch[2])
581+ return -EINVAL;
582+
583+ /* check driver limits */
584+ ret = exynos_drm_ipp_check_size_limits(buf, fmt->limits,
585+ fmt->num_limits,
586+ rotate,
587+ buf == dst ? swap : false);
588+ if (ret)
589+ return ret;
590+ ret = exynos_drm_ipp_check_scale_limits(&src->rect, &dst->rect,
591+ fmt->limits,
592+ fmt->num_limits, swap);
593+ return ret;
594+}
595+
563596 static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task)
564597 {
565598 struct exynos_drm_ipp *ipp = task->ipp;
566− const struct exynos_drm_ipp_formats *src_fmt, *dst_fmt;
567599 struct exynos_drm_ipp_buffer *src = &task->src, *dst = &task->dst;
568600 unsigned int rotation = task->transform.rotation;
569601 int ret = 0;
@@ -607,37 +639,11 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) · 37 unmodified lines
607639 return -EINVAL;
608640 }
609641
610− src_fmt = __ipp_format_get(ipp, src->buf.fourcc, src->buf.modifier,
611− DRM_EXYNOS_IPP_FORMAT_SOURCE);
612− if (!src_fmt) {
613− DRM_DEBUG_DRIVER("Task %pK: src format not supported\n", task);
614− return -EINVAL;
615− }
616− ret = exynos_drm_ipp_check_size_limits(src, src_fmt->limits,
617− src_fmt->num_limits,
618− rotate, false);
619− if (ret)
620− return ret;
621− ret = exynos_drm_ipp_check_scale_limits(&src->rect, &dst->rect,
622− src_fmt->limits,
623− src_fmt->num_limits, swap);
642+ ret = exynos_drm_ipp_check_format(task, src, src, dst, rotate, swap);
624643 if (ret)
625644 return ret;
626645
627− dst_fmt = __ipp_format_get(ipp, dst->buf.fourcc, dst->buf.modifier,
628− DRM_EXYNOS_IPP_FORMAT_DESTINATION);
629− if (!dst_fmt) {
630− DRM_DEBUG_DRIVER("Task %pK: dst format not supported\n", task);
631− return -EINVAL;
632− }
633− ret = exynos_drm_ipp_check_size_limits(dst, dst_fmt->limits,
634− dst_fmt->num_limits,
635− false, swap);
636− if (ret)
637− return ret;
638− ret = exynos_drm_ipp_check_scale_limits(&src->rect, &dst->rect,
639− dst_fmt->limits,
640− dst_fmt->num_limits, swap);
646+ ret = exynos_drm_ipp_check_format(task, dst, src, dst, false, swap);
641647 if (ret)
642648 return ret;
643649
drivers/gpu/drm/exynos/exynos_drm_plane.c+1−1
@@ -132,7 +132,7 @@ static void exynos_drm_plane_reset(struct drm_plane *plane) · 131 unmodified lines
132132 if (plane->state) {
133133 exynos_state = to_exynos_plane_state(plane->state);
134134 if (exynos_state->base.fb)
135− drm_framebuffer_unreference(exynos_state->base.fb);
135+ drm_framebuffer_put(exynos_state->base.fb);
136136 kfree(exynos_state);
137137 plane->state = NULL;
138138 }
drivers/gpu/drm/exynos/exynos_drm_rotator.c+2−2
@@ -168,9 +168,9 @@ static void rotator_dst_set_transf(struct rot_context *rot, · 167 unmodified lines
168168 val &= ~ROT_CONTROL_FLIP_MASK;
169169
170170 if (rotation & DRM_MODE_REFLECT_X)
171− val |= ROT_CONTROL_FLIP_HORIZONTAL;
172− if (rotation & DRM_MODE_REFLECT_Y)
173171 val |= ROT_CONTROL_FLIP_VERTICAL;
172+ if (rotation & DRM_MODE_REFLECT_Y)
173+ val |= ROT_CONTROL_FLIP_HORIZONTAL;
174174
175175 val &= ~ROT_CONTROL_ROT_MASK;
176176
drivers/gpu/drm/exynos/exynos_drm_scaler.c+35−9
@@ -30,6 +30,7 @@ · 29 unmodified lines
3030 #define scaler_write(cfg, offset) writel(cfg, scaler->regs + (offset))
3131 #define SCALER_MAX_CLK 4
3232 #define SCALER_AUTOSUSPEND_DELAY 2000
33+#define SCALER_RESET_WAIT_RETRIES 100
3334
3435 struct scaler_data {
3536 const char *clk_name[SCALER_MAX_CLK];
@@ -51,9 +52,9 @@ struct scaler_context { · 15 unmodified lines
5152 static u32 scaler_get_format(u32 drm_fmt)
5253 {
5354 switch (drm_fmt) {
54− case DRM_FORMAT_NV21:
55− return SCALER_YUV420_2P_UV;
5655 case DRM_FORMAT_NV12:
56+ return SCALER_YUV420_2P_UV;
57+ case DRM_FORMAT_NV21:
5758 return SCALER_YUV420_2P_VU;
5859 case DRM_FORMAT_YUV420:
5960 return SCALER_YUV420_3P;
@@ -63,15 +64,15 @@ static u32 scaler_get_format(u32 drm_fmt) · 3 unmodified lines
6364 return SCALER_YUV422_1P_UYVY;
6465 case DRM_FORMAT_YVYU:
6566 return SCALER_YUV422_1P_YVYU;
66− case DRM_FORMAT_NV61:
67− return SCALER_YUV422_2P_UV;
6867 case DRM_FORMAT_NV16:
68+ return SCALER_YUV422_2P_UV;
69+ case DRM_FORMAT_NV61:
6970 return SCALER_YUV422_2P_VU;
7071 case DRM_FORMAT_YUV422:
7172 return SCALER_YUV422_3P;
72− case DRM_FORMAT_NV42:
73− return SCALER_YUV444_2P_UV;
7473 case DRM_FORMAT_NV24:
74+ return SCALER_YUV444_2P_UV;
75+ case DRM_FORMAT_NV42:
7576 return SCALER_YUV444_2P_VU;
7677 case DRM_FORMAT_YUV444:
7778 return SCALER_YUV444_3P;
@@ -100,6 +101,23 @@ static u32 scaler_get_format(u32 drm_fmt) · 22 unmodified lines
100101 return 0;
101102 }
102103
104+static inline int scaler_reset(struct scaler_context *scaler)
105+{
106+ int retry = SCALER_RESET_WAIT_RETRIES;
107+
108+ scaler_write(SCALER_CFG_SOFT_RESET, SCALER_CFG);
109+ do {
110+ cpu_relax();
111+ } while (retry > 1 &&
112+ scaler_read(SCALER_CFG) & SCALER_CFG_SOFT_RESET);
113+ do {
114+ cpu_relax();
115+ scaler_write(1, SCALER_INT_EN);
116+ } while (retry > 0 && scaler_read(SCALER_INT_EN) != 1);
117+
118+ return retry ? 0 : -EIO;
119+}
120+
103121 static inline void scaler_enable_int(struct scaler_context *scaler)
104122 {
105123 u32 val;
@@ -354,9 +372,13 @@ static int scaler_commit(struct exynos_drm_ipp *ipp, · 248 unmodified lines
354372 u32 dst_fmt = scaler_get_format(task->dst.buf.fourcc);
355373 struct drm_exynos_ipp_task_rect *dst_pos = &task->dst.rect;
356374
357− scaler->task = task;
358−
359375 pm_runtime_get_sync(scaler->dev);
376+ if (scaler_reset(scaler)) {
377+ pm_runtime_put(scaler->dev);
378+ return -EIO;
379+ }
380+
381+ scaler->task = task;
360382
361383 scaler_set_src_fmt(scaler, src_fmt);
362384 scaler_set_src_base(scaler, &task->src);
@@ -394,7 +416,11 @@ static inline void scaler_disable_int(struct scaler_context *scaler) · 31 unmodified lines
394416
395417 static inline u32 scaler_get_int_status(struct scaler_context *scaler)
396418 {
397− return scaler_read(SCALER_INT_STATUS);
419+ u32 val = scaler_read(SCALER_INT_STATUS);
420+
421+ scaler_write(val, SCALER_INT_STATUS);
422+
423+ return val;
398424 }
399425
400426 static inline int scaler_task_done(u32 val)
drivers/gpu/drm/exynos/regs-gsc.h+1−0
@@ -138,6 +138,7 @@ · 137 unmodified lines
138138 #define GSC_OUT_YUV420_3P (3 << 4)
139139 #define GSC_OUT_YUV422_1P (4 << 4)
140140 #define GSC_OUT_YUV422_2P (5 << 4)
141+#define GSC_OUT_YUV422_3P (6 << 4)
141142 #define GSC_OUT_YUV444 (7 << 4)
142143 #define GSC_OUT_TILE_TYPE_MASK (1 << 2)
143144 #define GSC_OUT_TILE_C_16x8 (0 << 2)
drivers/gpu/drm/i915/gvt/cmd_parser.c+23−0
@@ -862,6 +862,7 @@ static int cmd_reg_handler(struct parser_exec_state *s, · 861 unmodified lines
862862 {
863863 struct intel_vgpu *vgpu = s->vgpu;
864864 struct intel_gvt *gvt = vgpu->gvt;
865+ u32 ctx_sr_ctl;
865866
866867 if (offset + 4 > gvt->device_info.mmio_size) {
867868 gvt_vgpu_err("%s access to (%x) outside of MMIO range\n",
@@ -894,6 +895,28 @@ static int cmd_reg_handler(struct parser_exec_state *s, · 26 unmodified lines
894895 patch_value(s, cmd_ptr(s, index), VGT_PVINFO_PAGE);
895896 }
896897
898+ /* TODO
899+ * Right now only scan LRI command on KBL and in inhibit context.
900+ * It's good enough to support initializing mmio by lri command in
901+ * vgpu inhibit context on KBL.
902+ */
903+ if (IS_KABYLAKE(s->vgpu->gvt->dev_priv) &&
904+ intel_gvt_mmio_is_in_ctx(gvt, offset) &&
905+ !strncmp(cmd, "lri", 3)) {
906+ intel_gvt_hypervisor_read_gpa(s->vgpu,
907+ s->workload->ring_context_gpa + 12, &ctx_sr_ctl, 4);
908+ /* check inhibit context */
909+ if (ctx_sr_ctl & 1) {
910+ u32 data = cmd_val(s, index + 1);
911+
912+ if (intel_gvt_mmio_has_mode_mask(s->vgpu->gvt, offset))
913+ intel_vgpu_mask_mmio_write(vgpu,
914+ offset, &data, 4);
915+ else
916+ vgpu_vreg(vgpu, offset) = data;
917+ }
918+ }
919+
897920 /* TODO: Update the global mask if this MMIO is a masked-MMIO */
898921 intel_gvt_mmio_set_cmd_accessed(gvt, offset);
899922 return 0;
drivers/gpu/drm/i915/gvt/display.c+3−3
@@ -196,7 +196,7 @@ static void emulate_monitor_status_change(struct intel_vgpu *vgpu) · 195 unmodified lines
196196 ~(TRANS_DDI_BPC_MASK | TRANS_DDI_MODE_SELECT_MASK |
197197 TRANS_DDI_PORT_MASK);
198198 vgpu_vreg_t(vgpu, TRANS_DDI_FUNC_CTL(TRANSCODER_A)) |=
199− (TRANS_DDI_BPC_8 | TRANS_DDI_MODE_SELECT_DP_SST |
199+ (TRANS_DDI_BPC_8 | TRANS_DDI_MODE_SELECT_DVI |
200200 (PORT_B << TRANS_DDI_PORT_SHIFT) |
201201 TRANS_DDI_FUNC_ENABLE);
202202 if (IS_BROADWELL(dev_priv)) {
@@ -216,7 +216,7 @@ static void emulate_monitor_status_change(struct intel_vgpu *vgpu) · 13 unmodified lines
216216 ~(TRANS_DDI_BPC_MASK | TRANS_DDI_MODE_SELECT_MASK |
217217 TRANS_DDI_PORT_MASK);
218218 vgpu_vreg_t(vgpu, TRANS_DDI_FUNC_CTL(TRANSCODER_A)) |=
219− (TRANS_DDI_BPC_8 | TRANS_DDI_MODE_SELECT_DP_SST |
219+ (TRANS_DDI_BPC_8 | TRANS_DDI_MODE_SELECT_DVI |
220220 (PORT_C << TRANS_DDI_PORT_SHIFT) |
221221 TRANS_DDI_FUNC_ENABLE);
222222 if (IS_BROADWELL(dev_priv)) {
@@ -236,7 +236,7 @@ static void emulate_monitor_status_change(struct intel_vgpu *vgpu) · 13 unmodified lines
236236 ~(TRANS_DDI_BPC_MASK | TRANS_DDI_MODE_SELECT_MASK |
237237 TRANS_DDI_PORT_MASK);
238238 vgpu_vreg_t(vgpu, TRANS_DDI_FUNC_CTL(TRANSCODER_A)) |=
239− (TRANS_DDI_BPC_8 | TRANS_DDI_MODE_SELECT_DP_SST |
239+ (TRANS_DDI_BPC_8 | TRANS_DDI_MODE_SELECT_DVI |
240240 (PORT_D << TRANS_DDI_PORT_SHIFT) |
241241 TRANS_DDI_FUNC_ENABLE);
242242 if (IS_BROADWELL(dev_priv)) {
drivers/gpu/drm/i915/gvt/gtt.c+58−0
@@ -1592,6 +1592,7 @@ static struct intel_vgpu_mm *intel_vgpu_create_ggtt_mm(struct intel_vgpu *vgpu) · 1591 unmodified lines
15921592 vgpu_free_mm(mm);
15931593 return ERR_PTR(-ENOMEM);
15941594 }
1595+ mm->ggtt_mm.last_partial_off = -1UL;
15951596
15961597 return mm;
15971598 }
@@ -1616,6 +1617,7 @@ void _intel_vgpu_mm_release(struct kref *mm_ref) · 18 unmodified lines
16161617 invalidate_ppgtt_mm(mm);
16171618 } else {
16181619 vfree(mm->ggtt_mm.virtual_ggtt);
1620+ mm->ggtt_mm.last_partial_off = -1UL;
16191621 }
16201622
16211623 vgpu_free_mm(mm);
@@ -1868,6 +1870,62 @@ static int emulate_ggtt_mmio_write(struct intel_vgpu *vgpu, unsigned int off, · 246 unmodified lines
18681870 memcpy((void *)&e.val64 + (off & (info->gtt_entry_size - 1)), p_data,
18691871 bytes);
18701872
1873+ /* If ggtt entry size is 8 bytes, and it's split into two 4 bytes
1874+ * write, we assume the two 4 bytes writes are consecutive.
1875+ * Otherwise, we abort and report error
1876+ */
1877+ if (bytes < info->gtt_entry_size) {
1878+ if (ggtt_mm->ggtt_mm.last_partial_off == -1UL) {
1879+ /* the first partial part*/
1880+ ggtt_mm->ggtt_mm.last_partial_off = off;
1881+ ggtt_mm->ggtt_mm.last_partial_data = e.val64;
1882+ return 0;
1883+ } else if ((g_gtt_index ==
1884+ (ggtt_mm->ggtt_mm.last_partial_off >>
1885+ info->gtt_entry_size_shift)) &&
1886+ (off != ggtt_mm->ggtt_mm.last_partial_off)) {
1887+ /* the second partial part */
1888+
1889+ int last_off = ggtt_mm->ggtt_mm.last_partial_off &
1890+ (info->gtt_entry_size - 1);
1891+
1892+ memcpy((void *)&e.val64 + last_off,
1893+ (void *)&ggtt_mm->ggtt_mm.last_partial_data +
1894+ last_off, bytes);
1895+
1896+ ggtt_mm->ggtt_mm.last_partial_off = -1UL;
1897+ } else {
1898+ int last_offset;
1899+
1900+ gvt_vgpu_err("failed to populate guest ggtt entry: abnormal ggtt entry write sequence, last_partial_off=%lx, offset=%x, bytes=%d, ggtt entry size=%d\n",
1901+ ggtt_mm->ggtt_mm.last_partial_off, off,
1902+ bytes, info->gtt_entry_size);
1903+
1904+ /* set host ggtt entry to scratch page and clear
1905+ * virtual ggtt entry as not present for last
1906+ * partially write offset
1907+ */
1908+ last_offset = ggtt_mm->ggtt_mm.last_partial_off &
1909+ (~(info->gtt_entry_size - 1));
1910+
1911+ ggtt_get_host_entry(ggtt_mm, &m, last_offset);
1912+ ggtt_invalidate_pte(vgpu, &m);
1913+ ops->set_pfn(&m, gvt->gtt.scratch_mfn);
1914+ ops->clear_present(&m);
1915+ ggtt_set_host_entry(ggtt_mm, &m, last_offset);
1916+ ggtt_invalidate(gvt->dev_priv);
1917+
1918+ ggtt_get_guest_entry(ggtt_mm, &e, last_offset);
1919+ ops->clear_present(&e);
1920+ ggtt_set_guest_entry(ggtt_mm, &e, last_offset);
1921+
1922+ ggtt_mm->ggtt_mm.last_partial_off = off;
1923+ ggtt_mm->ggtt_mm.last_partial_data = e.val64;
1924+
1925+ return 0;
1926+ }
1927+ }
1928+
18711929 if (ops->test_present(&e)) {
18721930 gfn = ops->get_pfn(&e);
18731931 m = e;
drivers/gpu/drm/i915/gvt/gtt.h+2−0
@@ -150,6 +150,8 @@ struct intel_vgpu_mm { · 149 unmodified lines
150150 } ppgtt_mm;
151151 struct {
152152 void *virtual_ggtt;
153+ unsigned long last_partial_off;
154+ u64 last_partial_data;
153155 } ggtt_mm;
154156 };
155157 };
drivers/gpu/drm/i915/gvt/gvt.h+29−0
@@ -268,6 +268,8 @@ struct intel_gvt_mmio { · 267 unmodified lines
268268 #define F_CMD_ACCESSED (1 << 5)
269269 /* This reg could be accessed by unaligned address */
270270 #define F_UNALIGN (1 << 6)
271+/* This reg is saved/restored in context */
272+#define F_IN_CTX (1 << 7)
271273
272274 struct gvt_mmio_block *mmio_block;
273275 unsigned int num_mmio_block;
@@ -639,6 +641,33 @@ static inline bool intel_gvt_mmio_has_mode_mask( · 365 unmodified lines
639641 return gvt->mmio.mmio_attribute[offset >> 2] & F_MODE_MASK;
640642 }
641643
644+/**
645+ * intel_gvt_mmio_is_in_ctx - check if a MMIO has in-ctx mask
646+ * @gvt: a GVT device
647+ * @offset: register offset
648+ *
649+ * Returns:
650+ * True if a MMIO has a in-context mask, false if it isn't.
651+ *
652+ */
653+static inline bool intel_gvt_mmio_is_in_ctx(
654+ struct intel_gvt *gvt, unsigned int offset)
655+{
656+ return gvt->mmio.mmio_attribute[offset >> 2] & F_IN_CTX;
657+}
658+
659+/**
660+ * intel_gvt_mmio_set_in_ctx - mask a MMIO in logical context
661+ * @gvt: a GVT device
662+ * @offset: register offset
663+ *
664+ */
665+static inline void intel_gvt_mmio_set_in_ctx(
666+ struct intel_gvt *gvt, unsigned int offset)
667+{
668+ gvt->mmio.mmio_attribute[offset >> 2] |= F_IN_CTX;
669+}
670+
642671 int intel_gvt_debugfs_add_vgpu(struct intel_vgpu *vgpu);
643672 void intel_gvt_debugfs_remove_vgpu(struct intel_vgpu *vgpu);
644673 int intel_gvt_debugfs_init(struct intel_gvt *gvt);
drivers/gpu/drm/i915/gvt/handlers.c+24−0
@@ -3045,6 +3045,30 @@ int intel_vgpu_default_mmio_write(struct intel_vgpu *vgpu, unsigned int offset, · 3044 unmodified lines
30453045 return 0;
30463046 }
30473047
3048+/**
3049+ * intel_vgpu_mask_mmio_write - write mask register
3050+ * @vgpu: a vGPU
3051+ * @offset: access offset
3052+ * @p_data: write data buffer
3053+ * @bytes: access data length
3054+ *
3055+ * Returns:
3056+ * Zero on success, negative error code if failed.
3057+ */
3058+int intel_vgpu_mask_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
3059+ void *p_data, unsigned int bytes)
3060+{
3061+ u32 mask, old_vreg;
3062+
3063+ old_vreg = vgpu_vreg(vgpu, offset);
3064+ write_vreg(vgpu, offset, p_data, bytes);
3065+ mask = vgpu_vreg(vgpu, offset) >> 16;
3066+ vgpu_vreg(vgpu, offset) = (old_vreg & ~mask) |
3067+ (vgpu_vreg(vgpu, offset) & mask);
3068+
3069+ return 0;
3070+}
3071+
30483072 /**
30493073 * intel_gvt_in_force_nonpriv_whitelist - if a mmio is in whitelist to be
30503074 * force-nopriv register
drivers/gpu/drm/i915/gvt/mmio.h+2−0
@@ -98,4 +98,6 @@ bool intel_gvt_in_force_nonpriv_whitelist(struct intel_gvt *gvt, · 97 unmodified lines
9898 int intel_vgpu_mmio_reg_rw(struct intel_vgpu *vgpu, unsigned int offset,
9999 void *pdata, unsigned int bytes, bool is_read);
100100
101+int intel_vgpu_mask_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
102+ void *p_data, unsigned int bytes);
101103 #endif
drivers/gpu/drm/i915/gvt/mmio_context.c+3−1
@@ -581,7 +581,9 @@ void intel_gvt_init_engine_mmio_context(struct intel_gvt *gvt) · 580 unmodified lines
581581
582582 for (mmio = gvt->engine_mmio_list.mmio;
583583 i915_mmio_reg_valid(mmio->reg); mmio++) {
584− if (mmio->in_context)
584+ if (mmio->in_context) {
585585 gvt->engine_mmio_list.ctx_mmio_count[mmio->ring_id]++;
586+ intel_gvt_mmio_set_in_ctx(gvt, mmio->reg.reg);
587+ }
586588 }
587589 }
drivers/gpu/drm/i915/i915_drv.h+15−10
@@ -340,14 +340,21 @@ struct drm_i915_file_private { · 339 unmodified lines
340340
341341 unsigned int bsd_engine;
342342
343−/* Client can have a maximum of 3 contexts banned before
344− * it is denied of creating new contexts. As one context
345− * ban needs 4 consecutive hangs, and more if there is
346− * progress in between, this is a last resort stop gap measure
347− * to limit the badly behaving clients access to gpu.
343+/*
344+ * Every context ban increments per client ban score. Also
345+ * hangs in short succession increments ban score. If ban threshold
346+ * is reached, client is considered banned and submitting more work
347+ * will fail. This is a stop gap measure to limit the badly behaving
348+ * clients access to gpu. Note that unbannable contexts never increment
349+ * the client ban score.
348350 */
349−#define I915_MAX_CLIENT_CONTEXT_BANS 3
350− atomic_t context_bans;
351+#define I915_CLIENT_SCORE_HANG_FAST 1
352+#define I915_CLIENT_FAST_HANG_JIFFIES (60 * HZ)
353+#define I915_CLIENT_SCORE_CONTEXT_BAN 3
354+#define I915_CLIENT_SCORE_BANNED 9
355+ /** ban_score: Accumulated score of all ctx bans and fast hangs. */
356+ atomic_t ban_score;
357+ unsigned long hang_timestamp;
351358 };
352359
353360 /* Interface history:
@@ -645,6 +652,7 @@ enum intel_sbi_destination { · 291 unmodified lines
645652 #define QUIRK_BACKLIGHT_PRESENT (1<<3)
646653 #define QUIRK_PIN_SWIZZLED_PAGES (1<<5)
647654 #define QUIRK_INCREASE_T12_DELAY (1<<6)
655+#define QUIRK_INCREASE_DDI_DISABLED_TIME (1<<7)
648656
649657 struct intel_fbdev;
650658 struct intel_fbc_work;
@@ -2238,9 +2246,6 @@ static inline struct scatterlist *____sg_next(struct scatterlist *sg) · 1587 unmodified lines
22382246 **/
22392247 static inline struct scatterlist *__sg_next(struct scatterlist *sg)
22402248 {
2241−#ifdef CONFIG_DEBUG_SG
2242− BUG_ON(sg->sg_magic != SG_MAGIC);
2243−#endif
22442249 return sg_is_last(sg) ? NULL : ____sg_next(sg);
22452250 }
22462251
drivers/gpu/drm/i915/i915_gem.c+57−28
@@ -2002,7 +2002,6 @@ int i915_gem_fault(struct vm_fault *vmf) · 2001 unmodified lines
20022002 bool write = !!(vmf->flags & FAULT_FLAG_WRITE);
20032003 struct i915_vma *vma;
20042004 pgoff_t page_offset;
2005− unsigned int flags;
20062005 int ret;
20072006
20082007 /* We don't use vmf->pgoff since that has the fake offset */
@@ -2038,27 +2037,34 @@ int i915_gem_fault(struct vm_fault *vmf) · 29 unmodified lines
20382037 goto err_unlock;
20392038 }
20402039
2041− /* If the object is smaller than a couple of partial vma, it is
2042− * not worth only creating a single partial vma - we may as well
2043− * clear enough space for the full object.
2044− */
2045− flags = PIN_MAPPABLE;
2046− if (obj->base.size > 2 * MIN_CHUNK_PAGES << PAGE_SHIFT)
2047− flags |= PIN_NONBLOCK | PIN_NONFAULT;
20482040
20492041 /* Now pin it into the GTT as needed */
2050− vma = i915_gem_object_ggtt_pin(obj, NULL, 0, 0, flags);
2042+ vma = i915_gem_object_ggtt_pin(obj, NULL, 0, 0,
2043+ PIN_MAPPABLE |
2044+ PIN_NONBLOCK |
2045+ PIN_NONFAULT);
20512046 if (IS_ERR(vma)) {
20522047 /* Use a partial view if it is bigger than available space */
20532048 struct i915_ggtt_view view =
20542049 compute_partial_view(obj, page_offset, MIN_CHUNK_PAGES);
2050+ unsigned int flags;
20552051
2056− /* Userspace is now writing through an untracked VMA, abandon
2052+ flags = PIN_MAPPABLE;
2053+ if (view.type == I915_GGTT_VIEW_NORMAL)
2054+ flags |= PIN_NONBLOCK; /* avoid warnings for pinned */
2055+
2056+ /*
2057+ * Userspace is now writing through an untracked VMA, abandon
20572058 * all hope that the hardware is able to track future writes.
20582059 */
20592060 obj->frontbuffer_ggtt_origin = ORIGIN_CPU;
20602061
2061− vma = i915_gem_object_ggtt_pin(obj, &view, 0, 0, PIN_MAPPABLE);
2062+ vma = i915_gem_object_ggtt_pin(obj, &view, 0, 0, flags);
2063+ if (IS_ERR(vma) && !view.type) {
2064+ flags = PIN_MAPPABLE;
2065+ view.type = I915_GGTT_VIEW_PARTIAL;
2066+ vma = i915_gem_object_ggtt_pin(obj, &view, 0, 0, flags);
2067+ }
20622068 }
20632069 if (IS_ERR(vma)) {
20642070 ret = PTR_ERR(vma);
@@ -2933,32 +2939,54 @@ i915_gem_object_pwrite_gtt(struct drm_i915_gem_object *obj, · 868 unmodified lines
29332939 return 0;
29342940 }
29352941
2942+static void i915_gem_client_mark_guilty(struct drm_i915_file_private *file_priv,
2943+ const struct i915_gem_context *ctx)
2944+{
2945+ unsigned int score;
2946+ unsigned long prev_hang;
2947+
2948+ if (i915_gem_context_is_banned(ctx))
2949+ score = I915_CLIENT_SCORE_CONTEXT_BAN;
2950+ else
2951+ score = 0;
2952+
2953+ prev_hang = xchg(&file_priv->hang_timestamp, jiffies);
2954+ if (time_before(jiffies, prev_hang + I915_CLIENT_FAST_HANG_JIFFIES))
2955+ score += I915_CLIENT_SCORE_HANG_FAST;
2956+
2957+ if (score) {
2958+ atomic_add(score, &file_priv->ban_score);
2959+
2960+ DRM_DEBUG_DRIVER("client %s: gained %u ban score, now %u\n",
2961+ ctx->name, score,
2962+ atomic_read(&file_priv->ban_score));
2963+ }
2964+}
2965+
29362966 static void i915_gem_context_mark_guilty(struct i915_gem_context *ctx)
29372967 {
2938− bool banned;
2968+ unsigned int score;
2969+ bool banned, bannable;
29392970
29402971 atomic_inc(&ctx->guilty_count);
29412972
2942− banned = false;
2943− if (i915_gem_context_is_bannable(ctx)) {
2944− unsigned int score;
2973+ bannable = i915_gem_context_is_bannable(ctx);
2974+ score = atomic_add_return(CONTEXT_SCORE_GUILTY, &ctx->ban_score);
2975+ banned = score >= CONTEXT_SCORE_BAN_THRESHOLD;
29452976
2946− score = atomic_add_return(CONTEXT_SCORE_GUILTY,
2947− &ctx->ban_score);
2948− banned = score >= CONTEXT_SCORE_BAN_THRESHOLD;
2977+ DRM_DEBUG_DRIVER("context %s: guilty %d, score %u, ban %s\n",
2978+ ctx->name, atomic_read(&ctx->guilty_count),
2979+ score, yesno(banned && bannable));
29492980
2950− DRM_DEBUG_DRIVER("context %s marked guilty (score %d) banned? %s\n",
2951− ctx->name, score, yesno(banned));
2952− }
2953− if (!banned)
2981+ /* Cool contexts don't accumulate client ban score */
2982+ if (!bannable)
29542983 return;
29552984
2956− i915_gem_context_set_banned(ctx);
2957− if (!IS_ERR_OR_NULL(ctx->file_priv)) {
2958− atomic_inc(&ctx->file_priv->context_bans);
2959− DRM_DEBUG_DRIVER("client %s has had %d context banned\n",
2960− ctx->name, atomic_read(&ctx->file_priv->context_bans));
2961− }
2985+ if (banned)
2986+ i915_gem_context_set_banned(ctx);
2987+
2988+ if (!IS_ERR_OR_NULL(ctx->file_priv))
2989+ i915_gem_client_mark_guilty(ctx->file_priv, ctx);
29622990 }
29632991
29642992 static void i915_gem_context_mark_innocent(struct i915_gem_context *ctx)
@@ -5736,6 +5764,7 @@ int i915_gem_open(struct drm_i915_private *i915, struct drm_file *file) · 2771 unmodified lines
57365764 INIT_LIST_HEAD(&file_priv->mm.request_list);
57375765
57385766 file_priv->bsd_engine = -1;
5767+ file_priv->hang_timestamp = jiffies;
57395768
57405769 ret = i915_gem_context_open(i915, file);
57415770 if (ret)
drivers/gpu/drm/i915/i915_gem_context.c+1−1
@@ -652,7 +652,7 @@ int i915_gem_switch_to_kernel_context(struct drm_i915_private *dev_priv) · 651 unmodified lines
652652
653653 static bool client_is_banned(struct drm_i915_file_private *file_priv)
654654 {
655− return atomic_read(&file_priv->context_bans) > I915_MAX_CLIENT_CONTEXT_BANS;
655+ return atomic_read(&file_priv->ban_score) >= I915_CLIENT_SCORE_BANNED;
656656 }
657657
658658 int i915_gem_context_create_ioctl(struct drm_device *dev, void *data,
drivers/gpu/drm/i915/i915_gem_execbuffer.c+27−22
@@ -489,7 +489,9 @@ eb_validate_vma(struct i915_execbuffer *eb, · 488 unmodified lines
489489 }
490490
491491 static int
492−eb_add_vma(struct i915_execbuffer *eb, unsigned int i, struct i915_vma *vma)
492+eb_add_vma(struct i915_execbuffer *eb,
493+ unsigned int i, unsigned batch_idx,
494+ struct i915_vma *vma)
493495 {
494496 struct drm_i915_gem_exec_object2 *entry = &eb->exec[i];
495497 int err;
@@ -522,6 +524,24 @@ eb_add_vma(struct i915_execbuffer *eb, unsigned int i, struct i915_vma *vma) · 26 unmodified lines
522524 eb->flags[i] = entry->flags;
523525 vma->exec_flags = &eb->flags[i];
524526
527+ /*
528+ * SNA is doing fancy tricks with compressing batch buffers, which leads
529+ * to negative relocation deltas. Usually that works out ok since the
530+ * relocate address is still positive, except when the batch is placed
531+ * very low in the GTT. Ensure this doesn't happen.
532+ *
533+ * Note that actual hangs have only been observed on gen7, but for
534+ * paranoia do it everywhere.
535+ */
536+ if (i == batch_idx) {
537+ if (!(eb->flags[i] & EXEC_OBJECT_PINNED))
538+ eb->flags[i] |= __EXEC_OBJECT_NEEDS_BIAS;
539+ if (eb->reloc_cache.has_fence)
540+ eb->flags[i] |= EXEC_OBJECT_NEEDS_FENCE;
541+
542+ eb->batch = vma;
543+ }
544+
525545 err = 0;
526546 if (eb_pin_vma(eb, entry, vma)) {
527547 if (entry->offset != vma->node.start) {
@@ -716,7 +736,7 @@ static int eb_lookup_vmas(struct i915_execbuffer *eb) · 188 unmodified lines
716736 {
717737 struct radix_tree_root *handles_vma = &eb->ctx->handles_vma;
718738 struct drm_i915_gem_object *obj;
719− unsigned int i;
739+ unsigned int i, batch;
720740 int err;
721741
722742 if (unlikely(i915_gem_context_is_closed(eb->ctx)))
@@ -728,6 +748,8 @@ static int eb_lookup_vmas(struct i915_execbuffer *eb) · 5 unmodified lines
728748 INIT_LIST_HEAD(&eb->relocs);
729749 INIT_LIST_HEAD(&eb->unbound);
730750
751+ batch = eb_batch_index(eb);
752+
731753 for (i = 0; i < eb->buffer_count; i++) {
732754 u32 handle = eb->exec[i].handle;
733755 struct i915_lut_handle *lut;
@@ -770,33 +792,16 @@ static int eb_lookup_vmas(struct i915_execbuffer *eb) · 36 unmodified lines
770792 lut->handle = handle;
771793
772794 add_vma:
773− err = eb_add_vma(eb, i, vma);
795+ err = eb_add_vma(eb, i, batch, vma);
774796 if (unlikely(err))
775797 goto err_vma;
776798
777799 GEM_BUG_ON(vma != eb->vma[i]);
778800 GEM_BUG_ON(vma->exec_flags != &eb->flags[i]);
801+ GEM_BUG_ON(drm_mm_node_allocated(&vma->node) &&
802+ eb_vma_misplaced(&eb->exec[i], vma, eb->flags[i]));
779803 }
780804
781− /* take note of the batch buffer before we might reorder the lists */
782− i = eb_batch_index(eb);
783− eb->batch = eb->vma[i];
784− GEM_BUG_ON(eb->batch->exec_flags != &eb->flags[i]);
785−
786− /*
787− * SNA is doing fancy tricks with compressing batch buffers, which leads
788− * to negative relocation deltas. Usually that works out ok since the
789− * relocate address is still positive, except when the batch is placed
790− * very low in the GTT. Ensure this doesn't happen.
791− *
792− * Note that actual hangs have only been observed on gen7, but for
793− * paranoia do it everywhere.
794− */
795− if (!(eb->flags[i] & EXEC_OBJECT_PINNED))
796− eb->flags[i] |= __EXEC_OBJECT_NEEDS_BIAS;
797− if (eb->reloc_cache.has_fence)
798− eb->flags[i] |= EXEC_OBJECT_NEEDS_FENCE;
799−
800805 eb->args->flags |= __EXEC_VALIDATED;
801806 return eb_reserve(eb);
802807
drivers/gpu/drm/i915/i915_irq.c+40−4
@@ -1893,9 +1893,17 @@ static void i9xx_pipestat_irq_ack(struct drm_i915_private *dev_priv, · 1892 unmodified lines
18931893
18941894 /*
18951895 * Clear the PIPE*STAT regs before the IIR
1896+ *
1897+ * Toggle the enable bits to make sure we get an
1898+ * edge in the ISR pipe event bit if we don't clear
1899+ * all the enabled status bits. Otherwise the edge
1900+ * triggered IIR on i965/g4x wouldn't notice that
1901+ * an interrupt is still pending.
18961902 */
1897− if (pipe_stats[pipe])
1898− I915_WRITE(reg, enable_mask | pipe_stats[pipe]);
1903+ if (pipe_stats[pipe]) {
1904+ I915_WRITE(reg, pipe_stats[pipe]);
1905+ I915_WRITE(reg, enable_mask);
1906+ }
18991907 }
19001908 spin_unlock(&dev_priv->irq_lock);
19011909 }
@@ -1990,10 +1998,38 @@ static void valleyview_pipestat_irq_handler(struct drm_i915_private *dev_priv, · 88 unmodified lines
19901998
19911999 static u32 i9xx_hpd_irq_ack(struct drm_i915_private *dev_priv)
19922000 {
1993− u32 hotplug_status = I915_READ(PORT_HOTPLUG_STAT);
2001+ u32 hotplug_status = 0, hotplug_status_mask;
2002+ int i;
19942003
1995− if (hotplug_status)
2004+ if (IS_G4X(dev_priv) ||
2005+ IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
2006+ hotplug_status_mask = HOTPLUG_INT_STATUS_G4X |
2007+ DP_AUX_CHANNEL_MASK_INT_STATUS_G4X;
2008+ else
2009+ hotplug_status_mask = HOTPLUG_INT_STATUS_I915;
2010+
2011+ /*
2012+ * We absolutely have to clear all the pending interrupt
2013+ * bits in PORT_HOTPLUG_STAT. Otherwise the ISR port
2014+ * interrupt bit won't have an edge, and the i965/g4x
2015+ * edge triggered IIR will not notice that an interrupt
2016+ * is still pending. We can't use PORT_HOTPLUG_EN to
2017+ * guarantee the edge as the act of toggling the enable
2018+ * bits can itself generate a new hotplug interrupt :(
2019+ */
2020+ for (i = 0; i < 10; i++) {
2021+ u32 tmp = I915_READ(PORT_HOTPLUG_STAT) & hotplug_status_mask;
2022+
2023+ if (tmp == 0)
2024+ return hotplug_status;
2025+
2026+ hotplug_status |= tmp;
19962027 I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status);
2028+ }
2029+
2030+ WARN_ONCE(1,
2031+ "PORT_HOTPLUG_STAT did not clear (0x%08x)\n",
2032+ I915_READ(PORT_HOTPLUG_STAT));
19972033
19982034 return hotplug_status;
19992035 }
drivers/gpu/drm/i915/i915_reg.h+5−0
@@ -2425,12 +2425,17 @@ enum i915_power_well_id { · 2424 unmodified lines
24252425 #define _3D_CHICKEN _MMIO(0x2084)
24262426 #define _3D_CHICKEN_HIZ_PLANE_DISABLE_MSAA_4X_SNB (1 << 10)
24272427 #define _3D_CHICKEN2 _MMIO(0x208c)
2428+
2429+#define FF_SLICE_CHICKEN _MMIO(0x2088)
2430+#define FF_SLICE_CHICKEN_CL_PROVOKING_VERTEX_FIX (1 << 1)
2431+
24282432 /* Disables pipelining of read flushes past the SF-WIZ interface.
24292433 * Required on all Ironlake steppings according to the B-Spec, but the
24302434 * particular danger of not doing so is not specified.
24312435 */
24322436 # define _3D_CHICKEN2_WM_READ_PIPELINED (1 << 14)
24332437 #define _3D_CHICKEN3 _MMIO(0x2090)
2438+#define _3D_CHICKEN_SF_PROVOKING_VERTEX_FIX (1 << 12)
24342439 #define _3D_CHICKEN_SF_DISABLE_OBJEND_CULL (1 << 10)
24352440 #define _3D_CHICKEN3_AA_LINE_QUALITY_FIX_ENABLE (1 << 5)
24362441 #define _3D_CHICKEN3_SF_DISABLE_FASTCLIP_CULL (1 << 5)
drivers/gpu/drm/i915/i915_vma.c+1−1
@@ -109,7 +109,7 @@ vma_create(struct drm_i915_gem_object *obj, · 108 unmodified lines
109109 obj->base.size >> PAGE_SHIFT));
110110 vma->size = view->partial.size;
111111 vma->size <<= PAGE_SHIFT;
112− GEM_BUG_ON(vma->size >= obj->base.size);
112+ GEM_BUG_ON(vma->size > obj->base.size);
113113 } else if (view->type == I915_GGTT_VIEW_ROTATED) {
114114 vma->size = intel_rotation_info_size(&view->rotated);
115115 vma->size <<= PAGE_SHIFT;
drivers/gpu/drm/i915/intel_crt.c+20−0
@@ -304,6 +304,9 @@ intel_crt_mode_valid(struct drm_connector *connector, · 303 unmodified lines
304304 int max_dotclk = dev_priv->max_dotclk_freq;
305305 int max_clock;
306306
307+ if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
308+ return MODE_NO_DBLESCAN;
309+
307310 if (mode->clock < 25000)
308311 return MODE_CLOCK_LOW;
309312
@@ -337,6 +340,12 @@ static bool intel_crt_compute_config(struct intel_encoder *encoder, · 27 unmodified lines
337340 struct intel_crtc_state *pipe_config,
338341 struct drm_connector_state *conn_state)
339342 {
343+ struct drm_display_mode *adjusted_mode =
344+ &pipe_config->base.adjusted_mode;
345+
346+ if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
347+ return false;
348+
340349 return true;
341350 }
342351
@@ -344,6 +353,12 @@ static bool pch_crt_compute_config(struct intel_encoder *encoder, · 1 unmodified line
344353 struct intel_crtc_state *pipe_config,
345354 struct drm_connector_state *conn_state)
346355 {
356+ struct drm_display_mode *adjusted_mode =
357+ &pipe_config->base.adjusted_mode;
358+
359+ if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
360+ return false;
361+
347362 pipe_config->has_pch_encoder = true;
348363
349364 return true;
@@ -354,6 +369,11 @@ static bool hsw_crt_compute_config(struct intel_encoder *encoder, · 4 unmodified lines
354369 struct drm_connector_state *conn_state)
355370 {
356371 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
372+ struct drm_display_mode *adjusted_mode =
373+ &pipe_config->base.adjusted_mode;
374+
375+ if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
376+ return false;
357377
358378 pipe_config->has_pch_encoder = true;
359379
drivers/gpu/drm/i915/intel_ddi.c+11−2
@@ -1782,15 +1782,24 @@ void intel_ddi_enable_transcoder_func(const struct intel_crtc_state *crtc_state) · 1781 unmodified lines
17821782 I915_WRITE(TRANS_DDI_FUNC_CTL(cpu_transcoder), temp);
17831783 }
17841784
1785−void intel_ddi_disable_transcoder_func(struct drm_i915_private *dev_priv,
1786− enum transcoder cpu_transcoder)
1785+void intel_ddi_disable_transcoder_func(const struct intel_crtc_state *crtc_state)
17871786 {
1787+ struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
1788+ struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
1789+ enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
17881790 i915_reg_t reg = TRANS_DDI_FUNC_CTL(cpu_transcoder);
17891791 uint32_t val = I915_READ(reg);
17901792
17911793 val &= ~(TRANS_DDI_FUNC_ENABLE | TRANS_DDI_PORT_MASK | TRANS_DDI_DP_VC_PAYLOAD_ALLOC);
17921794 val |= TRANS_DDI_PORT_NONE;
17931795 I915_WRITE(reg, val);
1796+
1797+ if (dev_priv->quirks & QUIRK_INCREASE_DDI_DISABLED_TIME &&
1798+ intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) {
1799+ DRM_DEBUG_KMS("Quirk Increase DDI disabled time\n");
1800+ /* Quirk time at 100ms for reliable operation */
1801+ msleep(100);
1802+ }
17941803 }
17951804
17961805 int intel_ddi_toggle_hdcp_signalling(struct intel_encoder *intel_encoder,
drivers/gpu/drm/i915/intel_display.c+33−4
@@ -5809,7 +5809,7 @@ static void haswell_crtc_disable(struct intel_crtc_state *old_crtc_state, · 5808 unmodified lines
58095809 intel_ddi_set_vc_payload_alloc(intel_crtc->config, false);
58105810
58115811 if (!transcoder_is_dsi(cpu_transcoder))
5812− intel_ddi_disable_transcoder_func(dev_priv, cpu_transcoder);
5812+ intel_ddi_disable_transcoder_func(old_crtc_state);
58135813
58145814 if (INTEL_GEN(dev_priv) >= 9)
58155815 skylake_scaler_disable(intel_crtc);
@@ -14469,12 +14469,22 @@ static enum drm_mode_status · 8653 unmodified lines
1446914469 intel_mode_valid(struct drm_device *dev,
1447014470 const struct drm_display_mode *mode)
1447114471 {
14472+ /*
14473+ * Can't reject DBLSCAN here because Xorg ddxen can add piles
14474+ * of DBLSCAN modes to the output's mode list when they detect
14475+ * the scaling mode property on the connector. And they don't
14476+ * ask the kernel to validate those modes in any way until
14477+ * modeset time at which point the client gets a protocol error.
14478+ * So in order to not upset those clients we silently ignore the
14479+ * DBLSCAN flag on such connectors. For other connectors we will
14480+ * reject modes with the DBLSCAN flag in encoder->compute_config().
14481+ * And we always reject DBLSCAN modes in connector->mode_valid()
14482+ * as we never want such modes on the connector's mode list.
14483+ */
14484+
1447214485 if (mode->vscan > 1)
1447314486 return MODE_NO_VSCAN;
1447414487
14475− if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
14476− return MODE_NO_DBLESCAN;
14477−
1447814488 if (mode->flags & DRM_MODE_FLAG_HSKEW)
1447914489 return MODE_H_ILLEGAL;
1448014490
@@ -14636,6 +14646,18 @@ static void quirk_increase_t12_delay(struct drm_device *dev) · 155 unmodified lines
1463614646 DRM_INFO("Applying T12 delay quirk\n");
1463714647 }
1463814648
14649+/*
14650+ * GeminiLake NUC HDMI outputs require additional off time
14651+ * this allows the onboard retimer to correctly sync to signal
14652+ */
14653+static void quirk_increase_ddi_disabled_time(struct drm_device *dev)
14654+{
14655+ struct drm_i915_private *dev_priv = to_i915(dev);
14656+
14657+ dev_priv->quirks |= QUIRK_INCREASE_DDI_DISABLED_TIME;
14658+ DRM_INFO("Applying Increase DDI Disabled quirk\n");
14659+}
14660+
1463914661 struct intel_quirk {
1464014662 int device;
1464114663 int subsystem_vendor;
@@ -14722,6 +14744,13 @@ static struct intel_quirk intel_quirks[] = { · 80 unmodified lines
1472214744
1472314745 /* Toshiba Satellite P50-C-18C */
1472414746 { 0x191B, 0x1179, 0xF840, quirk_increase_t12_delay },
14747+
14748+ /* GeminiLake NUC */
14749+ { 0x3185, 0x8086, 0x2072, quirk_increase_ddi_disabled_time },
14750+ { 0x3184, 0x8086, 0x2072, quirk_increase_ddi_disabled_time },
14751+ /* ASRock ITX*/
14752+ { 0x3185, 0x1849, 0x2212, quirk_increase_ddi_disabled_time },
14753+ { 0x3184, 0x1849, 0x2212, quirk_increase_ddi_disabled_time },
1472514754 };
1472614755
1472714756 static void intel_init_quirks(struct drm_device *dev)
drivers/gpu/drm/i915/intel_dp.c+16−18
@@ -420,6 +420,9 @@ intel_dp_mode_valid(struct drm_connector *connector, · 419 unmodified lines
420420 int max_rate, mode_rate, max_lanes, max_link_clock;
421421 int max_dotclk;
422422
423+ if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
424+ return MODE_NO_DBLESCAN;
425+
423426 max_dotclk = intel_dp_downstream_max_dotclock(intel_dp);
424427
425428 if (intel_dp_is_edp(intel_dp) && fixed_mode) {
@@ -1862,7 +1865,10 @@ intel_dp_compute_config(struct intel_encoder *encoder, · 1436 unmodified lines
18621865 conn_state->scaling_mode);
18631866 }
18641867
1865− if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
1868+ if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
1869+ return false;
1870+
1871+ if (HAS_GMCH_DISPLAY(dev_priv) &&
18661872 adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
18671873 return false;
18681874
@@ -2782,16 +2788,6 @@ static void intel_disable_dp(struct intel_encoder *encoder, · 913 unmodified lines
27822788 static void g4x_disable_dp(struct intel_encoder *encoder,
27832789 const struct intel_crtc_state *old_crtc_state,
27842790 const struct drm_connector_state *old_conn_state)
2785−{
2786− intel_disable_dp(encoder, old_crtc_state, old_conn_state);
2787−
2788− /* disable the port before the pipe on g4x */
2789− intel_dp_link_down(encoder, old_crtc_state);
2790−}
2791−
2792−static void ilk_disable_dp(struct intel_encoder *encoder,
2793− const struct intel_crtc_state *old_crtc_state,
2794− const struct drm_connector_state *old_conn_state)
27952791 {
27962792 intel_disable_dp(encoder, old_crtc_state, old_conn_state);
27972793 }
@@ -2807,13 +2803,19 @@ static void vlv_disable_dp(struct intel_encoder *encoder, · 9 unmodified lines
28072803 intel_disable_dp(encoder, old_crtc_state, old_conn_state);
28082804 }
28092805
2810−static void ilk_post_disable_dp(struct intel_encoder *encoder,
2806+static void g4x_post_disable_dp(struct intel_encoder *encoder,
28112807 const struct intel_crtc_state *old_crtc_state,
28122808 const struct drm_connector_state *old_conn_state)
28132809 {
28142810 struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
28152811 enum port port = encoder->port;
28162812
2813+ /*
2814+ * Bspec does not list a specific disable sequence for g4x DP.
2815+ * Follow the ilk+ sequence (disable pipe before the port) for
2816+ * g4x DP as it does not suffer from underruns like the normal
2817+ * g4x modeset sequence (disable pipe after the port).
2818+ */
28172819 intel_dp_link_down(encoder, old_crtc_state);
28182820
28192821 /* Only ilk+ has port A */
@@ -6337,7 +6339,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port, · 3517 unmodified lines
63376339 drm_connector_init(dev, connector, &intel_dp_connector_funcs, type);
63386340 drm_connector_helper_add(connector, &intel_dp_connector_helper_funcs);
63396341
6340− if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
6342+ if (!HAS_GMCH_DISPLAY(dev_priv))
63416343 connector->interlace_allowed = true;
63426344 connector->doublescan_allowed = 0;
63436345
@@ -6436,15 +6438,11 @@ bool intel_dp_init(struct drm_i915_private *dev_priv, · 92 unmodified lines
64366438 intel_encoder->enable = vlv_enable_dp;
64376439 intel_encoder->disable = vlv_disable_dp;
64386440 intel_encoder->post_disable = vlv_post_disable_dp;
6439− } else if (INTEL_GEN(dev_priv) >= 5) {
6440− intel_encoder->pre_enable = g4x_pre_enable_dp;
6441− intel_encoder->enable = g4x_enable_dp;
6442− intel_encoder->disable = ilk_disable_dp;
6443− intel_encoder->post_disable = ilk_post_disable_dp;
64446441 } else {
64456442 intel_encoder->pre_enable = g4x_pre_enable_dp;
64466443 intel_encoder->enable = g4x_enable_dp;
64476444 intel_encoder->disable = g4x_disable_dp;
6445+ intel_encoder->post_disable = g4x_post_disable_dp;
64486446 }
64496447
64506448 intel_dig_port->dp.output_reg = output_reg;
drivers/gpu/drm/i915/intel_dp_mst.c+6−0
@@ -48,6 +48,9 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder, · 47 unmodified lines
4848 bool reduce_m_n = drm_dp_has_quirk(&intel_dp->desc,
4949 DP_DPCD_QUIRK_LIMITED_M_N);
5050
51+ if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
52+ return false;
53+
5154 pipe_config->has_pch_encoder = false;
5255 bpp = 24;
5356 if (intel_dp->compliance.test_data.bpc) {
@@ -366,6 +369,9 @@ intel_dp_mst_mode_valid(struct drm_connector *connector, · 312 unmodified lines
366369 if (!intel_dp)
367370 return MODE_ERROR;
368371
372+ if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
373+ return MODE_NO_DBLESCAN;
374+
369375 max_link_clock = intel_dp_max_link_rate(intel_dp);
370376 max_lanes = intel_dp_max_lane_count(intel_dp);
371377
drivers/gpu/drm/i915/intel_drv.h+1−2
@@ -1388,8 +1388,7 @@ void hsw_fdi_link_train(struct intel_crtc *crtc, · 1387 unmodified lines
13881388 void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port);
13891389 bool intel_ddi_get_hw_state(struct intel_encoder *encoder, enum pipe *pipe);
13901390 void intel_ddi_enable_transcoder_func(const struct intel_crtc_state *crtc_state);
1391−void intel_ddi_disable_transcoder_func(struct drm_i915_private *dev_priv,
1392− enum transcoder cpu_transcoder);
1391+void intel_ddi_disable_transcoder_func(const struct intel_crtc_state *crtc_state);
13931392 void intel_ddi_enable_pipe_clock(const struct intel_crtc_state *crtc_state);
13941393 void intel_ddi_disable_pipe_clock(const struct intel_crtc_state *crtc_state);
13951394 struct intel_encoder *
drivers/gpu/drm/i915/intel_dsi.c+6−0
@@ -326,6 +326,9 @@ static bool intel_dsi_compute_config(struct intel_encoder *encoder, · 325 unmodified lines
326326 conn_state->scaling_mode);
327327 }
328328
329+ if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
330+ return false;
331+
329332 /* DSI uses short packets for sync events, so clear mode flags for DSI */
330333 adjusted_mode->flags = 0;
331334
@@ -1266,6 +1269,9 @@ intel_dsi_mode_valid(struct drm_connector *connector, · 934 unmodified lines
12661269
12671270 DRM_DEBUG_KMS("\n");
12681271
1272+ if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
1273+ return MODE_NO_DBLESCAN;
1274+
12691275 if (fixed_mode) {
12701276 if (mode->hdisplay > fixed_mode->hdisplay)
12711277 return MODE_PANEL;
drivers/gpu/drm/i915/intel_dvo.c+6−0
@@ -219,6 +219,9 @@ intel_dvo_mode_valid(struct drm_connector *connector, · 218 unmodified lines
219219 int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
220220 int target_clock = mode->clock;
221221
222+ if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
223+ return MODE_NO_DBLESCAN;
224+
222225 /* XXX: Validate clock range */
223226
224227 if (fixed_mode) {
@@ -254,6 +257,9 @@ static bool intel_dvo_compute_config(struct intel_encoder *encoder, · 29 unmodified lines
254257 if (fixed_mode)
255258 intel_fixed_panel_mode(fixed_mode, adjusted_mode);
256259
260+ if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
261+ return false;
262+
257263 return true;
258264 }
259265
drivers/gpu/drm/i915/intel_hdmi.c+6−0
@@ -1557,6 +1557,9 @@ intel_hdmi_mode_valid(struct drm_connector *connector, · 1556 unmodified lines
15571557 bool force_dvi =
15581558 READ_ONCE(to_intel_digital_connector_state(connector->state)->force_audio) == HDMI_AUDIO_OFF_DVI;
15591559
1560+ if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
1561+ return MODE_NO_DBLESCAN;
1562+
15601563 clock = mode->clock;
15611564
15621565 if ((mode->flags & DRM_MODE_FLAG_3D_MASK) == DRM_MODE_FLAG_3D_FRAME_PACKING)
@@ -1677,6 +1680,9 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder, · 114 unmodified lines
16771680 int desired_bpp;
16781681 bool force_dvi = intel_conn_state->force_audio == HDMI_AUDIO_OFF_DVI;
16791682
1683+ if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
1684+ return false;
1685+
16801686 pipe_config->has_hdmi_sink = !force_dvi && intel_hdmi->has_hdmi_sink;
16811687
16821688 if (pipe_config->has_hdmi_sink)
drivers/gpu/drm/i915/intel_lrc.c+13−5
@@ -1545,11 +1545,21 @@ static u32 *gen9_init_indirectctx_bb(struct intel_engine_cs *engine, u32 *batch) · 1544 unmodified lines
15451545 /* WaFlushCoherentL3CacheLinesAtContextSwitch:skl,bxt,glk */
15461546 batch = gen8_emit_flush_coherentl3_wa(engine, batch);
15471547
1548+ *batch++ = MI_LOAD_REGISTER_IMM(3);
1549+
15481550 /* WaDisableGatherAtSetShaderCommonSlice:skl,bxt,kbl,glk */
1549− *batch++ = MI_LOAD_REGISTER_IMM(1);
15501551 *batch++ = i915_mmio_reg_offset(COMMON_SLICE_CHICKEN2);
15511552 *batch++ = _MASKED_BIT_DISABLE(
15521553 GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE);
1554+
1555+ /* BSpec: 11391 */
1556+ *batch++ = i915_mmio_reg_offset(FF_SLICE_CHICKEN);
1557+ *batch++ = _MASKED_BIT_ENABLE(FF_SLICE_CHICKEN_CL_PROVOKING_VERTEX_FIX);
1558+
1559+ /* BSpec: 11299 */
1560+ *batch++ = i915_mmio_reg_offset(_3D_CHICKEN3);
1561+ *batch++ = _MASKED_BIT_ENABLE(_3D_CHICKEN_SF_PROVOKING_VERTEX_FIX);
1562+
15531563 *batch++ = MI_NOOP;
15541564
15551565 /* WaClearSlmSpaceAtContextSwitch:kbl */
@@ -2641,10 +2651,8 @@ static int execlists_context_deferred_alloc(struct i915_gem_context *ctx, · 1085 unmodified lines
26412651 context_size += LRC_HEADER_PAGES * PAGE_SIZE;
26422652
26432653 ctx_obj = i915_gem_object_create(ctx->i915, context_size);
2644− if (IS_ERR(ctx_obj)) {
2645− ret = PTR_ERR(ctx_obj);
2646− goto error_deref_obj;
2647− }
2654+ if (IS_ERR(ctx_obj))
2655+ return PTR_ERR(ctx_obj);
26482656
26492657 vma = i915_vma_instance(ctx_obj, &ctx->i915->ggtt.base, NULL);
26502658 if (IS_ERR(vma)) {
drivers/gpu/drm/i915/intel_lvds.c+5−0
@@ -380,6 +380,8 @@ intel_lvds_mode_valid(struct drm_connector *connector, · 379 unmodified lines
380380 struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
381381 int max_pixclk = to_i915(connector->dev)->max_dotclk_freq;
382382
383+ if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
384+ return MODE_NO_DBLESCAN;
383385 if (mode->hdisplay > fixed_mode->hdisplay)
384386 return MODE_PANEL;
385387 if (mode->vdisplay > fixed_mode->vdisplay)
@@ -429,6 +431,9 @@ static bool intel_lvds_compute_config(struct intel_encoder *intel_encoder, · 43 unmodified lines
429431 intel_fixed_panel_mode(intel_connector->panel.fixed_mode,
430432 adjusted_mode);
431433
434+ if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
435+ return false;
436+
432437 if (HAS_PCH_SPLIT(dev_priv)) {
433438 pipe_config->has_pch_encoder = true;
434439
drivers/gpu/drm/i915/intel_sdvo.c+6−0
@@ -1160,6 +1160,9 @@ static bool intel_sdvo_compute_config(struct intel_encoder *encoder, · 1159 unmodified lines
11601160 adjusted_mode);
11611161 }
11621162
1163+ if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
1164+ return false;
1165+
11631166 /*
11641167 * Make the CRTC code factor in the SDVO pixel multiplier. The
11651168 * SDVO device will factor out the multiplier during mode_set.
@@ -1621,6 +1624,9 @@ intel_sdvo_mode_valid(struct drm_connector *connector, · 455 unmodified lines
16211624 struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector);
16221625 int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
16231626
1627+ if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
1628+ return MODE_NO_DBLESCAN;
1629+
16241630 if (intel_sdvo->pixel_clock_min > mode->clock)
16251631 return MODE_CLOCK_LOW;
16261632
drivers/gpu/drm/i915/intel_tv.c+10−2
@@ -850,6 +850,9 @@ intel_tv_mode_valid(struct drm_connector *connector, · 849 unmodified lines
850850 const struct tv_mode *tv_mode = intel_tv_mode_find(connector->state);
851851 int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
852852
853+ if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
854+ return MODE_NO_DBLESCAN;
855+
853856 if (mode->clock > max_dotclk)
854857 return MODE_CLOCK_HIGH;
855858
@@ -877,16 +880,21 @@ intel_tv_compute_config(struct intel_encoder *encoder, · 21 unmodified lines
877880 struct drm_connector_state *conn_state)
878881 {
879882 const struct tv_mode *tv_mode = intel_tv_mode_find(conn_state);
883+ struct drm_display_mode *adjusted_mode =
884+ &pipe_config->base.adjusted_mode;
880885
881886 if (!tv_mode)
882887 return false;
883888
884− pipe_config->base.adjusted_mode.crtc_clock = tv_mode->clock;
889+ if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
890+ return false;
891+
892+ adjusted_mode->crtc_clock = tv_mode->clock;
885893 DRM_DEBUG_KMS("forcing bpc to 8 for TV\n");
886894 pipe_config->pipe_bpp = 8*3;
887895
888896 /* TV has it's own notion of sync and other mode flags, so clear them. */
889− pipe_config->base.adjusted_mode.flags = 0;
897+ adjusted_mode->flags = 0;
890898
891899 /*
892900 * FIXME: We don't check whether the input mode is actually what we want
drivers/gpu/drm/imx/imx-ldb.c+6−3
@@ -612,6 +612,9 @@ static int imx_ldb_bind(struct device *dev, struct device *master, void *data) · 611 unmodified lines
612612 return PTR_ERR(imx_ldb->regmap);
613613 }
614614
615+ /* disable LDB by resetting the control register to POR default */
616+ regmap_write(imx_ldb->regmap, IOMUXC_GPR2, 0);
617+
615618 imx_ldb->dev = dev;
616619
617620 if (of_id)
@@ -652,14 +655,14 @@ static int imx_ldb_bind(struct device *dev, struct device *master, void *data) · 34 unmodified lines
652655 if (ret || i < 0 || i > 1)
653656 return -EINVAL;
654657
658+ if (!of_device_is_available(child))
659+ continue;
660+
655661 if (dual && i > 0) {
656662 dev_warn(dev, "dual-channel mode, ignoring second output\n");
657663 continue;
658664 }
659665
660− if (!of_device_is_available(child))
661− continue;
662−
663666 channel = &imx_ldb->channel[i];
664667 channel->ldb = imx_ldb;
665668 channel->chno = i;
drivers/gpu/drm/meson/meson_drv.c+8−4
@@ -197,8 +197,10 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) · 196 unmodified lines
197197 priv->io_base = regs;
198198
199199 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "hhi");
200− if (!res)
201− return -EINVAL;
200+ if (!res) {
201+ ret = -EINVAL;
202+ goto free_drm;
203+ }
202204 /* Simply ioremap since it may be a shared register zone */
203205 regs = devm_ioremap(dev, res->start, resource_size(res));
204206 if (!regs) {
@@ -215,8 +217,10 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) · 10 unmodified lines
215217 }
216218
217219 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dmc");
218− if (!res)
219− return -EINVAL;
220+ if (!res) {
221+ ret = -EINVAL;
222+ goto free_drm;
223+ }
220224 /* Simply ioremap since it may be a shared register zone */
221225 regs = devm_ioremap(dev, res->start, resource_size(res));
222226 if (!regs) {
drivers/gpu/drm/nouveau/dispnv04/disp.c+3−0
@@ -55,6 +55,9 @@ nv04_display_create(struct drm_device *dev) · 54 unmodified lines
5555 nouveau_display(dev)->init = nv04_display_init;
5656 nouveau_display(dev)->fini = nv04_display_fini;
5757
58+ /* Pre-nv50 doesn't support atomic, so don't expose the ioctls */
59+ dev->driver->driver_features &= ~DRIVER_ATOMIC;
60+
5861 nouveau_hw_save_vga_fonts(dev, 1);
5962
6063 nv04_crtc_create(dev, 0);
drivers/gpu/drm/nouveau/dispnv50/curs507a.c+1−1
@@ -132,7 +132,7 @@ curs507a_new_(const struct nv50_wimm_func *func, struct nouveau_drm *drm, · 131 unmodified lines
132132
133133 nvif_object_map(&wndw->wimm.base.user, NULL, 0);
134134 wndw->immd = func;
135− wndw->ctxdma.parent = &disp->core->chan.base.user;
135+ wndw->ctxdma.parent = NULL;
136136 return 0;
137137 }
138138
drivers/gpu/drm/nouveau/dispnv50/disp.c+27−26
@@ -1585,8 +1585,9 @@ nv50_pior_create(struct drm_connector *connector, struct dcb_output *dcbe) · 1584 unmodified lines
15851585 *****************************************************************************/
15861586
15871587 static void
1588−nv50_disp_atomic_commit_core(struct nouveau_drm *drm, u32 *interlock)
1588+nv50_disp_atomic_commit_core(struct drm_atomic_state *state, u32 *interlock)
15891589 {
1590+ struct nouveau_drm *drm = nouveau_drm(state->dev);
15901591 struct nv50_disp *disp = nv50_disp(drm->dev);
15911592 struct nv50_core *core = disp->core;
15921593 struct nv50_mstm *mstm;
@@ -1617,6 +1618,22 @@ nv50_disp_atomic_commit_core(struct nouveau_drm *drm, u32 *interlock) · 24 unmodified lines
16171618 }
16181619 }
16191620
1621+static void
1622+nv50_disp_atomic_commit_wndw(struct drm_atomic_state *state, u32 *interlock)
1623+{
1624+ struct drm_plane_state *new_plane_state;
1625+ struct drm_plane *plane;
1626+ int i;
1627+
1628+ for_each_new_plane_in_state(state, plane, new_plane_state, i) {
1629+ struct nv50_wndw *wndw = nv50_wndw(plane);
1630+ if (interlock[wndw->interlock.type] & wndw->interlock.data) {
1631+ if (wndw->func->update)
1632+ wndw->func->update(wndw, interlock);
1633+ }
1634+ }
1635+}
1636+
16201637 static void
16211638 nv50_disp_atomic_commit_tail(struct drm_atomic_state *state)
16221639 {
@@ -1684,7 +1701,8 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) · 61 unmodified lines
16841701 help->disable(encoder);
16851702 interlock[NV50_DISP_INTERLOCK_CORE] |= 1;
16861703 if (outp->flush_disable) {
1687− nv50_disp_atomic_commit_core(drm, interlock);
1704+ nv50_disp_atomic_commit_wndw(state, interlock);
1705+ nv50_disp_atomic_commit_core(state, interlock);
16881706 memset(interlock, 0x00, sizeof(interlock));
16891707 }
16901708 }
@@ -1693,15 +1711,8 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) · 2 unmodified lines
16931711 /* Flush disable. */
16941712 if (interlock[NV50_DISP_INTERLOCK_CORE]) {
16951713 if (atom->flush_disable) {
1696− for_each_new_plane_in_state(state, plane, new_plane_state, i) {
1697− struct nv50_wndw *wndw = nv50_wndw(plane);
1698− if (interlock[wndw->interlock.type] & wndw->interlock.data) {
1699− if (wndw->func->update)
1700− wndw->func->update(wndw, interlock);
1701− }
1702− }
1703−
1704− nv50_disp_atomic_commit_core(drm, interlock);
1714+ nv50_disp_atomic_commit_wndw(state, interlock);
1715+ nv50_disp_atomic_commit_core(state, interlock);
17051716 memset(interlock, 0x00, sizeof(interlock));
17061717 }
17071718 }
@@ -1762,18 +1773,14 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) · 54 unmodified lines
17621773 }
17631774
17641775 /* Flush update. */
1765− for_each_new_plane_in_state(state, plane, new_plane_state, i) {
1766− struct nv50_wndw *wndw = nv50_wndw(plane);
1767− if (interlock[wndw->interlock.type] & wndw->interlock.data) {
1768− if (wndw->func->update)
1769− wndw->func->update(wndw, interlock);
1770− }
1771− }
1776+ nv50_disp_atomic_commit_wndw(state, interlock);
17721777
17731778 if (interlock[NV50_DISP_INTERLOCK_CORE]) {
17741779 if (interlock[NV50_DISP_INTERLOCK_BASE] ||
1780+ interlock[NV50_DISP_INTERLOCK_OVLY] ||
1781+ interlock[NV50_DISP_INTERLOCK_WNDW] ||
17751782 !atom->state.legacy_cursor_update)
1776− nv50_disp_atomic_commit_core(drm, interlock);
1783+ nv50_disp_atomic_commit_core(state, interlock);
17771784 else
17781785 disp->core->func->update(disp->core, interlock, false);
17791786 }
@@ -1871,7 +1878,7 @@ nv50_disp_atomic_commit(struct drm_device *dev, · 91 unmodified lines
18711878 nv50_disp_atomic_commit_tail(state);
18721879
18731880 drm_for_each_crtc(crtc, dev) {
1874− if (crtc->state->enable) {
1881+ if (crtc->state->active) {
18751882 if (!drm->have_disp_power_ref) {
18761883 drm->have_disp_power_ref = true;
18771884 return 0;
@@ -2119,10 +2126,6 @@ nv50_display_destroy(struct drm_device *dev) · 241 unmodified lines
21192126 kfree(disp);
21202127 }
21212128
2122−MODULE_PARM_DESC(atomic, "Expose atomic ioctl (default: disabled)");
2123−static int nouveau_atomic = 0;
2124−module_param_named(atomic, nouveau_atomic, int, 0400);
2125−
21262129 int
21272130 nv50_display_create(struct drm_device *dev)
21282131 {
@@ -2147,8 +2150,6 @@ nv50_display_create(struct drm_device *dev) · 18 unmodified lines
21472150 disp->disp = &nouveau_display(dev)->disp;
21482151 dev->mode_config.funcs = &nv50_disp_func;
21492152 dev->driver->driver_features |= DRIVER_PREFER_XBGR_30BPP;
2150− if (nouveau_atomic)
2151− dev->driver->driver_features |= DRIVER_ATOMIC;
21522153
21532154 /* small shared memory area we use for notifiers and semaphores */
21542155 ret = nouveau_bo_new(&drm->client, 4096, 0x1000, TTM_PL_FLAG_VRAM,
drivers/gpu/drm/nouveau/dispnv50/wndw.c+8−5
@@ -444,14 +444,17 @@ nv50_wndw_prepare_fb(struct drm_plane *plane, struct drm_plane_state *state) · 443 unmodified lines
444444 if (ret)
445445 return ret;
446446
447− ctxdma = nv50_wndw_ctxdma_new(wndw, fb);
448− if (IS_ERR(ctxdma)) {
449− nouveau_bo_unpin(fb->nvbo);
450− return PTR_ERR(ctxdma);
447+ if (wndw->ctxdma.parent) {
448+ ctxdma = nv50_wndw_ctxdma_new(wndw, fb);
449+ if (IS_ERR(ctxdma)) {
450+ nouveau_bo_unpin(fb->nvbo);
451+ return PTR_ERR(ctxdma);
452+ }
453+
454+ asyw->image.handle[0] = ctxdma->object.handle;
451455 }
452456
453457 asyw->state.fence = reservation_object_get_excl_rcu(fb->nvbo->bo.resv);
454− asyw->image.handle[0] = ctxdma->object.handle;
455458 asyw->image.offset[0] = fb->nvbo->bo.offset;
456459
457460 if (wndw->func->prepare) {
drivers/gpu/drm/nouveau/nouveau_backlight.c+4−2
@@ -267,6 +267,7 @@ nouveau_backlight_init(struct drm_device *dev) · 266 unmodified lines
267267 struct nouveau_drm *drm = nouveau_drm(dev);
268268 struct nvif_device *device = &drm->client.device;
269269 struct drm_connector *connector;
270+ struct drm_connector_list_iter conn_iter;
270271
271272 INIT_LIST_HEAD(&drm->bl_connectors);
272273
@@ -275,7 +276,8 @@ nouveau_backlight_init(struct drm_device *dev) · 2 unmodified lines
275276 return 0;
276277 }
277278
278− list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
279+ drm_connector_list_iter_begin(dev, &conn_iter);
280+ drm_for_each_connector_iter(connector, &conn_iter) {
279281 if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS &&
280282 connector->connector_type != DRM_MODE_CONNECTOR_eDP)
281283 continue;
@@ -292,7 +294,7 @@ nouveau_backlight_init(struct drm_device *dev) · 10 unmodified lines
292294 break;
293295 }
294296 }
295−
297+ drm_connector_list_iter_end(&conn_iter);
296298
297299 return 0;
298300 }
drivers/gpu/drm/nouveau/nouveau_connector.c+7−2
@@ -1208,14 +1208,19 @@ nouveau_connector_create(struct drm_device *dev, int index) · 1207 unmodified lines
12081208 struct nouveau_display *disp = nouveau_display(dev);
12091209 struct nouveau_connector *nv_connector = NULL;
12101210 struct drm_connector *connector;
1211+ struct drm_connector_list_iter conn_iter;
12111212 int type, ret = 0;
12121213 bool dummy;
12131214
1214− list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
1215+ drm_connector_list_iter_begin(dev, &conn_iter);
1216+ nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) {
12151217 nv_connector = nouveau_connector(connector);
1216− if (nv_connector->index == index)
1218+ if (nv_connector->index == index) {
1219+ drm_connector_list_iter_end(&conn_iter);
12171220 return connector;
1221+ }
12181222 }
1223+ drm_connector_list_iter_end(&conn_iter);
12191224
12201225 nv_connector = kzalloc(sizeof(*nv_connector), GFP_KERNEL);
12211226 if (!nv_connector)
drivers/gpu/drm/nouveau/nouveau_connector.h+32−4
@@ -33,6 +33,7 @@ · 32 unmodified lines
3333 #include <drm/drm_encoder.h>
3434 #include <drm/drm_dp_helper.h>
3535 #include "nouveau_crtc.h"
36+#include "nouveau_encoder.h"
3637
3738 struct nvkm_i2c_port;
3839
@@ -60,19 +61,46 @@ static inline struct nouveau_connector *nouveau_connector( · 21 unmodified lines
6061 return container_of(con, struct nouveau_connector, base);
6162 }
6263
64+static inline bool
65+nouveau_connector_is_mst(struct drm_connector *connector)
66+{
67+ const struct nouveau_encoder *nv_encoder;
68+ const struct drm_encoder *encoder;
69+
70+ if (connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort)
71+ return false;
72+
73+ nv_encoder = find_encoder(connector, DCB_OUTPUT_ANY);
74+ if (!nv_encoder)
75+ return false;
76+
77+ encoder = &nv_encoder->base.base;
78+ return encoder->encoder_type == DRM_MODE_ENCODER_DPMST;
79+}
80+
81+#define nouveau_for_each_non_mst_connector_iter(connector, iter) \
82+ drm_for_each_connector_iter(connector, iter) \
83+ for_each_if(!nouveau_connector_is_mst(connector))
84+
6385 static inline struct nouveau_connector *
6486 nouveau_crtc_connector_get(struct nouveau_crtc *nv_crtc)
6587 {
6688 struct drm_device *dev = nv_crtc->base.dev;
6789 struct drm_connector *connector;
90+ struct drm_connector_list_iter conn_iter;
91+ struct nouveau_connector *nv_connector = NULL;
6892 struct drm_crtc *crtc = to_drm_crtc(nv_crtc);
6993
70− list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
71− if (connector->encoder && connector->encoder->crtc == crtc)
72− return nouveau_connector(connector);
94+ drm_connector_list_iter_begin(dev, &conn_iter);
95+ nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) {
96+ if (connector->encoder && connector->encoder->crtc == crtc) {
97+ nv_connector = nouveau_connector(connector);
98+ break;
99+ }
73100 }
101+ drm_connector_list_iter_end(&conn_iter);
74102
75− return NULL;
103+ return nv_connector;
76104 }
77105
78106 struct drm_connector *
drivers/gpu/drm/nouveau/nouveau_display.c+8−2
@@ -404,6 +404,7 @@ nouveau_display_init(struct drm_device *dev) · 403 unmodified lines
404404 struct nouveau_display *disp = nouveau_display(dev);
405405 struct nouveau_drm *drm = nouveau_drm(dev);
406406 struct drm_connector *connector;
407+ struct drm_connector_list_iter conn_iter;
407408 int ret;
408409
409410 ret = disp->init(dev);
@@ -411,10 +412,12 @@ nouveau_display_init(struct drm_device *dev) · 1 unmodified line
411412 return ret;
412413
413414 /* enable hotplug interrupts */
414− list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
415+ drm_connector_list_iter_begin(dev, &conn_iter);
416+ nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) {
415417 struct nouveau_connector *conn = nouveau_connector(connector);
416418 nvif_notify_get(&conn->hpd);
417419 }
420+ drm_connector_list_iter_end(&conn_iter);
418421
419422 /* enable flip completion events */
420423 nvif_notify_get(&drm->flip);
@@ -427,6 +430,7 @@ nouveau_display_fini(struct drm_device *dev, bool suspend) · 6 unmodified lines
427430 struct nouveau_display *disp = nouveau_display(dev);
428431 struct nouveau_drm *drm = nouveau_drm(dev);
429432 struct drm_connector *connector;
433+ struct drm_connector_list_iter conn_iter;
430434
431435 if (!suspend) {
432436 if (drm_drv_uses_atomic_modeset(dev))
@@ -439,10 +443,12 @@ nouveau_display_fini(struct drm_device *dev, bool suspend) · 6 unmodified lines
439443 nvif_notify_put(&drm->flip);
440444
441445 /* disable hotplug interrupts */
442− list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
446+ drm_connector_list_iter_begin(dev, &conn_iter);
447+ nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) {
443448 struct nouveau_connector *conn = nouveau_connector(connector);
444449 nvif_notify_put(&conn->hpd);
445450 }
451+ drm_connector_list_iter_end(&conn_iter);
446452
447453 drm_kms_helper_poll_disable(dev);
448454 disp->fini(dev);
drivers/gpu/drm/nouveau/nouveau_drm.c+7−11
@@ -81,6 +81,10 @@ MODULE_PARM_DESC(modeset, "enable driver (default: auto, " · 80 unmodified lines
8181 int nouveau_modeset = -1;
8282 module_param_named(modeset, nouveau_modeset, int, 0400);
8383
84+MODULE_PARM_DESC(atomic, "Expose atomic ioctl (default: disabled)");
85+static int nouveau_atomic = 0;
86+module_param_named(atomic, nouveau_atomic, int, 0400);
87+
8488 MODULE_PARM_DESC(runpm, "disable (0), force enable (1), optimus only default (-1)");
8589 static int nouveau_runtime_pm = -1;
8690 module_param_named(runpm, nouveau_runtime_pm, int, 0400);
@@ -509,6 +513,9 @@ static int nouveau_drm_probe(struct pci_dev *pdev, · 422 unmodified lines
509513
510514 pci_set_master(pdev);
511515
516+ if (nouveau_atomic)
517+ driver_pci.driver_features |= DRIVER_ATOMIC;
518+
512519 ret = drm_get_pci_dev(pdev, pent, &driver_pci);
513520 if (ret) {
514521 nvkm_device_del(&device);
@@ -874,22 +881,11 @@ nouveau_pmops_runtime_resume(struct device *dev) · 359 unmodified lines
874881 static int
875882 nouveau_pmops_runtime_idle(struct device *dev)
876883 {
877− struct pci_dev *pdev = to_pci_dev(dev);
878− struct drm_device *drm_dev = pci_get_drvdata(pdev);
879− struct nouveau_drm *drm = nouveau_drm(drm_dev);
880− struct drm_crtc *crtc;
881−
882884 if (!nouveau_pmops_runtime()) {
883885 pm_runtime_forbid(dev);
884886 return -EBUSY;
885887 }
886888
887− list_for_each_entry(crtc, &drm->dev->mode_config.crtc_list, head) {
888− if (crtc->enabled) {
889− DRM_DEBUG_DRIVER("failing to power off - crtc active\n");
890− return -EBUSY;
891− }
892− }
893889 pm_runtime_mark_last_busy(dev);
894890 pm_runtime_autosuspend(dev);
895891 /* we don't want the main rpm_idle to call suspend - we want to autosuspend */
drivers/gpu/drm/nouveau/nouveau_gem.c+2−2
@@ -616,7 +616,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli, · 615 unmodified lines
616616 struct nouveau_bo *nvbo;
617617 uint32_t data;
618618
619− if (unlikely(r->bo_index > req->nr_buffers)) {
619+ if (unlikely(r->bo_index >= req->nr_buffers)) {
620620 NV_PRINTK(err, cli, "reloc bo index invalid\n");
621621 ret = -EINVAL;
622622 break;
@@ -626,7 +626,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli, · 3 unmodified lines
626626 if (b->presumed.valid)
627627 continue;
628628
629− if (unlikely(r->reloc_bo_index > req->nr_buffers)) {
629+ if (unlikely(r->reloc_bo_index >= req->nr_buffers)) {
630630 NV_PRINTK(err, cli, "reloc container bo index invalid\n");
631631 ret = -EINVAL;
632632 break;
drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c+3−0
@@ -140,6 +140,9 @@ nvkm_fb_init(struct nvkm_subdev *subdev) · 139 unmodified lines
140140 if (fb->func->init)
141141 fb->func->init(fb);
142142
143+ if (fb->func->init_remapper)
144+ fb->func->init_remapper(fb);
145+
143146 if (fb->func->init_page) {
144147 ret = fb->func->init_page(fb);
145148 if (WARN_ON(ret))
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp100.c+9−0
@@ -36,6 +36,14 @@ gp100_fb_init_unkn(struct nvkm_fb *base) · 35 unmodified lines
3636 nvkm_wr32(device, 0x1faccc, nvkm_rd32(device, 0x100ccc));
3737 }
3838
39+void
40+gp100_fb_init_remapper(struct nvkm_fb *fb)
41+{
42+ struct nvkm_device *device = fb->subdev.device;
43+ /* Disable address remapper. */
44+ nvkm_mask(device, 0x100c14, 0x00040000, 0x00000000);
45+}
46+
3947 void
4048 gp100_fb_init(struct nvkm_fb *base)
4149 {
@@ -56,6 +64,7 @@ gp100_fb = { · 14 unmodified lines
5664 .dtor = gf100_fb_dtor,
5765 .oneinit = gf100_fb_oneinit,
5866 .init = gp100_fb_init,
67+ .init_remapper = gp100_fb_init_remapper,
5968 .init_page = gm200_fb_init_page,
6069 .init_unkn = gp100_fb_init_unkn,
6170 .ram_new = gp100_ram_new,
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp102.c+1−0
@@ -31,6 +31,7 @@ gp102_fb = { · 30 unmodified lines
3131 .dtor = gf100_fb_dtor,
3232 .oneinit = gf100_fb_oneinit,
3333 .init = gp100_fb_init,
34+ .init_remapper = gp100_fb_init_remapper,
3435 .init_page = gm200_fb_init_page,
3536 .ram_new = gp100_ram_new,
3637 };
drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h+2−0
@@ -11,6 +11,7 @@ struct nvkm_fb_func { · 10 unmodified lines
1111 u32 (*tags)(struct nvkm_fb *);
1212 int (*oneinit)(struct nvkm_fb *);
1313 void (*init)(struct nvkm_fb *);
14+ void (*init_remapper)(struct nvkm_fb *);
1415 int (*init_page)(struct nvkm_fb *);
1516 void (*init_unkn)(struct nvkm_fb *);
1617 void (*intr)(struct nvkm_fb *);
@@ -69,5 +70,6 @@ int gf100_fb_init_page(struct nvkm_fb *); · 52 unmodified lines
6970
7071 int gm200_fb_init_page(struct nvkm_fb *);
7172
73+void gp100_fb_init_remapper(struct nvkm_fb *);
7274 void gp100_fb_init_unkn(struct nvkm_fb *);
7375 #endif
drivers/gpu/drm/qxl/qxl_display.c+5−2
@@ -623,7 +623,7 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane, · 622 unmodified lines
623623 struct qxl_cursor_cmd *cmd;
624624 struct qxl_cursor *cursor;
625625 struct drm_gem_object *obj;
626− struct qxl_bo *cursor_bo = NULL, *user_bo = NULL;
626+ struct qxl_bo *cursor_bo = NULL, *user_bo = NULL, *old_cursor_bo = NULL;
627627 int ret;
628628 void *user_ptr;
629629 int size = 64*64*4;
@@ -677,7 +677,7 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane, · 47 unmodified lines
677677 cursor_bo, 0);
678678 cmd->type = QXL_CURSOR_SET;
679679
680− qxl_bo_unref(&qcrtc->cursor_bo);
680+ old_cursor_bo = qcrtc->cursor_bo;
681681 qcrtc->cursor_bo = cursor_bo;
682682 cursor_bo = NULL;
683683 } else {
@@ -697,6 +697,9 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane, · 13 unmodified lines
697697 qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
698698 qxl_release_fence_buffer_objects(release);
699699
700+ if (old_cursor_bo)
701+ qxl_bo_unref(&old_cursor_bo);
702+
700703 qxl_bo_unref(&cursor_bo);
701704
702705 return;
drivers/gpu/drm/sun4i/Makefile+4−1
@@ -32,7 +32,10 @@ obj-$(CONFIG_DRM_SUN4I) += sun4i-tcon.o · 31 unmodified lines
3232 obj-$(CONFIG_DRM_SUN4I) += sun4i_tv.o
3333 obj-$(CONFIG_DRM_SUN4I) += sun6i_drc.o
3434
35−obj-$(CONFIG_DRM_SUN4I_BACKEND) += sun4i-backend.o sun4i-frontend.o
35+obj-$(CONFIG_DRM_SUN4I_BACKEND) += sun4i-backend.o
36+ifdef CONFIG_DRM_SUN4I_BACKEND
37+obj-$(CONFIG_DRM_SUN4I) += sun4i-frontend.o
38+endif
3639 obj-$(CONFIG_DRM_SUN4I_HDMI) += sun4i-drm-hdmi.o
3740 obj-$(CONFIG_DRM_SUN6I_DSI) += sun6i-dsi.o
3841 obj-$(CONFIG_DRM_SUN8I_DW_HDMI) += sun8i-drm-hdmi.o
drivers/gpu/drm/sun4i/sun4i_tcon.c+0−25
@@ -17,7 +17,6 @@ · 16 unmodified lines
1717 #include <drm/drm_encoder.h>
1818 #include <drm/drm_modes.h>
1919 #include <drm/drm_of.h>
20−#include <drm/drm_panel.h>
2120
2221 #include <uapi/drm/drm_mode.h>
2322
@@ -418,9 +417,6 @@ static void sun4i_tcon0_mode_set_lvds(struct sun4i_tcon *tcon, · 394 unmodified lines
418417 static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon,
419418 const struct drm_display_mode *mode)
420419 {
421− struct drm_panel *panel = tcon->panel;
422− struct drm_connector *connector = panel->connector;
423− struct drm_display_info display_info = connector->display_info;
424420 unsigned int bp, hsync, vsync;
425421 u8 clk_delay;
426422 u32 val = 0;
@@ -478,27 +474,6 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon, · 51 unmodified lines
478474 if (mode->flags & DRM_MODE_FLAG_PVSYNC)
479475 val |= SUN4I_TCON0_IO_POL_VSYNC_POSITIVE;
480476
481− /*
482− * On A20 and similar SoCs, the only way to achieve Positive Edge
483− * (Rising Edge), is setting dclk clock phase to 2/3(240°).
484− * By default TCON works in Negative Edge(Falling Edge),
485− * this is why phase is set to 0 in that case.
486− * Unfortunately there's no way to logically invert dclk through
487− * IO_POL register.
488− * The only acceptable way to work, triple checked with scope,
489− * is using clock phase set to 0° for Negative Edge and set to 240°
490− * for Positive Edge.
491− * On A33 and similar SoCs there would be a 90° phase option,
492− * but it divides also dclk by 2.
493− * Following code is a way to avoid quirks all around TCON
494− * and DOTCLOCK drivers.
495− */
496− if (display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_POSEDGE)
497− clk_set_phase(tcon->dclk, 240);
498−
499− if (display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_NEGEDGE)
500− clk_set_phase(tcon->dclk, 0);
501−
502477 regmap_update_bits(tcon->regs, SUN4I_TCON0_IO_POL_REG,
503478 SUN4I_TCON0_IO_POL_HSYNC_POSITIVE | SUN4I_TCON0_IO_POL_VSYNC_POSITIVE,
504479 val);
drivers/gpu/drm/tegra/drm.c+1−1
@@ -398,7 +398,7 @@ int tegra_drm_submit(struct tegra_drm_context *context, · 397 unmodified lines
398398 * unaligned offset is malformed and cause commands stream
399399 * corruption on the buffer address relocation.
400400 */
401− if (offset & 3 || offset >= obj->gem.size) {
401+ if (offset & 3 || offset > obj->gem.size) {
402402 err = -EINVAL;
403403 goto fail;
404404 }
drivers/gpu/drm/udl/udl_fb.c+4−1
@@ -137,7 +137,10 @@ int udl_handle_damage(struct udl_framebuffer *fb, int x, int y, · 136 unmodified lines
137137
138138 if (cmd > (char *) urb->transfer_buffer) {
139139 /* Send partial buffer remaining before exiting */
140− int len = cmd - (char *) urb->transfer_buffer;
140+ int len;
141+ if (cmd < (char *) urb->transfer_buffer + urb->transfer_buffer_length)
142+ *cmd++ = 0xAF;
143+ len = cmd - (char *) urb->transfer_buffer;
141144 ret = udl_submit_urb(dev, urb, len);
142145 bytes_sent += len;
143146 } else
drivers/gpu/drm/udl/udl_transfer.c+7−4
@@ -153,11 +153,11 @@ static void udl_compress_hline16( · 152 unmodified lines
153153 raw_pixels_count_byte = cmd++; /* we'll know this later */
154154 raw_pixel_start = pixel;
155155
156− cmd_pixel_end = pixel + (min(MAX_CMD_PIXELS + 1,
157− min((int)(pixel_end - pixel) / bpp,
158− (int)(cmd_buffer_end - cmd) / 2))) * bpp;
156+ cmd_pixel_end = pixel + min3(MAX_CMD_PIXELS + 1UL,
157+ (unsigned long)(pixel_end - pixel) / bpp,
158+ (unsigned long)(cmd_buffer_end - 1 - cmd) / 2) * bpp;
159159
160− prefetch_range((void *) pixel, (cmd_pixel_end - pixel) * bpp);
160+ prefetch_range((void *) pixel, cmd_pixel_end - pixel);
161161 pixel_val16 = get_pixel_val16(pixel, bpp);
162162
163163 while (pixel < cmd_pixel_end) {
@@ -193,6 +193,9 @@ static void udl_compress_hline16( · 29 unmodified lines
193193 if (pixel > raw_pixel_start) {
194194 /* finalize last RAW span */
195195 *raw_pixels_count_byte = ((pixel-raw_pixel_start) / bpp) & 0xFF;
196+ } else {
197+ /* undo unused byte */
198+ cmd--;
196199 }
197200
198201 *cmd_pixels_count_byte = ((pixel - cmd_pixel_start) / bpp) & 0xFF;
drivers/gpu/drm/vc4/vc4_plane.c+3−0
@@ -320,6 +320,9 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) · 319 unmodified lines
320320 vc4_state->x_scaling[0] = VC4_SCALING_TPZ;
321321 if (vc4_state->y_scaling[0] == VC4_SCALING_NONE)
322322 vc4_state->y_scaling[0] = VC4_SCALING_TPZ;
323+ } else {
324+ vc4_state->x_scaling[1] = VC4_SCALING_NONE;
325+ vc4_state->y_scaling[1] = VC4_SCALING_NONE;
323326 }
324327
325328 vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE &&
drivers/gpu/host1x/dev.c+3−0
@@ -218,6 +218,9 @@ static int host1x_probe(struct platform_device *pdev) · 217 unmodified lines
218218 return err;
219219 }
220220
221+ if (IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL))
222+ goto skip_iommu;
223+
221224 host->group = iommu_group_get(&pdev->dev);
222225 if (host->group) {
223226 struct iommu_domain_geometry *geometry;
drivers/gpu/host1x/job.c+2−1
@@ -569,7 +569,8 @@ void host1x_job_unpin(struct host1x_job *job) · 568 unmodified lines
569569 for (i = 0; i < job->num_unpins; i++) {
570570 struct host1x_job_unpin_data *unpin = &job->unpins[i];
571571
572− if (!IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL) && host->domain) {
572+ if (!IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL) &&
573+ unpin->size && host->domain) {
573574 iommu_unmap(host->domain, job->addr_phys[i],
574575 unpin->size);
575576 free_iova(&host->iova,
drivers/gpu/ipu-v3/ipu-csi.c+2−1
@@ -339,7 +339,8 @@ static void fill_csi_bus_cfg(struct ipu_csi_bus_config *csicfg, · 338 unmodified lines
339339 break;
340340 case V4L2_MBUS_BT656:
341341 csicfg->ext_vsync = 0;
342− if (V4L2_FIELD_HAS_BOTH(mbus_fmt->field))
342+ if (V4L2_FIELD_HAS_BOTH(mbus_fmt->field) ||
343+ mbus_fmt->field == V4L2_FIELD_ALTERNATE)
343344 csicfg->clk_mode = IPU_CSI_CLK_MODE_CCIR656_INTERLACED;
344345 else
345346 csicfg->clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE;
drivers/hid/hid-core.c+4−1
@@ -1952,6 +1952,8 @@ static int hid_device_probe(struct device *dev) · 1951 unmodified lines
19521952 }
19531953 hdev->io_started = false;
19541954
1955+ clear_bit(ffs(HID_STAT_REPROBED), &hdev->status);
1956+
19551957 if (!hdev->driver) {
19561958 id = hid_match_device(hdev, hdrv);
19571959 if (id == NULL) {
@@ -2215,7 +2217,8 @@ static int __hid_bus_reprobe_drivers(struct device *dev, void *data) · 257 unmodified lines
22152217 struct hid_device *hdev = to_hid_device(dev);
22162218
22172219 if (hdev->driver == hdrv &&
2218− !hdrv->match(hdev, hid_ignore_special_drivers))
2220+ !hdrv->match(hdev, hid_ignore_special_drivers) &&
2221+ !test_and_set_bit(ffs(HID_STAT_REPROBED), &hdev->status))
22192222 return device_reprobe(dev);
22202223
22212224 return 0;
drivers/hid/hid-debug.c+7−1
@@ -1154,6 +1154,8 @@ copy_rest: · 1153 unmodified lines
11541154 goto out;
11551155 if (list->tail > list->head) {
11561156 len = list->tail - list->head;
1157+ if (len > count)
1158+ len = count;
11571159
11581160 if (copy_to_user(buffer + ret, &list->hid_debug_buf[list->head], len)) {
11591161 ret = -EFAULT;
@@ -1163,6 +1165,8 @@ copy_rest: · 3 unmodified lines
11631165 list->head += len;
11641166 } else {
11651167 len = HID_DEBUG_BUFSIZE - list->head;
1168+ if (len > count)
1169+ len = count;
11661170
11671171 if (copy_to_user(buffer, &list->hid_debug_buf[list->head], len)) {
11681172 ret = -EFAULT;
@@ -1170,7 +1174,9 @@ copy_rest: · 1 unmodified line
11701174 }
11711175 list->head = 0;
11721176 ret += len;
1173− goto copy_rest;
1177+ count -= len;
1178+ if (count > 0)
1179+ goto copy_rest;
11741180 }
11751181
11761182 }
drivers/hid/hid-google-hammer.c+2−0
@@ -124,6 +124,8 @@ static const struct hid_device_id hammer_devices[] = { · 123 unmodified lines
124124 USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_STAFF) },
125125 { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC,
126126 USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_WAND) },
127+ { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC,
128+ USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_WHISKERS) },
127129 { }
128130 };
129131 MODULE_DEVICE_TABLE(hid, hammer_devices);
drivers/hid/hid-ids.h+1−0
@@ -452,6 +452,7 @@ · 451 unmodified lines
452452 #define USB_DEVICE_ID_GOOGLE_TOUCH_ROSE 0x5028
453453 #define USB_DEVICE_ID_GOOGLE_STAFF 0x502b
454454 #define USB_DEVICE_ID_GOOGLE_WAND 0x502d
455+#define USB_DEVICE_ID_GOOGLE_WHISKERS 0x5030
455456
456457 #define USB_VENDOR_ID_GOTOP 0x08f2
457458 #define USB_DEVICE_ID_SUPER_Q2 0x007f
drivers/hid/hid-steam.c+5−5
@@ -573,7 +573,7 @@ static bool steam_is_valve_interface(struct hid_device *hdev) · 572 unmodified lines
573573
574574 static int steam_client_ll_parse(struct hid_device *hdev)
575575 {
576− struct steam_device *steam = hid_get_drvdata(hdev);
576+ struct steam_device *steam = hdev->driver_data;
577577
578578 return hid_parse_report(hdev, steam->hdev->dev_rdesc,
579579 steam->hdev->dev_rsize);
@@ -590,7 +590,7 @@ static void steam_client_ll_stop(struct hid_device *hdev) · 10 unmodified lines
590590
591591 static int steam_client_ll_open(struct hid_device *hdev)
592592 {
593− struct steam_device *steam = hid_get_drvdata(hdev);
593+ struct steam_device *steam = hdev->driver_data;
594594 int ret;
595595
596596 ret = hid_hw_open(steam->hdev);
@@ -605,7 +605,7 @@ static int steam_client_ll_open(struct hid_device *hdev) · 8 unmodified lines
605605
606606 static void steam_client_ll_close(struct hid_device *hdev)
607607 {
608− struct steam_device *steam = hid_get_drvdata(hdev);
608+ struct steam_device *steam = hdev->driver_data;
609609
610610 mutex_lock(&steam->mutex);
611611 steam->client_opened = false;
@@ -623,7 +623,7 @@ static int steam_client_ll_raw_request(struct hid_device *hdev, · 11 unmodified lines
623623 size_t count, unsigned char report_type,
624624 int reqtype)
625625 {
626− struct steam_device *steam = hid_get_drvdata(hdev);
626+ struct steam_device *steam = hdev->driver_data;
627627
628628 return hid_hw_raw_request(steam->hdev, reportnum, buf, count,
629629 report_type, reqtype);
@@ -710,7 +710,7 @@ static int steam_probe(struct hid_device *hdev, · 80 unmodified lines
710710 ret = PTR_ERR(steam->client_hdev);
711711 goto client_hdev_fail;
712712 }
713− hid_set_drvdata(steam->client_hdev, steam);
713+ steam->client_hdev->driver_data = steam;
714714
715715 /*
716716 * With the real steam controller interface, do not connect hidraw.
drivers/hid/i2c-hid/i2c-hid.c+1−1
@@ -484,7 +484,7 @@ static void i2c_hid_get_input(struct i2c_hid *ihid) · 483 unmodified lines
484484 return;
485485 }
486486
487− if ((ret_size > size) || (ret_size <= 2)) {
487+ if ((ret_size > size) || (ret_size < 2)) {
488488 dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n",
489489 __func__, size, ret_size);
490490 return;
drivers/hid/intel-ish-hid/ipc/pci-ish.c+7−15
@@ -205,8 +205,7 @@ static void ish_remove(struct pci_dev *pdev) · 204 unmodified lines
205205 kfree(ishtp_dev);
206206 }
207207
208−#ifdef CONFIG_PM
209−static struct device *ish_resume_device;
208+static struct device __maybe_unused *ish_resume_device;
210209
211210 /* 50ms to get resume response */
212211 #define WAIT_FOR_RESUME_ACK_MS 50
@@ -220,7 +219,7 @@ static struct device *ish_resume_device; · 7 unmodified lines
220219 * in that case a simple resume message is enough, others we need
221220 * a reset sequence.
222221 */
223−static void ish_resume_handler(struct work_struct *work)
222+static void __maybe_unused ish_resume_handler(struct work_struct *work)
224223 {
225224 struct pci_dev *pdev = to_pci_dev(ish_resume_device);
226225 struct ishtp_device *dev = pci_get_drvdata(pdev);
@@ -262,7 +261,7 @@ static void ish_resume_handler(struct work_struct *work) · 35 unmodified lines
262261 *
263262 * Return: 0 to the pm core
264263 */
265−static int ish_suspend(struct device *device)
264+static int __maybe_unused ish_suspend(struct device *device)
266265 {
267266 struct pci_dev *pdev = to_pci_dev(device);
268267 struct ishtp_device *dev = pci_get_drvdata(pdev);
@@ -288,7 +287,7 @@ static int ish_suspend(struct device *device) · 19 unmodified lines
288287 return 0;
289288 }
290289
291−static DECLARE_WORK(resume_work, ish_resume_handler);
290+static __maybe_unused DECLARE_WORK(resume_work, ish_resume_handler);
292291 /**
293292 * ish_resume() - ISH resume callback
294293 * @device: device pointer
@@ -297,7 +296,7 @@ static DECLARE_WORK(resume_work, ish_resume_handler); · 2 unmodified lines
297296 *
298297 * Return: 0 to the pm core
299298 */
300−static int ish_resume(struct device *device)
299+static int __maybe_unused ish_resume(struct device *device)
301300 {
302301 struct pci_dev *pdev = to_pci_dev(device);
303302 struct ishtp_device *dev = pci_get_drvdata(pdev);
@@ -311,21 +310,14 @@ static int ish_resume(struct device *device) · 7 unmodified lines
311310 return 0;
312311 }
313312
314−static const struct dev_pm_ops ish_pm_ops = {
315− .suspend = ish_suspend,
316− .resume = ish_resume,
317−};
318−#define ISHTP_ISH_PM_OPS (&ish_pm_ops)
319−#else
320−#define ISHTP_ISH_PM_OPS NULL
321−#endif /* CONFIG_PM */
313+static SIMPLE_DEV_PM_OPS(ish_pm_ops, ish_suspend, ish_resume);
322314
323315 static struct pci_driver ish_driver = {
324316 .name = KBUILD_MODNAME,
325317 .id_table = ish_pci_tbl,
326318 .probe = ish_probe,
327319 .remove = ish_remove,
328− .driver.pm = ISHTP_ISH_PM_OPS,
320+ .driver.pm = &ish_pm_ops,
329321 };
330322
331323 module_pci_driver(ish_driver);
drivers/hid/usbhid/hiddev.c+11−0
@@ -36,6 +36,7 @@ · 35 unmodified lines
3636 #include <linux/hiddev.h>
3737 #include <linux/compat.h>
3838 #include <linux/vmalloc.h>
39+#include <linux/nospec.h>
3940 #include "usbhid.h"
4041
4142 #ifdef CONFIG_USB_DYNAMIC_MINORS
@@ -469,10 +470,14 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd, · 427 unmodified lines
469470
470471 if (uref->field_index >= report->maxfield)
471472 goto inval;
473+ uref->field_index = array_index_nospec(uref->field_index,
474+ report->maxfield);
472475
473476 field = report->field[uref->field_index];
474477 if (uref->usage_index >= field->maxusage)
475478 goto inval;
479+ uref->usage_index = array_index_nospec(uref->usage_index,
480+ field->maxusage);
476481
477482 uref->usage_code = field->usage[uref->usage_index].hid;
478483
@@ -499,6 +504,8 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd, · 20 unmodified lines
499504
500505 if (uref->field_index >= report->maxfield)
501506 goto inval;
507+ uref->field_index = array_index_nospec(uref->field_index,
508+ report->maxfield);
502509
503510 field = report->field[uref->field_index];
504511
@@ -753,6 +760,8 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · 248 unmodified lines
753760
754761 if (finfo.field_index >= report->maxfield)
755762 break;
763+ finfo.field_index = array_index_nospec(finfo.field_index,
764+ report->maxfield);
756765
757766 field = report->field[finfo.field_index];
758767 memset(&finfo, 0, sizeof(finfo));
@@ -797,6 +806,8 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · 38 unmodified lines
797806
798807 if (cinfo.index >= hid->maxcollection)
799808 break;
809+ cinfo.index = array_index_nospec(cinfo.index,
810+ hid->maxcollection);
800811
801812 cinfo.type = hid->collection[cinfo.index].type;
802813 cinfo.usage = hid->collection[cinfo.index].usage;
drivers/hid/wacom_sys.c+8−0
@@ -395,6 +395,14 @@ static void wacom_usage_mapping(struct hid_device *hdev, · 394 unmodified lines
395395 }
396396 }
397397
398+ /* 2nd-generation Intuos Pro Large has incorrect Y maximum */
399+ if (hdev->vendor == USB_VENDOR_ID_WACOM &&
400+ hdev->product == 0x0358 &&
401+ WACOM_PEN_FIELD(field) &&
402+ wacom_equivalent_usage(usage->hid) == HID_GD_Y) {
403+ field->logical_maximum = 43200;
404+ }
405+
398406 switch (usage->hid) {
399407 case HID_GD_X:
400408 features->x_max = field->logical_maximum;
drivers/hid/wacom_wac.c+8−2
@@ -3365,8 +3365,14 @@ void wacom_setup_device_quirks(struct wacom *wacom) · 3364 unmodified lines
33653365 if (features->type >= INTUOSHT && features->type <= BAMBOO_PT)
33663366 features->device_type |= WACOM_DEVICETYPE_PAD;
33673367
3368− features->x_max = 4096;
3369− features->y_max = 4096;
3368+ if (features->type == INTUOSHT2) {
3369+ features->x_max = features->x_max / 10;
3370+ features->y_max = features->y_max / 10;
3371+ }
3372+ else {
3373+ features->x_max = 4096;
3374+ features->y_max = 4096;
3375+ }
33703376 }
33713377 else if (features->pktlen == WACOM_PKGLEN_BBTOUCH) {
33723378 features->device_type |= WACOM_DEVICETYPE_PAD;
drivers/hwmon/dell-smm-hwmon.c+7−0
@@ -1074,6 +1074,13 @@ static struct dmi_system_id i8k_blacklist_fan_support_dmi_table[] __initdata = { · 1073 unmodified lines
10741074 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Vostro 3360"),
10751075 },
10761076 },
1077+ {
1078+ .ident = "Dell XPS13 9333",
1079+ .matches = {
1080+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
1081+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS13 9333"),
1082+ },
1083+ },
10771084 { }
10781085 };
10791086
drivers/hwmon/nct6775.c+1−1
@@ -4175,7 +4175,7 @@ static int nct6775_probe(struct platform_device *pdev) · 4174 unmodified lines
41754175 * The temperature is already monitored if the respective bit in <mask>
41764176 * is set.
41774177 */
4178− for (i = 0; i < 32; i++) {
4178+ for (i = 0; i < 31; i++) {
41794179 if (!(data->temp_mask & BIT(i + 1)))
41804180 continue;
41814181 if (!reg_temp_alternate[i])
drivers/i2c/algos/i2c-algo-bit.c+4−4
@@ -647,10 +647,10 @@ static int __i2c_bit_add_bus(struct i2c_adapter *adap, · 646 unmodified lines
647647 if (bit_adap->getscl == NULL)
648648 adap->quirks = &i2c_bit_quirk_no_clk_stretch;
649649
650− /* Bring bus to a known state. Looks like STOP if bus is not free yet */
651− setscl(bit_adap, 1);
652− udelay(bit_adap->udelay);
653− setsda(bit_adap, 1);
650+ /*
651+ * We tried forcing SCL/SDA to an initial state here. But that caused a
652+ * regression, sadly. Check Bugzilla #200045 for details.
653+ */
654654
655655 ret = add_adapter(adap);
656656 if (ret < 0)
drivers/i2c/busses/i2c-cht-wc.c+2−1
@@ -234,7 +234,8 @@ static const struct irq_chip cht_wc_i2c_irq_chip = { · 233 unmodified lines
234234 .name = "cht_wc_ext_chrg_irq_chip",
235235 };
236236
237−static const char * const bq24190_suppliers[] = { "fusb302-typec-source" };
237+static const char * const bq24190_suppliers[] = {
238+ "tcpm-source-psy-i2c-fusb302" };
238239
239240 static const struct property_entry bq24190_props[] = {
240241 PROPERTY_ENTRY_STRING_ARRAY("supplied-from", bq24190_suppliers),
drivers/i2c/busses/i2c-davinci.c+6−2
@@ -237,12 +237,16 @@ static void i2c_davinci_calc_clk_dividers(struct davinci_i2c_dev *dev) · 236 unmodified lines
237237 /*
238238 * It's not always possible to have 1 to 2 ratio when d=7, so fall back
239239 * to minimal possible clkh in this case.
240+ *
241+ * Note:
242+ * CLKH is not allowed to be 0, in this case I2C clock is not generated
243+ * at all
240244 */
241− if (clk >= clkl + d) {
245+ if (clk > clkl + d) {
242246 clkh = clk - clkl - d;
243247 clkl -= d;
244248 } else {
245− clkh = 0;
249+ clkh = 1;
246250 clkl = clk - (d << 1);
247251 }
248252
drivers/i2c/busses/i2c-gpio.c+2−2
@@ -279,9 +279,9 @@ static int i2c_gpio_probe(struct platform_device *pdev) · 278 unmodified lines
279279 * required for an I2C bus.
280280 */
281281 if (pdata->scl_is_open_drain)
282− gflags = GPIOD_OUT_LOW;
282+ gflags = GPIOD_OUT_HIGH;
283283 else
284− gflags = GPIOD_OUT_LOW_OPEN_DRAIN;
284+ gflags = GPIOD_OUT_HIGH_OPEN_DRAIN;
285285 priv->scl = i2c_gpio_get_desc(dev, "scl", 1, gflags);
286286 if (IS_ERR(priv->scl))
287287 return PTR_ERR(priv->scl);
drivers/i2c/busses/i2c-imx.c+2−3
@@ -368,6 +368,7 @@ static int i2c_imx_dma_xfer(struct imx_i2c_struct *i2c_imx, · 367 unmodified lines
368368 goto err_desc;
369369 }
370370
371+ reinit_completion(&dma->cmd_complete);
371372 txdesc->callback = i2c_imx_dma_callback;
372373 txdesc->callback_param = i2c_imx;
373374 if (dma_submit_error(dmaengine_submit(txdesc))) {
@@ -622,7 +623,6 @@ static int i2c_imx_dma_write(struct imx_i2c_struct *i2c_imx, · 248 unmodified lines
622623 * The first byte must be transmitted by the CPU.
623624 */
624625 imx_i2c_write_reg(i2c_8bit_addr_from_msg(msgs), i2c_imx, IMX_I2C_I2DR);
625− reinit_completion(&i2c_imx->dma->cmd_complete);
626626 time_left = wait_for_completion_timeout(
627627 &i2c_imx->dma->cmd_complete,
628628 msecs_to_jiffies(DMA_TIMEOUT));
@@ -681,7 +681,6 @@ static int i2c_imx_dma_read(struct imx_i2c_struct *i2c_imx, · 52 unmodified lines
681681 if (result)
682682 return result;
683683
684− reinit_completion(&i2c_imx->dma->cmd_complete);
685684 time_left = wait_for_completion_timeout(
686685 &i2c_imx->dma->cmd_complete,
687686 msecs_to_jiffies(DMA_TIMEOUT));
@@ -1010,7 +1009,7 @@ static int i2c_imx_init_recovery_info(struct imx_i2c_struct *i2c_imx, · 322 unmodified lines
10101009 i2c_imx->pinctrl_pins_gpio = pinctrl_lookup_state(i2c_imx->pinctrl,
10111010 "gpio");
10121011 rinfo->sda_gpiod = devm_gpiod_get(&pdev->dev, "sda", GPIOD_IN);
1013− rinfo->scl_gpiod = devm_gpiod_get(&pdev->dev, "scl", GPIOD_OUT_HIGH);
1012+ rinfo->scl_gpiod = devm_gpiod_get(&pdev->dev, "scl", GPIOD_OUT_HIGH_OPEN_DRAIN);
10141013
10151014 if (PTR_ERR(rinfo->sda_gpiod) == -EPROBE_DEFER ||
10161015 PTR_ERR(rinfo->scl_gpiod) == -EPROBE_DEFER) {
drivers/i2c/busses/i2c-rcar.c+51−3
@@ -32,6 +32,7 @@ · 31 unmodified lines
3232 #include <linux/of_device.h>
3333 #include <linux/platform_device.h>
3434 #include <linux/pm_runtime.h>
35+#include <linux/reset.h>
3536 #include <linux/slab.h>
3637
3738 /* register offsets */
@@ -111,8 +112,9 @@ · 73 unmodified lines
111112 #define ID_ARBLOST (1 << 3)
112113 #define ID_NACK (1 << 4)
113114 /* persistent flags */
115+#define ID_P_NO_RXDMA (1 << 30) /* HW forbids RXDMA sometimes */
114116 #define ID_P_PM_BLOCKED (1 << 31)
115−#define ID_P_MASK ID_P_PM_BLOCKED
117+#define ID_P_MASK (ID_P_PM_BLOCKED | ID_P_NO_RXDMA)
116118
117119 enum rcar_i2c_type {
118120 I2C_RCAR_GEN1,
@@ -141,6 +143,8 @@ struct rcar_i2c_priv { · 22 unmodified lines
141143 struct dma_chan *dma_rx;
142144 struct scatterlist sg;
143145 enum dma_data_direction dma_direction;
146+
147+ struct reset_control *rstc;
144148 };
145149
146150 #define rcar_i2c_priv_to_dev(p) ((p)->adap.dev.parent)
@@ -370,6 +374,11 @@ static void rcar_i2c_dma_unmap(struct rcar_i2c_priv *priv) · 223 unmodified lines
370374 dma_unmap_single(chan->device->dev, sg_dma_address(&priv->sg),
371375 sg_dma_len(&priv->sg), priv->dma_direction);
372376
377+ /* Gen3 can only do one RXDMA per transfer and we just completed it */
378+ if (priv->devtype == I2C_RCAR_GEN3 &&
379+ priv->dma_direction == DMA_FROM_DEVICE)
380+ priv->flags |= ID_P_NO_RXDMA;
381+
373382 priv->dma_direction = DMA_NONE;
374383 }
375384
@@ -407,8 +416,9 @@ static void rcar_i2c_dma(struct rcar_i2c_priv *priv) · 31 unmodified lines
407416 unsigned char *buf;
408417 int len;
409418
410− /* Do not use DMA if it's not available or for messages < 8 bytes */
411− if (IS_ERR(chan) || msg->len < 8 || !(msg->flags & I2C_M_DMA_SAFE))
419+ /* Do various checks to see if DMA is feasible at all */
420+ if (IS_ERR(chan) || msg->len < 8 || !(msg->flags & I2C_M_DMA_SAFE) ||
421+ (read && priv->flags & ID_P_NO_RXDMA))
412422 return;
413423
414424 if (read) {
@@ -739,6 +749,25 @@ static void rcar_i2c_release_dma(struct rcar_i2c_priv *priv) · 324 unmodified lines
739749 }
740750 }
741751
752+/* I2C is a special case, we need to poll the status of a reset */
753+static int rcar_i2c_do_reset(struct rcar_i2c_priv *priv)
754+{
755+ int i, ret;
756+
757+ ret = reset_control_reset(priv->rstc);
758+ if (ret)
759+ return ret;
760+
761+ for (i = 0; i < LOOP_TIMEOUT; i++) {
762+ ret = reset_control_status(priv->rstc);
763+ if (ret == 0)
764+ return 0;
765+ udelay(1);
766+ }
767+
768+ return -ETIMEDOUT;
769+}
770+
742771 static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
743772 struct i2c_msg *msgs,
744773 int num)
@@ -750,6 +779,16 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap, · 5 unmodified lines
750779
751780 pm_runtime_get_sync(dev);
752781
782+ /* Gen3 needs a reset before allowing RXDMA once */
783+ if (priv->devtype == I2C_RCAR_GEN3) {
784+ priv->flags |= ID_P_NO_RXDMA;
785+ if (!IS_ERR(priv->rstc)) {
786+ ret = rcar_i2c_do_reset(priv);
787+ if (ret == 0)
788+ priv->flags &= ~ID_P_NO_RXDMA;
789+ }
790+ }
791+
753792 rcar_i2c_init(priv);
754793
755794 ret = rcar_i2c_bus_barrier(priv);
@@ -920,6 +959,15 @@ static int rcar_i2c_probe(struct platform_device *pdev) · 164 unmodified lines
920959 if (ret < 0)
921960 goto out_pm_put;
922961
962+ if (priv->devtype == I2C_RCAR_GEN3) {
963+ priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
964+ if (!IS_ERR(priv->rstc)) {
965+ ret = reset_control_status(priv->rstc);
966+ if (ret < 0)
967+ priv->rstc = ERR_PTR(-ENOTSUPP);
968+ }
969+ }
970+
923971 /* Stay always active when multi-master to keep arbitration working */
924972 if (of_property_read_bool(dev->of_node, "multi-master"))
925973 priv->flags |= ID_P_PM_BLOCKED;
drivers/i2c/busses/i2c-stu300.c+1−1
@@ -127,7 +127,7 @@ enum stu300_error { · 126 unmodified lines
127127
128128 /*
129129 * The number of address send athemps tried before giving up.
130− * If the first one failes it seems like 5 to 8 attempts are required.
130+ * If the first one fails it seems like 5 to 8 attempts are required.
131131 */
132132 #define NUM_ADDR_RESEND_ATTEMPTS 12
133133
drivers/i2c/busses/i2c-tegra.c+8−9
@@ -545,6 +545,14 @@ static int tegra_i2c_disable_packet_mode(struct tegra_i2c_dev *i2c_dev) · 544 unmodified lines
545545 {
546546 u32 cnfg;
547547
548+ /*
549+ * NACK interrupt is generated before the I2C controller generates
550+ * the STOP condition on the bus. So wait for 2 clock periods
551+ * before disabling the controller so that the STOP condition has
552+ * been delivered properly.
553+ */
554+ udelay(DIV_ROUND_UP(2 * 1000000, i2c_dev->bus_clk_rate));
555+
548556 cnfg = i2c_readl(i2c_dev, I2C_CNFG);
549557 if (cnfg & I2C_CNFG_PACKET_MODE_EN)
550558 i2c_writel(i2c_dev, cnfg & ~I2C_CNFG_PACKET_MODE_EN, I2C_CNFG);
@@ -706,15 +714,6 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, · 155 unmodified lines
706714 if (likely(i2c_dev->msg_err == I2C_ERR_NONE))
707715 return 0;
708716
709− /*
710− * NACK interrupt is generated before the I2C controller generates
711− * the STOP condition on the bus. So wait for 2 clock periods
712− * before resetting the controller so that the STOP condition has
713− * been delivered properly.
714− */
715− if (i2c_dev->msg_err == I2C_ERR_NO_ACK)
716− udelay(DIV_ROUND_UP(2 * 1000000, i2c_dev->bus_clk_rate));
717−
718717 tegra_i2c_init(i2c_dev);
719718 if (i2c_dev->msg_err == I2C_ERR_NO_ACK) {
720719 if (msg->flags & I2C_M_IGNORE_NAK)
drivers/i2c/busses/i2c-xlp9xx.c+28−13
@@ -191,28 +191,43 @@ static void xlp9xx_i2c_drain_rx_fifo(struct xlp9xx_i2c_dev *priv) · 190 unmodified lines
191191 if (priv->len_recv) {
192192 /* read length byte */
193193 rlen = xlp9xx_read_i2c_reg(priv, XLP9XX_I2C_MRXFIFO);
194+
195+ /*
196+ * We expect at least 2 interrupts for I2C_M_RECV_LEN
197+ * transactions. The length is updated during the first
198+ * interrupt, and the buffer contents are only copied
199+ * during subsequent interrupts. If in case the interrupts
200+ * get merged we would complete the transaction without
201+ * copying out the bytes from RX fifo. To avoid this now we
202+ * drain the fifo as and when data is available.
203+ * We drained the rlen byte already, decrement total length
204+ * by one.
205+ */
206+
207+ len--;
194208 if (rlen > I2C_SMBUS_BLOCK_MAX || rlen == 0) {
195209 rlen = 0; /*abort transfer */
196210 priv->msg_buf_remaining = 0;
197211 priv->msg_len = 0;
198− } else {
199− *buf++ = rlen;
200− if (priv->client_pec)
201− ++rlen; /* account for error check byte */
202− /* update remaining bytes and message length */
203− priv->msg_buf_remaining = rlen;
204− priv->msg_len = rlen + 1;
212+ xlp9xx_i2c_update_rlen(priv);
213+ return;
205214 }
215+
216+ *buf++ = rlen;
217+ if (priv->client_pec)
218+ ++rlen; /* account for error check byte */
219+ /* update remaining bytes and message length */
220+ priv->msg_buf_remaining = rlen;
221+ priv->msg_len = rlen + 1;
206222 xlp9xx_i2c_update_rlen(priv);
207223 priv->len_recv = false;
208− } else {
209− len = min(priv->msg_buf_remaining, len);
210− for (i = 0; i < len; i++, buf++)
211− *buf = xlp9xx_read_i2c_reg(priv, XLP9XX_I2C_MRXFIFO);
212−
213− priv->msg_buf_remaining -= len;
214224 }
215225
226+ len = min(priv->msg_buf_remaining, len);
227+ for (i = 0; i < len; i++, buf++)
228+ *buf = xlp9xx_read_i2c_reg(priv, XLP9XX_I2C_MRXFIFO);
229+
230+ priv->msg_buf_remaining -= len;
216231 priv->msg_buf = buf;
217232
218233 if (priv->msg_buf_remaining)
drivers/i2c/i2c-core-base.c+11−2
@@ -198,7 +198,16 @@ int i2c_generic_scl_recovery(struct i2c_adapter *adap) · 197 unmodified lines
198198
199199 val = !val;
200200 bri->set_scl(adap, val);
201− ndelay(RECOVERY_NDELAY);
201+
202+ /*
203+ * If we can set SDA, we will always create STOP here to ensure
204+ * the additional pulses will do no harm. This is achieved by
205+ * letting SDA follow SCL half a cycle later.
206+ */
207+ ndelay(RECOVERY_NDELAY / 2);
208+ if (bri->set_sda)
209+ bri->set_sda(adap, val);
210+ ndelay(RECOVERY_NDELAY / 2);
202211 }
203212
204213 /* check if recovery actually succeeded */
@@ -615,7 +624,7 @@ static int i2c_check_addr_busy(struct i2c_adapter *adapter, int addr) · 410 unmodified lines
615624 static void i2c_adapter_lock_bus(struct i2c_adapter *adapter,
616625 unsigned int flags)
617626 {
618− rt_mutex_lock(&adapter->bus_lock);
627+ rt_mutex_lock_nested(&adapter->bus_lock, i2c_adapter_depth(adapter));
619628 }
620629
621630 /**
drivers/i2c/i2c-core-smbus.c+9−5
@@ -465,15 +465,18 @@ static s32 i2c_smbus_xfer_emulated(struct i2c_adapter *adapter, u16 addr, · 464 unmodified lines
465465
466466 status = i2c_transfer(adapter, msg, num);
467467 if (status < 0)
468− return status;
469− if (status != num)
470− return -EIO;
468+ goto cleanup;
469+ if (status != num) {
470+ status = -EIO;
471+ goto cleanup;
472+ }
473+ status = 0;
471474
472475 /* Check PEC if last message is a read */
473476 if (i && (msg[num-1].flags & I2C_M_RD)) {
474477 status = i2c_smbus_check_pec(partial_pec, &msg[num-1]);
475478 if (status < 0)
476− return status;
479+ goto cleanup;
477480 }
478481
479482 if (read_write == I2C_SMBUS_READ)
@@ -499,12 +502,13 @@ static s32 i2c_smbus_xfer_emulated(struct i2c_adapter *adapter, u16 addr, · 19 unmodified lines
499502 break;
500503 }
501504
505+cleanup:
502506 if (msg[0].flags & I2C_M_DMA_SAFE)
503507 kfree(msg[0].buf);
504508 if (msg[1].flags & I2C_M_DMA_SAFE)
505509 kfree(msg[1].buf);
506510
507− return 0;
511+ return status;
508512 }
509513
510514 /**
drivers/i2c/i2c-mux.c+2−2
@@ -144,7 +144,7 @@ static void i2c_mux_lock_bus(struct i2c_adapter *adapter, unsigned int flags) · 143 unmodified lines
144144 struct i2c_mux_priv *priv = adapter->algo_data;
145145 struct i2c_adapter *parent = priv->muxc->parent;
146146
147− rt_mutex_lock(&parent->mux_lock);
147+ rt_mutex_lock_nested(&parent->mux_lock, i2c_adapter_depth(adapter));
148148 if (!(flags & I2C_LOCK_ROOT_ADAPTER))
149149 return;
150150 i2c_lock_bus(parent, flags);
@@ -181,7 +181,7 @@ static void i2c_parent_lock_bus(struct i2c_adapter *adapter, · 30 unmodified lines
181181 struct i2c_mux_priv *priv = adapter->algo_data;
182182 struct i2c_adapter *parent = priv->muxc->parent;
183183
184− rt_mutex_lock(&parent->mux_lock);
184+ rt_mutex_lock_nested(&parent->mux_lock, i2c_adapter_depth(adapter));
185185 i2c_lock_bus(parent, flags);
186186 }
187187
drivers/iio/accel/mma8452.c+1−1
@@ -1053,7 +1053,7 @@ static irqreturn_t mma8452_interrupt(int irq, void *p) · 1052 unmodified lines
10531053 if (src < 0)
10541054 return IRQ_NONE;
10551055
1056− if (!(src & data->chip_info->enabled_events))
1056+ if (!(src & (data->chip_info->enabled_events | MMA8452_INT_DRDY)))
10571057 return IRQ_NONE;
10581058
10591059 if (src & MMA8452_INT_DRDY) {
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c+2−0
@@ -959,6 +959,8 @@ int inv_mpu_core_probe(struct regmap *regmap, int irq, const char *name, · 958 unmodified lines
959959 }
960960
961961 irq_type = irqd_get_trigger_type(desc);
962+ if (!irq_type)
963+ irq_type = IRQF_TRIGGER_RISING;
962964 if (irq_type == IRQF_TRIGGER_RISING)
963965 st->irq_mask = INV_MPU6050_ACTIVE_HIGH;
964966 else if (irq_type == IRQF_TRIGGER_FALLING)
drivers/iio/light/tsl2772.c+2−0
@@ -582,6 +582,8 @@ static int tsl2772_als_calibrate(struct iio_dev *indio_dev) · 581 unmodified lines
582582 "%s: failed to get lux\n", __func__);
583583 return lux_val;
584584 }
585+ if (lux_val == 0)
586+ return -ERANGE;
585587
586588 ret = (chip->settings.als_cal_target * chip->settings.als_gain_trim) /
587589 lux_val;
drivers/iio/pressure/bmp280-core.c+2−3
@@ -415,10 +415,9 @@ static int bmp280_read_humid(struct bmp280_data *data, int *val, int *val2) · 414 unmodified lines
415415 }
416416 comp_humidity = bmp280_compensate_humidity(data, adc_humidity);
417417
418− *val = comp_humidity;
419− *val2 = 1024;
418+ *val = comp_humidity * 1000 / 1024;
420419
421− return IIO_VAL_FRACTIONAL;
420+ return IIO_VAL_INT;
422421 }
423422
424423 static int bmp280_read_raw(struct iio_dev *indio_dev,
drivers/infiniband/core/uverbs_cmd.c+71−15
@@ -1963,15 +1963,64 @@ static int modify_qp(struct ib_uverbs_file *file, · 1962 unmodified lines
19631963 goto release_qp;
19641964 }
19651965
1966− if ((cmd->base.attr_mask & IB_QP_AV) &&
1967− !rdma_is_port_valid(qp->device, cmd->base.dest.port_num)) {
1968− ret = -EINVAL;
1969− goto release_qp;
1966+ if ((cmd->base.attr_mask & IB_QP_AV)) {
1967+ if (!rdma_is_port_valid(qp->device, cmd->base.dest.port_num)) {
1968+ ret = -EINVAL;
1969+ goto release_qp;
1970+ }
1971+
1972+ if (cmd->base.attr_mask & IB_QP_STATE &&
1973+ cmd->base.qp_state == IB_QPS_RTR) {
1974+ /* We are in INIT->RTR TRANSITION (if we are not,
1975+ * this transition will be rejected in subsequent checks).
1976+ * In the INIT->RTR transition, we cannot have IB_QP_PORT set,
1977+ * but the IB_QP_STATE flag is required.
1978+ *
1979+ * Since kernel 3.14 (commit dbf727de7440), the uverbs driver,
1980+ * when IB_QP_AV is set, has required inclusion of a valid
1981+ * port number in the primary AV. (AVs are created and handled
1982+ * differently for infiniband and ethernet (RoCE) ports).
1983+ *
1984+ * Check the port number included in the primary AV against
1985+ * the port number in the qp struct, which was set (and saved)
1986+ * in the RST->INIT transition.
1987+ */
1988+ if (cmd->base.dest.port_num != qp->real_qp->port) {
1989+ ret = -EINVAL;
1990+ goto release_qp;
1991+ }
1992+ } else {
1993+ /* We are in SQD->SQD. (If we are not, this transition will
1994+ * be rejected later in the verbs layer checks).
1995+ * Check for both IB_QP_PORT and IB_QP_AV, these can be set
1996+ * together in the SQD->SQD transition.
1997+ *
1998+ * If only IP_QP_AV was set, add in IB_QP_PORT as well (the
1999+ * verbs layer driver does not track primary port changes
2000+ * resulting from path migration. Thus, in SQD, if the primary
2001+ * AV is modified, the primary port should also be modified).
2002+ *
2003+ * Note that in this transition, the IB_QP_STATE flag
2004+ * is not allowed.
2005+ */
2006+ if (((cmd->base.attr_mask & (IB_QP_AV | IB_QP_PORT))
2007+ == (IB_QP_AV | IB_QP_PORT)) &&
2008+ cmd->base.port_num != cmd->base.dest.port_num) {
2009+ ret = -EINVAL;
2010+ goto release_qp;
2011+ }
2012+ if ((cmd->base.attr_mask & (IB_QP_AV | IB_QP_PORT))
2013+ == IB_QP_AV) {
2014+ cmd->base.attr_mask |= IB_QP_PORT;
2015+ cmd->base.port_num = cmd->base.dest.port_num;
2016+ }
2017+ }
19702018 }
19712019
19722020 if ((cmd->base.attr_mask & IB_QP_ALT_PATH) &&
19732021 (!rdma_is_port_valid(qp->device, cmd->base.alt_port_num) ||
1974− !rdma_is_port_valid(qp->device, cmd->base.alt_dest.port_num))) {
2022+ !rdma_is_port_valid(qp->device, cmd->base.alt_dest.port_num) ||
2023+ cmd->base.alt_port_num != cmd->base.alt_dest.port_num)) {
19752024 ret = -EINVAL;
19762025 goto release_qp;
19772026 }
@@ -3419,8 +3468,8 @@ int ib_uverbs_ex_create_flow(struct ib_uverbs_file *file, · 1441 unmodified lines
34193468 struct ib_flow_attr *flow_attr;
34203469 struct ib_qp *qp;
34213470 struct ib_uflow_resources *uflow_res;
3471+ struct ib_uverbs_flow_spec_hdr *kern_spec;
34223472 int err = 0;
3423− void *kern_spec;
34243473 void *ib_spec;
34253474 int i;
34263475 struct ib_device *ib_dev;
@@ -3470,8 +3519,8 @@ int ib_uverbs_ex_create_flow(struct ib_uverbs_file *file, · 43 unmodified lines
34703519 if (!kern_flow_attr)
34713520 return -ENOMEM;
34723521
3473− memcpy(kern_flow_attr, &cmd.flow_attr, sizeof(*kern_flow_attr));
3474− err = ib_copy_from_udata(kern_flow_attr + 1, ucore,
3522+ *kern_flow_attr = cmd.flow_attr;
3523+ err = ib_copy_from_udata(&kern_flow_attr->flow_specs, ucore,
34753524 cmd.flow_attr.size);
34763525 if (err)
34773526 goto err_free_attr;
@@ -3491,6 +3540,11 @@ int ib_uverbs_ex_create_flow(struct ib_uverbs_file *file, · 13 unmodified lines
34913540 goto err_uobj;
34923541 }
34933542
3543+ if (qp->qp_type != IB_QPT_UD && qp->qp_type != IB_QPT_RAW_PACKET) {
3544+ err = -EINVAL;
3545+ goto err_put;
3546+ }
3547+
34943548 if (!qp->device->create_flow) {
34953549 err = -EOPNOTSUPP;
34963550 goto err_put;
@@ -3515,20 +3569,22 @@ int ib_uverbs_ex_create_flow(struct ib_uverbs_file *file, · 18 unmodified lines
35153569 flow_attr->flags = kern_flow_attr->flags;
35163570 flow_attr->size = sizeof(*flow_attr);
35173571
3518− kern_spec = kern_flow_attr + 1;
3572+ kern_spec = kern_flow_attr->flow_specs;
35193573 ib_spec = flow_attr + 1;
35203574 for (i = 0; i < flow_attr->num_of_specs &&
3521− cmd.flow_attr.size > offsetof(struct ib_uverbs_flow_spec, reserved) &&
3522− cmd.flow_attr.size >=
3523− ((struct ib_uverbs_flow_spec *)kern_spec)->size; i++) {
3524− err = kern_spec_to_ib_spec(file, kern_spec, ib_spec, uflow_res);
3575+ cmd.flow_attr.size >= sizeof(*kern_spec) &&
3576+ cmd.flow_attr.size >= kern_spec->size;
3577+ i++) {
3578+ err = kern_spec_to_ib_spec(
3579+ file, (struct ib_uverbs_flow_spec *)kern_spec,
3580+ ib_spec, uflow_res);
35253581 if (err)
35263582 goto err_free;
35273583
35283584 flow_attr->size +=
35293585 ((union ib_flow_spec *) ib_spec)->size;
3530− cmd.flow_attr.size -= ((struct ib_uverbs_flow_spec *)kern_spec)->size;
3531− kern_spec += ((struct ib_uverbs_flow_spec *) kern_spec)->size;
3586+ cmd.flow_attr.size -= kern_spec->size;
3587+ kern_spec = ((void *)kern_spec) + kern_spec->size;
35323588 ib_spec += ((union ib_flow_spec *) ib_spec)->size;
35333589 }
35343590 if (cmd.flow_attr.size || (i != flow_attr->num_of_specs)) {
drivers/infiniband/core/verbs.c+8−6
@@ -1869,11 +1869,12 @@ EXPORT_SYMBOL(ib_destroy_qp); · 1868 unmodified lines
18691869
18701870 /* Completion queues */
18711871
1872−struct ib_cq *ib_create_cq(struct ib_device *device,
1873− ib_comp_handler comp_handler,
1874− void (*event_handler)(struct ib_event *, void *),
1875− void *cq_context,
1876− const struct ib_cq_init_attr *cq_attr)
1872+struct ib_cq *__ib_create_cq(struct ib_device *device,
1873+ ib_comp_handler comp_handler,
1874+ void (*event_handler)(struct ib_event *, void *),
1875+ void *cq_context,
1876+ const struct ib_cq_init_attr *cq_attr,
1877+ const char *caller)
18771878 {
18781879 struct ib_cq *cq;
18791880
@@ -1887,12 +1888,13 @@ struct ib_cq *ib_create_cq(struct ib_device *device, · 7 unmodified lines
18871888 cq->cq_context = cq_context;
18881889 atomic_set(&cq->usecnt, 0);
18891890 cq->res.type = RDMA_RESTRACK_CQ;
1891+ cq->res.kern_name = caller;
18901892 rdma_restrack_add(&cq->res);
18911893 }
18921894
18931895 return cq;
18941896 }
1895−EXPORT_SYMBOL(ib_create_cq);
1897+EXPORT_SYMBOL(__ib_create_cq);
18961898
18971899 int rdma_set_cq_moderation(struct ib_cq *cq, u16 cq_count, u16 cq_period)
18981900 {
drivers/infiniband/hw/cxgb4/mem.c+1−1
@@ -774,7 +774,7 @@ static int c4iw_set_page(struct ib_mr *ibmr, u64 addr) · 773 unmodified lines
774774 {
775775 struct c4iw_mr *mhp = to_c4iw_mr(ibmr);
776776
777− if (unlikely(mhp->mpl_len == mhp->max_mpl_len))
777+ if (unlikely(mhp->mpl_len == mhp->attr.pbl_size))
778778 return -ENOMEM;
779779
780780 mhp->mpl[mhp->mpl_len++] = addr;
drivers/infiniband/hw/hfi1/rc.c+1−1
@@ -271,7 +271,7 @@ int hfi1_make_rc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps) · 270 unmodified lines
271271
272272 lockdep_assert_held(&qp->s_lock);
273273 ps->s_txreq = get_txreq(ps->dev, qp);
274− if (IS_ERR(ps->s_txreq))
274+ if (!ps->s_txreq)
275275 goto bail_no_tx;
276276
277277 if (priv->hdr_type == HFI1_PKT_TYPE_9B) {
drivers/infiniband/hw/hfi1/uc.c+2−2
@@ -1,5 +1,5 @@
11 /*
2− * Copyright(c) 2015, 2016 Intel Corporation.
2+ * Copyright(c) 2015 - 2018 Intel Corporation.
33 *
44 * This file is provided under a dual BSD/GPLv2 license. When using or
55 * redistributing this file, you may do so under either license.
@@ -72,7 +72,7 @@ int hfi1_make_uc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps) · 66 unmodified lines
7272 int middle = 0;
7373
7474 ps->s_txreq = get_txreq(ps->dev, qp);
75− if (IS_ERR(ps->s_txreq))
75+ if (!ps->s_txreq)
7676 goto bail_no_tx;
7777
7878 if (!(ib_rvt_state_ops[qp->state] & RVT_PROCESS_SEND_OK)) {
drivers/infiniband/hw/hfi1/ud.c+2−2
@@ -1,5 +1,5 @@
11 /*
2− * Copyright(c) 2015, 2016 Intel Corporation.
2+ * Copyright(c) 2015 - 2018 Intel Corporation.
33 *
44 * This file is provided under a dual BSD/GPLv2 license. When using or
55 * redistributing this file, you may do so under either license.
@@ -503,7 +503,7 @@ int hfi1_make_ud_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps) · 497 unmodified lines
503503 u32 lid;
504504
505505 ps->s_txreq = get_txreq(ps->dev, qp);
506− if (IS_ERR(ps->s_txreq))
506+ if (!ps->s_txreq)
507507 goto bail_no_tx;
508508
509509 if (!(ib_rvt_state_ops[qp->state] & RVT_PROCESS_NEXT_SEND_OK)) {
drivers/infiniband/hw/hfi1/verbs_txreq.c+2−2
@@ -1,5 +1,5 @@
11 /*
2− * Copyright(c) 2016 - 2017 Intel Corporation.
2+ * Copyright(c) 2016 - 2018 Intel Corporation.
33 *
44 * This file is provided under a dual BSD/GPLv2 license. When using or
55 * redistributing this file, you may do so under either license.
@@ -94,7 +94,7 @@ struct verbs_txreq *__get_txreq(struct hfi1_ibdev *dev, · 88 unmodified lines
9494 struct rvt_qp *qp)
9595 __must_hold(&qp->s_lock)
9696 {
97− struct verbs_txreq *tx = ERR_PTR(-EBUSY);
97+ struct verbs_txreq *tx = NULL;
9898
9999 write_seqlock(&dev->txwait_lock);
100100 if (ib_rvt_state_ops[qp->state] & RVT_PROCESS_RECV_OK) {
drivers/infiniband/hw/hfi1/verbs_txreq.h+2−2
@@ -1,5 +1,5 @@
11 /*
2− * Copyright(c) 2016 Intel Corporation.
2+ * Copyright(c) 2016 - 2018 Intel Corporation.
33 *
44 * This file is provided under a dual BSD/GPLv2 license. When using or
55 * redistributing this file, you may do so under either license.
@@ -83,7 +83,7 @@ static inline struct verbs_txreq *get_txreq(struct hfi1_ibdev *dev, · 77 unmodified lines
8383 if (unlikely(!tx)) {
8484 /* call slow path to get the lock */
8585 tx = __get_txreq(dev, qp);
86− if (IS_ERR(tx))
86+ if (!tx)
8787 return tx;
8888 }
8989 tx->qp = qp;
drivers/infiniband/hw/mlx4/mr.c+5−2
@@ -486,8 +486,11 @@ int mlx4_ib_rereg_user_mr(struct ib_mr *mr, int flags, · 485 unmodified lines
486486 }
487487
488488 if (flags & IB_MR_REREG_ACCESS) {
489− if (ib_access_writable(mr_access_flags) && !mmr->umem->writable)
490− return -EPERM;
489+ if (ib_access_writable(mr_access_flags) &&
490+ !mmr->umem->writable) {
491+ err = -EPERM;
492+ goto release_mpt_entry;
493+ }
491494
492495 err = mlx4_mr_hw_change_access(dev->dev, *pmpt_entry,
493496 convert_access(mr_access_flags));
drivers/infiniband/hw/mlx5/main.c+22−16
@@ -3208,8 +3208,8 @@ static int flow_counters_set_data(struct ib_counters *ibcounters, · 3207 unmodified lines
32083208 if (!mcounters->hw_cntrs_hndl) {
32093209 mcounters->hw_cntrs_hndl = mlx5_fc_create(
32103210 to_mdev(ibcounters->device)->mdev, false);
3211− if (!mcounters->hw_cntrs_hndl) {
3212− ret = -ENOMEM;
3211+ if (IS_ERR(mcounters->hw_cntrs_hndl)) {
3212+ ret = PTR_ERR(mcounters->hw_cntrs_hndl);
32133213 goto free;
32143214 }
32153215 hw_hndl = true;
@@ -3556,29 +3556,35 @@ static struct ib_flow *mlx5_ib_create_flow(struct ib_qp *qp, · 340 unmodified lines
35563556 return ERR_PTR(-ENOMEM);
35573557
35583558 err = ib_copy_from_udata(ucmd, udata, required_ucmd_sz);
3559− if (err) {
3560− kfree(ucmd);
3561− return ERR_PTR(err);
3562− }
3559+ if (err)
3560+ goto free_ucmd;
35633561 }
35643562
3565− if (flow_attr->priority > MLX5_IB_FLOW_LAST_PRIO)
3566− return ERR_PTR(-ENOMEM);
3563+ if (flow_attr->priority > MLX5_IB_FLOW_LAST_PRIO) {
3564+ err = -ENOMEM;
3565+ goto free_ucmd;
3566+ }
35673567
35683568 if (domain != IB_FLOW_DOMAIN_USER ||
35693569 flow_attr->port > dev->num_ports ||
35703570 (flow_attr->flags & ~(IB_FLOW_ATTR_FLAGS_DONT_TRAP |
3571− IB_FLOW_ATTR_FLAGS_EGRESS)))
3572− return ERR_PTR(-EINVAL);
3571+ IB_FLOW_ATTR_FLAGS_EGRESS))) {
3572+ err = -EINVAL;
3573+ goto free_ucmd;
3574+ }
35733575
35743576 if (is_egress &&
35753577 (flow_attr->type == IB_FLOW_ATTR_ALL_DEFAULT ||
3576− flow_attr->type == IB_FLOW_ATTR_MC_DEFAULT))
3577− return ERR_PTR(-EINVAL);
3578+ flow_attr->type == IB_FLOW_ATTR_MC_DEFAULT)) {
3579+ err = -EINVAL;
3580+ goto free_ucmd;
3581+ }
35783582
35793583 dst = kzalloc(sizeof(*dst), GFP_KERNEL);
3580− if (!dst)
3581− return ERR_PTR(-ENOMEM);
3584+ if (!dst) {
3585+ err = -ENOMEM;
3586+ goto free_ucmd;
3587+ }
35823588
35833589 mutex_lock(&dev->flow_db->lock);
35843590
@@ -3647,8 +3653,8 @@ destroy_ft: · 62 unmodified lines
36473653 unlock:
36483654 mutex_unlock(&dev->flow_db->lock);
36493655 kfree(dst);
3656+free_ucmd:
36503657 kfree(ucmd);
3651− kfree(handler);
36523658 return ERR_PTR(err);
36533659 }
36543660
@@ -6343,7 +6349,7 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) · 2688 unmodified lines
63436349 dev->num_ports = max(MLX5_CAP_GEN(mdev, num_ports),
63446350 MLX5_CAP_GEN(mdev, num_vhca_ports));
63456351
6346− if (MLX5_VPORT_MANAGER(mdev) &&
6352+ if (MLX5_ESWITCH_MANAGER(mdev) &&
63476353 mlx5_ib_eswitch_mode(mdev->priv.eswitch) == SRIOV_OFFLOADS) {
63486354 dev->rep = mlx5_ib_vport_rep(mdev->priv.eswitch, 0);
63496355
drivers/infiniband/hw/mlx5/srq.c+12−6
@@ -266,18 +266,24 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd, · 265 unmodified lines
266266
267267 desc_size = sizeof(struct mlx5_wqe_srq_next_seg) +
268268 srq->msrq.max_gs * sizeof(struct mlx5_wqe_data_seg);
269− if (desc_size == 0 || srq->msrq.max_gs > desc_size)
270− return ERR_PTR(-EINVAL);
269+ if (desc_size == 0 || srq->msrq.max_gs > desc_size) {
270+ err = -EINVAL;
271+ goto err_srq;
272+ }
271273 desc_size = roundup_pow_of_two(desc_size);
272274 desc_size = max_t(size_t, 32, desc_size);
273− if (desc_size < sizeof(struct mlx5_wqe_srq_next_seg))
274− return ERR_PTR(-EINVAL);
275+ if (desc_size < sizeof(struct mlx5_wqe_srq_next_seg)) {
276+ err = -EINVAL;
277+ goto err_srq;
278+ }
275279 srq->msrq.max_avail_gather = (desc_size - sizeof(struct mlx5_wqe_srq_next_seg)) /
276280 sizeof(struct mlx5_wqe_data_seg);
277281 srq->msrq.wqe_shift = ilog2(desc_size);
278282 buf_size = srq->msrq.max * desc_size;
279− if (buf_size < desc_size)
280− return ERR_PTR(-EINVAL);
283+ if (buf_size < desc_size) {
284+ err = -EINVAL;
285+ goto err_srq;
286+ }
281287 in.type = init_attr->srq_type;
282288
283289 if (pd->uobject)
drivers/infiniband/hw/qedr/verbs.c+3−0
@@ -2288,6 +2288,9 @@ int qedr_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, · 2287 unmodified lines
22882288 }
22892289
22902290 if (attr_mask & (IB_QP_AV | IB_QP_PATH_MTU)) {
2291+ if (rdma_protocol_iwarp(&dev->ibdev, 1))
2292+ return -EINVAL;
2293+
22912294 if (attr_mask & IB_QP_PATH_MTU) {
22922295 if (attr->path_mtu < IB_MTU_256 ||
22932296 attr->path_mtu > IB_MTU_4096) {
drivers/infiniband/sw/rxe/rxe_req.c+4−1
@@ -645,6 +645,9 @@ next_wqe: · 644 unmodified lines
645645 } else {
646646 goto exit;
647647 }
648+ if ((wqe->wr.send_flags & IB_SEND_SIGNALED) ||
649+ qp->sq_sig_type == IB_SIGNAL_ALL_WR)
650+ rxe_run_task(&qp->comp.task, 1);
648651 qp->req.wqe_index = next_index(qp->sq.queue,
649652 qp->req.wqe_index);
650653 goto next_wqe;
@@ -709,6 +712,7 @@ next_wqe: · 58 unmodified lines
709712
710713 if (fill_packet(qp, wqe, &pkt, skb, payload)) {
711714 pr_debug("qp#%d Error during fill packet\n", qp_num(qp));
715+ kfree_skb(skb);
712716 goto err;
713717 }
714718
@@ -740,7 +744,6 @@ next_wqe: · 25 unmodified lines
740744 goto next_wqe;
741745
742746 err:
743− kfree_skb(skb);
744747 wqe->status = IB_WC_LOC_PROT_ERR;
745748 wqe->state = wqe_state_error;
746749 __rxe_do_task(&qp->comp.task);
drivers/input/input-mt.c+8−4
@@ -131,8 +131,10 @@ EXPORT_SYMBOL(input_mt_destroy_slots); · 130 unmodified lines
131131 * inactive, or if the tool type is changed, a new tracking id is
132132 * assigned to the slot. The tool type is only reported if the
133133 * corresponding absbit field is set.
134+ *
135+ * Returns true if contact is active.
134136 */
135−void input_mt_report_slot_state(struct input_dev *dev,
137+bool input_mt_report_slot_state(struct input_dev *dev,
136138 unsigned int tool_type, bool active)
137139 {
138140 struct input_mt *mt = dev->mt;
@@ -140,22 +142,24 @@ void input_mt_report_slot_state(struct input_dev *dev, · 1 unmodified line
140142 int id;
141143
142144 if (!mt)
143− return;
145+ return false;
144146
145147 slot = &mt->slots[mt->slot];
146148 slot->frame = mt->frame;
147149
148150 if (!active) {
149151 input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, -1);
150− return;
152+ return false;
151153 }
152154
153155 id = input_mt_get_value(slot, ABS_MT_TRACKING_ID);
154− if (id < 0 || input_mt_get_value(slot, ABS_MT_TOOL_TYPE) != tool_type)
156+ if (id < 0)
155157 id = input_mt_new_trkid(mt);
156158
157159 input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, id);
158160 input_event(dev, EV_ABS, ABS_MT_TOOL_TYPE, tool_type);
161+
162+ return true;
159163 }
160164 EXPORT_SYMBOL(input_mt_report_slot_state);
161165
drivers/input/joystick/xpad.c+1−1
@@ -125,7 +125,7 @@ static const struct xpad_device { · 124 unmodified lines
125125 u8 mapping;
126126 u8 xtype;
127127 } xpad_device[] = {
128− { 0x0079, 0x18d4, "GPD Win 2 Controller", 0, XTYPE_XBOX360 },
128+ { 0x0079, 0x18d4, "GPD Win 2 X-Box Controller", 0, XTYPE_XBOX360 },
129129 { 0x044f, 0x0f00, "Thrustmaster Wheel", 0, XTYPE_XBOX },
130130 { 0x044f, 0x0f03, "Thrustmaster Wheel", 0, XTYPE_XBOX },
131131 { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
drivers/input/keyboard/goldfish_events.c+5−4
@@ -45,7 +45,7 @@ struct event_dev { · 44 unmodified lines
4545 static irqreturn_t events_interrupt(int irq, void *dev_id)
4646 {
4747 struct event_dev *edev = dev_id;
48− unsigned type, code, value;
48+ unsigned int type, code, value;
4949
5050 type = __raw_readl(edev->addr + REG_READ);
5151 code = __raw_readl(edev->addr + REG_READ);
@@ -57,7 +57,7 @@ static irqreturn_t events_interrupt(int irq, void *dev_id) · 5 unmodified lines
5757 }
5858
5959 static void events_import_bits(struct event_dev *edev,
60− unsigned long bits[], unsigned type, size_t count)
60+ unsigned long bits[], unsigned int type, size_t count)
6161 {
6262 void __iomem *addr = edev->addr;
6363 int i, j;
@@ -99,6 +99,7 @@ static void events_import_abs_params(struct event_dev *edev) · 35 unmodified lines
9999
100100 for (j = 0; j < ARRAY_SIZE(val); j++) {
101101 int offset = (i * ARRAY_SIZE(val) + j) * sizeof(u32);
102+
102103 val[j] = __raw_readl(edev->addr + REG_DATA + offset);
103104 }
104105
@@ -112,7 +113,7 @@ static int events_probe(struct platform_device *pdev) · 7 unmodified lines
112113 struct input_dev *input_dev;
113114 struct event_dev *edev;
114115 struct resource *res;
115− unsigned keymapnamelen;
116+ unsigned int keymapnamelen;
116117 void __iomem *addr;
117118 int irq;
118119 int i;
@@ -150,7 +151,7 @@ static int events_probe(struct platform_device *pdev) · 31 unmodified lines
150151 for (i = 0; i < keymapnamelen; i++)
151152 edev->name[i] = __raw_readb(edev->addr + REG_DATA + i);
152153
153− pr_debug("events_probe() keymap=%s\n", edev->name);
154+ pr_debug("%s: keymap=%s\n", __func__, edev->name);
154155
155156 input_dev->name = edev->name;
156157 input_dev->id.bustype = BUS_HOST;
drivers/input/misc/Kconfig+10−0
@@ -841,4 +841,14 @@ config INPUT_RAVE_SP_PWRBUTTON · 840 unmodified lines
841841 To compile this driver as a module, choose M here: the
842842 module will be called rave-sp-pwrbutton.
843843
844+config INPUT_SC27XX_VIBRA
845+ tristate "Spreadtrum sc27xx vibrator support"
846+ depends on MFD_SC27XX_PMIC || COMPILE_TEST
847+ select INPUT_FF_MEMLESS
848+ help
849+ This option enables support for Spreadtrum sc27xx vibrator driver.
850+
851+ To compile this driver as a module, choose M here. The module will
852+ be called sc27xx_vibra.
853+
844854 endif
drivers/input/misc/Makefile+1−0
@@ -66,6 +66,7 @@ obj-$(CONFIG_INPUT_RETU_PWRBUTTON) += retu-pwrbutton.o · 65 unmodified lines
6666 obj-$(CONFIG_INPUT_AXP20X_PEK) += axp20x-pek.o
6767 obj-$(CONFIG_INPUT_GPIO_ROTARY_ENCODER) += rotary_encoder.o
6868 obj-$(CONFIG_INPUT_RK805_PWRKEY) += rk805-pwrkey.o
69+obj-$(CONFIG_INPUT_SC27XX_VIBRA) += sc27xx-vibra.o
6970 obj-$(CONFIG_INPUT_SGI_BTNS) += sgi_btns.o
7071 obj-$(CONFIG_INPUT_SIRFSOC_ONKEY) += sirfsoc-onkey.o
7172 obj-$(CONFIG_INPUT_SOC_BUTTON_ARRAY) += soc_button_array.o
drivers/input/misc/sc27xx-vibra.c+154−0
@@ -0,0 +1,154 @@
1+// SPDX-License-Identifier: GPL-2.0
2+/*
3+ * Copyright (C) 2018 Spreadtrum Communications Inc.
4+ */
5+
6+#include <linux/module.h>
7+#include <linux/of_address.h>
8+#include <linux/platform_device.h>
9+#include <linux/regmap.h>
10+#include <linux/input.h>
11+#include <linux/workqueue.h>
12+
13+#define CUR_DRV_CAL_SEL GENMASK(13, 12)
14+#define SLP_LDOVIBR_PD_EN BIT(9)
15+#define LDO_VIBR_PD BIT(8)
16+
17+struct vibra_info {
18+ struct input_dev *input_dev;
19+ struct work_struct play_work;
20+ struct regmap *regmap;
21+ u32 base;
22+ u32 strength;
23+ bool enabled;
24+};
25+
26+static void sc27xx_vibra_set(struct vibra_info *info, bool on)
27+{
28+ if (on) {
29+ regmap_update_bits(info->regmap, info->base, LDO_VIBR_PD, 0);
30+ regmap_update_bits(info->regmap, info->base,
31+ SLP_LDOVIBR_PD_EN, 0);
32+ info->enabled = true;
33+ } else {
34+ regmap_update_bits(info->regmap, info->base, LDO_VIBR_PD,
35+ LDO_VIBR_PD);
36+ regmap_update_bits(info->regmap, info->base,
37+ SLP_LDOVIBR_PD_EN, SLP_LDOVIBR_PD_EN);
38+ info->enabled = false;
39+ }
40+}
41+
42+static int sc27xx_vibra_hw_init(struct vibra_info *info)
43+{
44+ return regmap_update_bits(info->regmap, info->base, CUR_DRV_CAL_SEL, 0);
45+}
46+
47+static void sc27xx_vibra_play_work(struct work_struct *work)
48+{
49+ struct vibra_info *info = container_of(work, struct vibra_info,
50+ play_work);
51+
52+ if (info->strength && !info->enabled)
53+ sc27xx_vibra_set(info, true);
54+ else if (info->strength == 0 && info->enabled)
55+ sc27xx_vibra_set(info, false);
56+}
57+
58+static int sc27xx_vibra_play(struct input_dev *input, void *data,
59+ struct ff_effect *effect)
60+{
61+ struct vibra_info *info = input_get_drvdata(input);
62+
63+ info->strength = effect->u.rumble.weak_magnitude;
64+ schedule_work(&info->play_work);
65+
66+ return 0;
67+}
68+
69+static void sc27xx_vibra_close(struct input_dev *input)
70+{
71+ struct vibra_info *info = input_get_drvdata(input);
72+
73+ cancel_work_sync(&info->play_work);
74+ if (info->enabled)
75+ sc27xx_vibra_set(info, false);
76+}
77+
78+static int sc27xx_vibra_probe(struct platform_device *pdev)
79+{
80+ struct vibra_info *info;
81+ int error;
82+
83+ info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
84+ if (!info)
85+ return -ENOMEM;
86+
87+ info->regmap = dev_get_regmap(pdev->dev.parent, NULL);
88+ if (!info->regmap) {
89+ dev_err(&pdev->dev, "failed to get vibrator regmap.\n");
90+ return -ENODEV;
91+ }
92+
93+ error = device_property_read_u32(&pdev->dev, "reg", &info->base);
94+ if (error) {
95+ dev_err(&pdev->dev, "failed to get vibrator base address.\n");
96+ return error;
97+ }
98+
99+ info->input_dev = devm_input_allocate_device(&pdev->dev);
100+ if (!info->input_dev) {
101+ dev_err(&pdev->dev, "failed to allocate input device.\n");
102+ return -ENOMEM;
103+ }
104+
105+ info->input_dev->name = "sc27xx:vibrator";
106+ info->input_dev->id.version = 0;
107+ info->input_dev->close = sc27xx_vibra_close;
108+
109+ input_set_drvdata(info->input_dev, info);
110+ input_set_capability(info->input_dev, EV_FF, FF_RUMBLE);
111+ INIT_WORK(&info->play_work, sc27xx_vibra_play_work);
112+ info->enabled = false;
113+
114+ error = sc27xx_vibra_hw_init(info);
115+ if (error) {
116+ dev_err(&pdev->dev, "failed to initialize the vibrator.\n");
117+ return error;
118+ }
119+
120+ error = input_ff_create_memless(info->input_dev, NULL,
121+ sc27xx_vibra_play);
122+ if (error) {
123+ dev_err(&pdev->dev, "failed to register vibrator to FF.\n");
124+ return error;
125+ }
126+
127+ error = input_register_device(info->input_dev);
128+ if (error) {
129+ dev_err(&pdev->dev, "failed to register input device.\n");
130+ return error;
131+ }
132+
133+ return 0;
134+}
135+
136+static const struct of_device_id sc27xx_vibra_of_match[] = {
137+ { .compatible = "sprd,sc2731-vibrator", },
138+ {}
139+};
140+MODULE_DEVICE_TABLE(of, sc27xx_vibra_of_match);
141+
142+static struct platform_driver sc27xx_vibra_driver = {
143+ .driver = {
144+ .name = "sc27xx-vibrator",
145+ .of_match_table = sc27xx_vibra_of_match,
146+ },
147+ .probe = sc27xx_vibra_probe,
148+};
149+
150+module_platform_driver(sc27xx_vibra_driver);
151+
152+MODULE_DESCRIPTION("Spreadtrum SC27xx Vibrator Driver");
153+MODULE_LICENSE("GPL v2");
154+MODULE_AUTHOR("Xiaotong Lu <xiaotong.lu@spreadtrum.com>");
drivers/input/mouse/elan_i2c.h+2−0
@@ -27,6 +27,8 @@ · 26 unmodified lines
2727 #define ETP_DISABLE_POWER 0x0001
2828 #define ETP_PRESSURE_OFFSET 25
2929
30+#define ETP_CALIBRATE_MAX_LEN 3
31+
3032 /* IAP Firmware handling */
3133 #define ETP_PRODUCT_ID_FORMAT_STRING "%d.0"
3234 #define ETP_FW_NAME "elan_i2c_" ETP_PRODUCT_ID_FORMAT_STRING ".bin"
drivers/input/mouse/elan_i2c_core.c+4−1
@@ -613,7 +613,7 @@ static ssize_t calibrate_store(struct device *dev, · 612 unmodified lines
613613 int tries = 20;
614614 int retval;
615615 int error;
616− u8 val[3];
616+ u8 val[ETP_CALIBRATE_MAX_LEN];
617617
618618 retval = mutex_lock_interruptible(&data->sysfs_mutex);
619619 if (retval)
@@ -1345,6 +1345,9 @@ static const struct acpi_device_id elan_acpi_id[] = { · 725 unmodified lines
13451345 { "ELAN060C", 0 },
13461346 { "ELAN0611", 0 },
13471347 { "ELAN0612", 0 },
1348+ { "ELAN0618", 0 },
1349+ { "ELAN061D", 0 },
1350+ { "ELAN0622", 0 },
13481351 { "ELAN1000", 0 },
13491352 { }
13501353 };
drivers/input/mouse/elan_i2c_smbus.c+8−2
@@ -56,7 +56,7 @@ · 55 unmodified lines
5656 static int elan_smbus_initialize(struct i2c_client *client)
5757 {
5858 u8 check[ETP_SMBUS_HELLOPACKET_LEN] = { 0x55, 0x55, 0x55, 0x55, 0x55 };
59− u8 values[ETP_SMBUS_HELLOPACKET_LEN] = { 0, 0, 0, 0, 0 };
59+ u8 values[I2C_SMBUS_BLOCK_MAX] = {0};
6060 int len, error;
6161
6262 /* Get hello packet */
@@ -117,12 +117,16 @@ static int elan_smbus_calibrate(struct i2c_client *client) · 54 unmodified lines
117117 static int elan_smbus_calibrate_result(struct i2c_client *client, u8 *val)
118118 {
119119 int error;
120+ u8 buf[I2C_SMBUS_BLOCK_MAX] = {0};
121+
122+ BUILD_BUG_ON(ETP_CALIBRATE_MAX_LEN > sizeof(buf));
120123
121124 error = i2c_smbus_read_block_data(client,
122− ETP_SMBUS_CALIBRATE_QUERY, val);
125+ ETP_SMBUS_CALIBRATE_QUERY, buf);
123126 if (error < 0)
124127 return error;
125128
129+ memcpy(val, buf, ETP_CALIBRATE_MAX_LEN);
126130 return 0;
127131 }
128132
@@ -472,6 +476,8 @@ static int elan_smbus_get_report(struct i2c_client *client, u8 *report) · 343 unmodified lines
472476 {
473477 int len;
474478
479+ BUILD_BUG_ON(I2C_SMBUS_BLOCK_MAX > ETP_SMBUS_REPORT_LEN);
480+
475481 len = i2c_smbus_read_block_data(client,
476482 ETP_SMBUS_PACKET_QUERY,
477483 &report[ETP_SMBUS_REPORT_OFFSET]);
drivers/input/mouse/elantech.c+9−2
@@ -799,7 +799,7 @@ static int elantech_packet_check_v4(struct psmouse *psmouse) · 798 unmodified lines
799799 else if (ic_version == 7 && etd->info.samples[1] == 0x2A)
800800 sanity_check = ((packet[3] & 0x1c) == 0x10);
801801 else
802− sanity_check = ((packet[0] & 0x0c) == 0x04 &&
802+ sanity_check = ((packet[0] & 0x08) == 0x00 &&
803803 (packet[3] & 0x1c) == 0x10);
804804
805805 if (!sanity_check)
@@ -1175,6 +1175,12 @@ static const struct dmi_system_id elantech_dmi_has_middle_button[] = { · 369 unmodified lines
11751175 { }
11761176 };
11771177
1178+static const char * const middle_button_pnp_ids[] = {
1179+ "LEN2131", /* ThinkPad P52 w/ NFC */
1180+ "LEN2132", /* ThinkPad P52 */
1181+ NULL
1182+};
1183+
11781184 /*
11791185 * Set the appropriate event bits for the input subsystem
11801186 */
@@ -1194,7 +1200,8 @@ static int elantech_set_input_params(struct psmouse *psmouse) · 13 unmodified lines
11941200 __clear_bit(EV_REL, dev->evbit);
11951201
11961202 __set_bit(BTN_LEFT, dev->keybit);
1197− if (dmi_check_system(elantech_dmi_has_middle_button))
1203+ if (dmi_check_system(elantech_dmi_has_middle_button) ||
1204+ psmouse_matches_pnp_id(psmouse, middle_button_pnp_ids))
11981205 __set_bit(BTN_MIDDLE, dev->keybit);
11991206 __set_bit(BTN_RIGHT, dev->keybit);
12001207
drivers/input/mouse/psmouse-base.c+6−6
@@ -192,8 +192,8 @@ psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse) · 191 unmodified lines
192192 else
193193 input_report_rel(dev, REL_WHEEL, -wheel);
194194
195− input_report_key(dev, BTN_SIDE, BIT(4));
196− input_report_key(dev, BTN_EXTRA, BIT(5));
195+ input_report_key(dev, BTN_SIDE, packet[3] & BIT(4));
196+ input_report_key(dev, BTN_EXTRA, packet[3] & BIT(5));
197197 break;
198198 }
199199 break;
@@ -203,13 +203,13 @@ psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse) · 3 unmodified lines
203203 input_report_rel(dev, REL_WHEEL, -(s8) packet[3]);
204204
205205 /* Extra buttons on Genius NewNet 3D */
206− input_report_key(dev, BTN_SIDE, BIT(6));
207− input_report_key(dev, BTN_EXTRA, BIT(7));
206+ input_report_key(dev, BTN_SIDE, packet[0] & BIT(6));
207+ input_report_key(dev, BTN_EXTRA, packet[0] & BIT(7));
208208 break;
209209
210210 case PSMOUSE_THINKPS:
211211 /* Extra button on ThinkingMouse */
212− input_report_key(dev, BTN_EXTRA, BIT(3));
212+ input_report_key(dev, BTN_EXTRA, packet[0] & BIT(3));
213213
214214 /*
215215 * Without this bit of weirdness moving up gives wildly
@@ -223,7 +223,7 @@ psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse) · 7 unmodified lines
223223 * Cortron PS2 Trackball reports SIDE button in the
224224 * 4th bit of the first byte.
225225 */
226− input_report_key(dev, BTN_SIDE, BIT(3));
226+ input_report_key(dev, BTN_SIDE, packet[0] & BIT(3));
227227 packet[0] |= BIT(3);
228228 break;
229229
drivers/input/rmi4/Kconfig+1−0
@@ -3,6 +3,7 @@ · 2 unmodified lines
33 #
44 config RMI4_CORE
55 tristate "Synaptics RMI4 bus support"
6+ select IRQ_DOMAIN
67 help
78 Say Y here if you want to support the Synaptics RMI4 bus. This is
89 required for all RMI4 device support.
drivers/input/rmi4/rmi_2d_sensor.c+16−18
@@ -32,15 +32,15 @@ void rmi_2d_sensor_abs_process(struct rmi_2d_sensor *sensor, · 31 unmodified lines
3232 if (obj->type == RMI_2D_OBJECT_NONE)
3333 return;
3434
35− if (axis_align->swap_axes)
36− swap(obj->x, obj->y);
37−
3835 if (axis_align->flip_x)
3936 obj->x = sensor->max_x - obj->x;
4037
4138 if (axis_align->flip_y)
4239 obj->y = sensor->max_y - obj->y;
4340
41+ if (axis_align->swap_axes)
42+ swap(obj->x, obj->y);
43+
4444 /*
4545 * Here checking if X offset or y offset are specified is
4646 * redundant. We just add the offsets or clip the values.
@@ -120,15 +120,15 @@ void rmi_2d_sensor_rel_report(struct rmi_2d_sensor *sensor, int x, int y) · 73 unmodified lines
120120 x = min(RMI_2D_REL_POS_MAX, max(RMI_2D_REL_POS_MIN, (int)x));
121121 y = min(RMI_2D_REL_POS_MAX, max(RMI_2D_REL_POS_MIN, (int)y));
122122
123− if (axis_align->swap_axes)
124− swap(x, y);
125−
126123 if (axis_align->flip_x)
127124 x = min(RMI_2D_REL_POS_MAX, -x);
128125
129126 if (axis_align->flip_y)
130127 y = min(RMI_2D_REL_POS_MAX, -y);
131128
129+ if (axis_align->swap_axes)
130+ swap(x, y);
131+
132132 if (x || y) {
133133 input_report_rel(sensor->input, REL_X, x);
134134 input_report_rel(sensor->input, REL_Y, y);
@@ -141,17 +141,10 @@ static void rmi_2d_sensor_set_input_params(struct rmi_2d_sensor *sensor) · 6 unmodified lines
141141 struct input_dev *input = sensor->input;
142142 int res_x;
143143 int res_y;
144+ int max_x, max_y;
144145 int input_flags = 0;
145146
146147 if (sensor->report_abs) {
147− if (sensor->axis_align.swap_axes) {
148− swap(sensor->max_x, sensor->max_y);
149− swap(sensor->axis_align.clip_x_low,
150− sensor->axis_align.clip_y_low);
151− swap(sensor->axis_align.clip_x_high,
152− sensor->axis_align.clip_y_high);
153− }
154−
155148 sensor->min_x = sensor->axis_align.clip_x_low;
156149 if (sensor->axis_align.clip_x_high)
157150 sensor->max_x = min(sensor->max_x,
@@ -163,14 +156,19 @@ static void rmi_2d_sensor_set_input_params(struct rmi_2d_sensor *sensor) · 5 unmodified lines
163156 sensor->axis_align.clip_y_high);
164157
165158 set_bit(EV_ABS, input->evbit);
166− input_set_abs_params(input, ABS_MT_POSITION_X, 0, sensor->max_x,
167− 0, 0);
168− input_set_abs_params(input, ABS_MT_POSITION_Y, 0, sensor->max_y,
169− 0, 0);
159+
160+ max_x = sensor->max_x;
161+ max_y = sensor->max_y;
162+ if (sensor->axis_align.swap_axes)
163+ swap(max_x, max_y);
164+ input_set_abs_params(input, ABS_MT_POSITION_X, 0, max_x, 0, 0);
165+ input_set_abs_params(input, ABS_MT_POSITION_Y, 0, max_y, 0, 0);
170166
171167 if (sensor->x_mm && sensor->y_mm) {
172168 res_x = (sensor->max_x - sensor->min_x) / sensor->x_mm;
173169 res_y = (sensor->max_y - sensor->min_y) / sensor->y_mm;
170+ if (sensor->axis_align.swap_axes)
171+ swap(res_x, res_y);
174172
175173 input_abs_set_res(input, ABS_X, res_x);
176174 input_abs_set_res(input, ABS_Y, res_y);
drivers/input/rmi4/rmi_bus.c+49−1
@@ -9,6 +9,8 @@ · 8 unmodified lines
99
1010 #include <linux/kernel.h>
1111 #include <linux/device.h>
12+#include <linux/irq.h>
13+#include <linux/irqdomain.h>
1214 #include <linux/list.h>
1315 #include <linux/pm.h>
1416 #include <linux/rmi.h>
@@ -167,6 +169,39 @@ static inline void rmi_function_of_probe(struct rmi_function *fn) · 152 unmodified lines
167169 {}
168170 #endif
169171
172+static struct irq_chip rmi_irq_chip = {
173+ .name = "rmi4",
174+};
175+
176+static int rmi_create_function_irq(struct rmi_function *fn,
177+ struct rmi_function_handler *handler)
178+{
179+ struct rmi_driver_data *drvdata = dev_get_drvdata(&fn->rmi_dev->dev);
180+ int i, error;
181+
182+ for (i = 0; i < fn->num_of_irqs; i++) {
183+ set_bit(fn->irq_pos + i, fn->irq_mask);
184+
185+ fn->irq[i] = irq_create_mapping(drvdata->irqdomain,
186+ fn->irq_pos + i);
187+
188+ irq_set_chip_data(fn->irq[i], fn);
189+ irq_set_chip_and_handler(fn->irq[i], &rmi_irq_chip,
190+ handle_simple_irq);
191+ irq_set_nested_thread(fn->irq[i], 1);
192+
193+ error = devm_request_threaded_irq(&fn->dev, fn->irq[i], NULL,
194+ handler->attention, IRQF_ONESHOT,
195+ dev_name(&fn->dev), fn);
196+ if (error) {
197+ dev_err(&fn->dev, "Error %d registering IRQ\n", error);
198+ return error;
199+ }
200+ }
201+
202+ return 0;
203+}
204+
170205 static int rmi_function_probe(struct device *dev)
171206 {
172207 struct rmi_function *fn = to_rmi_function(dev);
@@ -178,7 +213,14 @@ static int rmi_function_probe(struct device *dev) · 5 unmodified lines
178213
179214 if (handler->probe) {
180215 error = handler->probe(fn);
181− return error;
216+ if (error)
217+ return error;
218+ }
219+
220+ if (fn->num_of_irqs && handler->attention) {
221+ error = rmi_create_function_irq(fn, handler);
222+ if (error)
223+ return error;
182224 }
183225
184226 return 0;
@@ -230,12 +272,18 @@ err_put_device: · 45 unmodified lines
230272
231273 void rmi_unregister_function(struct rmi_function *fn)
232274 {
275+ int i;
276+
233277 rmi_dbg(RMI_DEBUG_CORE, &fn->dev, "Unregistering F%02X.\n",
234278 fn->fd.function_number);
235279
236280 device_del(&fn->dev);
237281 of_node_put(fn->dev.of_node);
238282 put_device(&fn->dev);
283+
284+ for (i = 0; i < fn->num_of_irqs; i++)
285+ irq_dispose_mapping(fn->irq[i]);
286+
239287 }
240288
241289 /**
drivers/input/rmi4/rmi_bus.h+9−1
@@ -14,6 +14,12 @@ · 13 unmodified lines
1414
1515 struct rmi_device;
1616
17+/*
18+ * The interrupt source count in the function descriptor can represent up to
19+ * 6 interrupt sources in the normal manner.
20+ */
21+#define RMI_FN_MAX_IRQS 6
22+
1723 /**
1824 * struct rmi_function - represents the implementation of an RMI4
1925 * function for a particular device (basically, a driver for that RMI4 function)
@@ -26,6 +32,7 @@ struct rmi_device; · 6 unmodified lines
2632 * @irq_pos: The position in the irq bitfield this function holds
2733 * @irq_mask: For convenience, can be used to mask IRQ bits off during ATTN
2834 * interrupt handling.
35+ * @irqs: assigned virq numbers (up to num_of_irqs)
2936 *
3037 * @node: entry in device's list of functions
3138 */
@@ -36,6 +43,7 @@ struct rmi_function { · 4 unmodified lines
3643 struct list_head node;
3744
3845 unsigned int num_of_irqs;
46+ int irq[RMI_FN_MAX_IRQS];
3947 unsigned int irq_pos;
4048 unsigned long irq_mask[];
4149 };
@@ -76,7 +84,7 @@ struct rmi_function_handler { · 34 unmodified lines
7684 void (*remove)(struct rmi_function *fn);
7785 int (*config)(struct rmi_function *fn);
7886 int (*reset)(struct rmi_function *fn);
79− int (*attention)(struct rmi_function *fn, unsigned long *irq_bits);
87+ irqreturn_t (*attention)(int irq, void *ctx);
8088 int (*suspend)(struct rmi_function *fn);
8189 int (*resume)(struct rmi_function *fn);
8290 };
drivers/input/rmi4/rmi_driver.c+20−32
@@ -21,6 +21,7 @@ · 20 unmodified lines
2121 #include <linux/pm.h>
2222 #include <linux/slab.h>
2323 #include <linux/of.h>
24+#include <linux/irqdomain.h>
2425 #include <uapi/linux/input.h>
2526 #include <linux/rmi.h>
2627 #include "rmi_bus.h"
@@ -127,28 +128,11 @@ static int rmi_driver_process_config_requests(struct rmi_device *rmi_dev) · 100 unmodified lines
127128 return 0;
128129 }
129130
130−static void process_one_interrupt(struct rmi_driver_data *data,
131− struct rmi_function *fn)
132−{
133− struct rmi_function_handler *fh;
134−
135− if (!fn || !fn->dev.driver)
136− return;
137−
138− fh = to_rmi_function_handler(fn->dev.driver);
139− if (fh->attention) {
140− bitmap_and(data->fn_irq_bits, data->irq_status, fn->irq_mask,
141− data->irq_count);
142− if (!bitmap_empty(data->fn_irq_bits, data->irq_count))
143− fh->attention(fn, data->fn_irq_bits);
144− }
145−}
146−
147131 static int rmi_process_interrupt_requests(struct rmi_device *rmi_dev)
148132 {
149133 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev);
150134 struct device *dev = &rmi_dev->dev;
151− struct rmi_function *entry;
135+ int i;
152136 int error;
153137
154138 if (!data)
@@ -173,16 +157,8 @@ static int rmi_process_interrupt_requests(struct rmi_device *rmi_dev) · 18 unmodified lines
173157 */
174158 mutex_unlock(&data->irq_mutex);
175159
176− /*
177− * It would be nice to be able to use irq_chip to handle these
178− * nested IRQs. Unfortunately, most of the current customers for
179− * this driver are using older kernels (3.0.x) that don't support
180− * the features required for that. Once they've shifted to more
181− * recent kernels (say, 3.3 and higher), this should be switched to
182− * use irq_chip.
183− */
184− list_for_each_entry(entry, &data->function_list, node)
185− process_one_interrupt(data, entry);
160+ for_each_set_bit(i, data->irq_status, data->irq_count)
161+ handle_nested_irq(irq_find_mapping(data->irqdomain, i));
186162
187163 if (data->input)
188164 input_sync(data->input);
@@ -1001,9 +977,13 @@ EXPORT_SYMBOL_GPL(rmi_driver_resume); · 812 unmodified lines
1001977 static int rmi_driver_remove(struct device *dev)
1002978 {
1003979 struct rmi_device *rmi_dev = to_rmi_device(dev);
980+ struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev);
1004981
1005982 rmi_disable_irq(rmi_dev, false);
1006983
984+ irq_domain_remove(data->irqdomain);
985+ data->irqdomain = NULL;
986+
1007987 rmi_f34_remove_sysfs(rmi_dev);
1008988 rmi_free_function_list(rmi_dev);
1009989
@@ -1035,7 +1015,8 @@ int rmi_probe_interrupts(struct rmi_driver_data *data) · 25 unmodified lines
10351015 {
10361016 struct rmi_device *rmi_dev = data->rmi_dev;
10371017 struct device *dev = &rmi_dev->dev;
1038− int irq_count;
1018+ struct fwnode_handle *fwnode = rmi_dev->xport->dev->fwnode;
1019+ int irq_count = 0;
10391020 size_t size;
10401021 int retval;
10411022
@@ -1046,7 +1027,6 @@ int rmi_probe_interrupts(struct rmi_driver_data *data) · 4 unmodified lines
10461027 * being accessed.
10471028 */
10481029 rmi_dbg(RMI_DEBUG_CORE, dev, "%s: Counting IRQs.\n", __func__);
1049− irq_count = 0;
10501030 data->bootloader_mode = false;
10511031
10521032 retval = rmi_scan_pdt(rmi_dev, &irq_count, rmi_count_irqs);
@@ -1058,6 +1038,15 @@ int rmi_probe_interrupts(struct rmi_driver_data *data) · 5 unmodified lines
10581038 if (data->bootloader_mode)
10591039 dev_warn(dev, "Device in bootloader mode.\n");
10601040
1041+ /* Allocate and register a linear revmap irq_domain */
1042+ data->irqdomain = irq_domain_create_linear(fwnode, irq_count,
1043+ &irq_domain_simple_ops,
1044+ data);
1045+ if (!data->irqdomain) {
1046+ dev_err(&rmi_dev->dev, "Failed to create IRQ domain\n");
1047+ return -ENOMEM;
1048+ }
1049+
10611050 data->irq_count = irq_count;
10621051 data->num_of_irq_regs = (data->irq_count + 7) / 8;
10631052
@@ -1080,10 +1069,9 @@ int rmi_init_functions(struct rmi_driver_data *data) · 16 unmodified lines
10801069 {
10811070 struct rmi_device *rmi_dev = data->rmi_dev;
10821071 struct device *dev = &rmi_dev->dev;
1083− int irq_count;
1072+ int irq_count = 0;
10841073 int retval;
10851074
1086− irq_count = 0;
10871075 rmi_dbg(RMI_DEBUG_CORE, dev, "%s: Creating functions.\n", __func__);
10881076 retval = rmi_scan_pdt(rmi_dev, &irq_count, rmi_create_function);
10891077 if (retval < 0) {
drivers/input/rmi4/rmi_f01.c+5−5
@@ -681,9 +681,9 @@ static int rmi_f01_resume(struct rmi_function *fn) · 680 unmodified lines
681681 return 0;
682682 }
683683
684−static int rmi_f01_attention(struct rmi_function *fn,
685− unsigned long *irq_bits)
684+static irqreturn_t rmi_f01_attention(int irq, void *ctx)
686685 {
686+ struct rmi_function *fn = ctx;
687687 struct rmi_device *rmi_dev = fn->rmi_dev;
688688 int error;
689689 u8 device_status;
@@ -692,7 +692,7 @@ static int rmi_f01_attention(struct rmi_function *fn, · 2 unmodified lines
692692 if (error) {
693693 dev_err(&fn->dev,
694694 "Failed to read device status: %d.\n", error);
695− return error;
695+ return IRQ_RETVAL(error);
696696 }
697697
698698 if (RMI_F01_STATUS_BOOTLOADER(device_status))
@@ -704,11 +704,11 @@ static int rmi_f01_attention(struct rmi_function *fn, · 5 unmodified lines
704704 error = rmi_dev->driver->reset_handler(rmi_dev);
705705 if (error) {
706706 dev_err(&fn->dev, "Device reset failed: %d\n", error);
707− return error;
707+ return IRQ_RETVAL(error);
708708 }
709709 }
710710
711− return 0;
711+ return IRQ_HANDLED;
712712 }
713713
714714 struct rmi_function_handler rmi_f01_handler = {
drivers/input/rmi4/rmi_f03.c+5−4
@@ -244,8 +244,9 @@ static int rmi_f03_config(struct rmi_function *fn) · 243 unmodified lines
244244 return 0;
245245 }
246246
247−static int rmi_f03_attention(struct rmi_function *fn, unsigned long *irq_bits)
247+static irqreturn_t rmi_f03_attention(int irq, void *ctx)
248248 {
249+ struct rmi_function *fn = ctx;
249250 struct rmi_device *rmi_dev = fn->rmi_dev;
250251 struct rmi_driver_data *drvdata = dev_get_drvdata(&rmi_dev->dev);
251252 struct f03_data *f03 = dev_get_drvdata(&fn->dev);
@@ -262,7 +263,7 @@ static int rmi_f03_attention(struct rmi_function *fn, unsigned long *irq_bits) · 10 unmodified lines
262263 /* First grab the data passed by the transport device */
263264 if (drvdata->attn_data.size < ob_len) {
264265 dev_warn(&fn->dev, "F03 interrupted, but data is missing!\n");
265− return 0;
266+ return IRQ_HANDLED;
266267 }
267268
268269 memcpy(obs, drvdata->attn_data.data, ob_len);
@@ -277,7 +278,7 @@ static int rmi_f03_attention(struct rmi_function *fn, unsigned long *irq_bits) · 8 unmodified lines
277278 "%s: Failed to read F03 output buffers: %d\n",
278279 __func__, error);
279280 serio_interrupt(f03->serio, 0, SERIO_TIMEOUT);
280− return error;
281+ return IRQ_RETVAL(error);
281282 }
282283 }
283284
@@ -303,7 +304,7 @@ static int rmi_f03_attention(struct rmi_function *fn, unsigned long *irq_bits) · 19 unmodified lines
303304 serio_interrupt(f03->serio, ob_data, serio_flags);
304305 }
305306
306− return 0;
307+ return IRQ_HANDLED;
307308 }
308309
309310 static void rmi_f03_remove(struct rmi_function *fn)
drivers/input/rmi4/rmi_f11.c+16−26
@@ -570,9 +570,7 @@ static inline u8 rmi_f11_parse_finger_state(const u8 *f_state, u8 n_finger) · 569 unmodified lines
570570 }
571571
572572 static void rmi_f11_finger_handler(struct f11_data *f11,
573− struct rmi_2d_sensor *sensor,
574− unsigned long *irq_bits, int num_irq_regs,
575− int size)
573+ struct rmi_2d_sensor *sensor, int size)
576574 {
577575 const u8 *f_state = f11->data.f_state;
578576 u8 finger_state;
@@ -581,12 +579,7 @@ static void rmi_f11_finger_handler(struct f11_data *f11, · 2 unmodified lines
581579 int rel_fingers;
582580 int abs_size = sensor->nbr_fingers * RMI_F11_ABS_BYTES;
583581
584− int abs_bits = bitmap_and(f11->result_bits, irq_bits, f11->abs_mask,
585− num_irq_regs * 8);
586− int rel_bits = bitmap_and(f11->result_bits, irq_bits, f11->rel_mask,
587− num_irq_regs * 8);
588−
589− if (abs_bits) {
582+ if (sensor->report_abs) {
590583 if (abs_size > size)
591584 abs_fingers = size / RMI_F11_ABS_BYTES;
592585 else
@@ -604,19 +597,7 @@ static void rmi_f11_finger_handler(struct f11_data *f11, · 11 unmodified lines
604597 rmi_f11_abs_pos_process(f11, sensor, &sensor->objs[i],
605598 finger_state, i);
606599 }
607− }
608600
609− if (rel_bits) {
610− if ((abs_size + sensor->nbr_fingers * RMI_F11_REL_BYTES) > size)
611− rel_fingers = (size - abs_size) / RMI_F11_REL_BYTES;
612− else
613− rel_fingers = sensor->nbr_fingers;
614−
615− for (i = 0; i < rel_fingers; i++)
616− rmi_f11_rel_pos_report(f11, i);
617− }
618−
619− if (abs_bits) {
620601 /*
621602 * the absolute part is made in 2 parts to allow the kernel
622603 * tracking to take place.
@@ -638,7 +619,16 @@ static void rmi_f11_finger_handler(struct f11_data *f11, · 15 unmodified lines
638619 }
639620
640621 input_mt_sync_frame(sensor->input);
622+ } else if (sensor->report_rel) {
623+ if ((abs_size + sensor->nbr_fingers * RMI_F11_REL_BYTES) > size)
624+ rel_fingers = (size - abs_size) / RMI_F11_REL_BYTES;
625+ else
626+ rel_fingers = sensor->nbr_fingers;
627+
628+ for (i = 0; i < rel_fingers; i++)
629+ rmi_f11_rel_pos_report(f11, i);
641630 }
631+
642632 }
643633
644634 static int f11_2d_construct_data(struct f11_data *f11)
@@ -1276,8 +1266,9 @@ static int rmi_f11_config(struct rmi_function *fn) · 631 unmodified lines
12761266 return 0;
12771267 }
12781268
1279−static int rmi_f11_attention(struct rmi_function *fn, unsigned long *irq_bits)
1269+static irqreturn_t rmi_f11_attention(int irq, void *ctx)
12801270 {
1271+ struct rmi_function *fn = ctx;
12811272 struct rmi_device *rmi_dev = fn->rmi_dev;
12821273 struct rmi_driver_data *drvdata = dev_get_drvdata(&rmi_dev->dev);
12831274 struct f11_data *f11 = dev_get_drvdata(&fn->dev);
@@ -1303,13 +1294,12 @@ static int rmi_f11_attention(struct rmi_function *fn, unsigned long *irq_bits) · 19 unmodified lines
13031294 data_base_addr, f11->sensor.data_pkt,
13041295 f11->sensor.pkt_size);
13051296 if (error < 0)
1306− return error;
1297+ return IRQ_RETVAL(error);
13071298 }
13081299
1309− rmi_f11_finger_handler(f11, &f11->sensor, irq_bits,
1310− drvdata->num_of_irq_regs, valid_bytes);
1300+ rmi_f11_finger_handler(f11, &f11->sensor, valid_bytes);
13111301
1312− return 0;
1302+ return IRQ_HANDLED;
13131303 }
13141304
13151305 static int rmi_f11_resume(struct rmi_function *fn)
drivers/input/rmi4/rmi_f12.c+4−4
@@ -197,10 +197,10 @@ static void rmi_f12_process_objects(struct f12_data *f12, u8 *data1, int size) · 196 unmodified lines
197197 rmi_2d_sensor_abs_report(sensor, &sensor->objs[i], i);
198198 }
199199
200−static int rmi_f12_attention(struct rmi_function *fn,
201− unsigned long *irq_nr_regs)
200+static irqreturn_t rmi_f12_attention(int irq, void *ctx)
202201 {
203202 int retval;
203+ struct rmi_function *fn = ctx;
204204 struct rmi_device *rmi_dev = fn->rmi_dev;
205205 struct rmi_driver_data *drvdata = dev_get_drvdata(&rmi_dev->dev);
206206 struct f12_data *f12 = dev_get_drvdata(&fn->dev);
@@ -222,7 +222,7 @@ static int rmi_f12_attention(struct rmi_function *fn, · 15 unmodified lines
222222 if (retval < 0) {
223223 dev_err(&fn->dev, "Failed to read object data. Code: %d.\n",
224224 retval);
225− return retval;
225+ return IRQ_RETVAL(retval);
226226 }
227227 }
228228
@@ -232,7 +232,7 @@ static int rmi_f12_attention(struct rmi_function *fn, · 3 unmodified lines
232232
233233 input_mt_sync_frame(sensor->input);
234234
235− return 0;
235+ return IRQ_HANDLED;
236236 }
237237
238238 static int rmi_f12_write_control_regs(struct rmi_function *fn)
drivers/input/rmi4/rmi_f30.c+5−4
@@ -122,8 +122,9 @@ static void rmi_f30_report_button(struct rmi_function *fn, · 121 unmodified lines
122122 }
123123 }
124124
125−static int rmi_f30_attention(struct rmi_function *fn, unsigned long *irq_bits)
125+static irqreturn_t rmi_f30_attention(int irq, void *ctx)
126126 {
127+ struct rmi_function *fn = ctx;
127128 struct f30_data *f30 = dev_get_drvdata(&fn->dev);
128129 struct rmi_driver_data *drvdata = dev_get_drvdata(&fn->rmi_dev->dev);
129130 int error;
@@ -134,7 +135,7 @@ static int rmi_f30_attention(struct rmi_function *fn, unsigned long *irq_bits) · 4 unmodified lines
134135 if (drvdata->attn_data.size < f30->register_count) {
135136 dev_warn(&fn->dev,
136137 "F30 interrupted, but data is missing\n");
137− return 0;
138+ return IRQ_HANDLED;
138139 }
139140 memcpy(f30->data_regs, drvdata->attn_data.data,
140141 f30->register_count);
@@ -147,7 +148,7 @@ static int rmi_f30_attention(struct rmi_function *fn, unsigned long *irq_bits) · 6 unmodified lines
147148 dev_err(&fn->dev,
148149 "%s: Failed to read F30 data registers: %d\n",
149150 __func__, error);
150− return error;
151+ return IRQ_RETVAL(error);
151152 }
152153 }
153154
@@ -159,7 +160,7 @@ static int rmi_f30_attention(struct rmi_function *fn, unsigned long *irq_bits) · 5 unmodified lines
159160 rmi_f03_commit_buttons(f30->f03);
160161 }
161162
162− return 0;
163+ return IRQ_HANDLED;
163164 }
164165
165166 static int rmi_f30_config(struct rmi_function *fn)
drivers/input/rmi4/rmi_f34.c+3−2
@@ -100,8 +100,9 @@ static int rmi_f34_command(struct f34_data *f34, u8 command, · 99 unmodified lines
100100 return 0;
101101 }
102102
103−static int rmi_f34_attention(struct rmi_function *fn, unsigned long *irq_bits)
103+static irqreturn_t rmi_f34_attention(int irq, void *ctx)
104104 {
105+ struct rmi_function *fn = ctx;
105106 struct f34_data *f34 = dev_get_drvdata(&fn->dev);
106107 int ret;
107108 u8 status;
@@ -126,7 +127,7 @@ static int rmi_f34_attention(struct rmi_function *fn, unsigned long *irq_bits) · 18 unmodified lines
126127 complete(&f34->v7.cmd_done);
127128 }
128129
129− return 0;
130+ return IRQ_HANDLED;
130131 }
131132
132133 static int rmi_f34_write_blocks(struct f34_data *f34, const void *data,
drivers/input/rmi4/rmi_f54.c+0−6
@@ -610,11 +610,6 @@ error: · 609 unmodified lines
610610 mutex_unlock(&f54->data_mutex);
611611 }
612612
613−static int rmi_f54_attention(struct rmi_function *fn, unsigned long *irqbits)
614−{
615− return 0;
616−}
617−
618613 static int rmi_f54_config(struct rmi_function *fn)
619614 {
620615 struct rmi_driver *drv = fn->rmi_dev->driver;
@@ -756,6 +751,5 @@ struct rmi_function_handler rmi_f54_handler = { · 135 unmodified lines
756751 .func = 0x54,
757752 .probe = rmi_f54_probe,
758753 .config = rmi_f54_config,
759− .attention = rmi_f54_attention,
760754 .remove = rmi_f54_remove,
761755 };
drivers/input/serio/i8042-x86ia64io.h+7−0
@@ -527,6 +527,13 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = { · 526 unmodified lines
527527 DMI_MATCH(DMI_PRODUCT_NAME, "N24_25BU"),
528528 },
529529 },
530+ {
531+ /* Lenovo LaVie Z */
532+ .matches = {
533+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
534+ DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo LaVie Z"),
535+ },
536+ },
530537 { }
531538 };
532539
drivers/input/touchscreen/silead.c+1−0
@@ -603,6 +603,7 @@ static const struct acpi_device_id silead_ts_acpi_match[] = { · 602 unmodified lines
603603 { "GSL3692", 0 },
604604 { "MSSL1680", 0 },
605605 { "MSSL0001", 0 },
606+ { "MSSL0002", 0 },
606607 { }
607608 };
608609 MODULE_DEVICE_TABLE(acpi, silead_ts_acpi_match);
drivers/iommu/Kconfig+0−1
@@ -142,7 +142,6 @@ config DMAR_TABLE · 141 unmodified lines
142142 config INTEL_IOMMU
143143 bool "Support for Intel IOMMU using DMA Remapping Devices"
144144 depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC)
145− select DMA_DIRECT_OPS
146145 select IOMMU_API
147146 select IOMMU_IOVA
148147 select NEED_DMA_MAP_STATE
drivers/iommu/intel-iommu.c+76−18
@@ -31,7 +31,6 @@ · 30 unmodified lines
3131 #include <linux/pci.h>
3232 #include <linux/dmar.h>
3333 #include <linux/dma-mapping.h>
34−#include <linux/dma-direct.h>
3534 #include <linux/mempool.h>
3635 #include <linux/memory.h>
3736 #include <linux/cpu.h>
@@ -485,14 +484,37 @@ static int dmar_forcedac; · 447 unmodified lines
485484 static int intel_iommu_strict;
486485 static int intel_iommu_superpage = 1;
487486 static int intel_iommu_ecs = 1;
487+static int intel_iommu_pasid28;
488488 static int iommu_identity_mapping;
489489
490490 #define IDENTMAP_ALL 1
491491 #define IDENTMAP_GFX 2
492492 #define IDENTMAP_AZALIA 4
493493
494−#define ecs_enabled(iommu) (intel_iommu_ecs && ecap_ecs(iommu->ecap))
495−#define pasid_enabled(iommu) (ecs_enabled(iommu) && ecap_pasid(iommu->ecap))
494+/* Broadwell and Skylake have broken ECS support — normal so-called "second
495+ * level" translation of DMA requests-without-PASID doesn't actually happen
496+ * unless you also set the NESTE bit in an extended context-entry. Which of
497+ * course means that SVM doesn't work because it's trying to do nested
498+ * translation of the physical addresses it finds in the process page tables,
499+ * through the IOVA->phys mapping found in the "second level" page tables.
500+ *
501+ * The VT-d specification was retroactively changed to change the definition
502+ * of the capability bits and pretend that Broadwell/Skylake never happened...
503+ * but unfortunately the wrong bit was changed. It's ECS which is broken, but
504+ * for some reason it was the PASID capability bit which was redefined (from
505+ * bit 28 on BDW/SKL to bit 40 in future).
506+ *
507+ * So our test for ECS needs to eschew those implementations which set the old
508+ * PASID capabiity bit 28, since those are the ones on which ECS is broken.
509+ * Unless we are working around the 'pasid28' limitations, that is, by putting
510+ * the device into passthrough mode for normal DMA and thus masking the bug.
511+ */
512+#define ecs_enabled(iommu) (intel_iommu_ecs && ecap_ecs(iommu->ecap) && \
513+ (intel_iommu_pasid28 || !ecap_broken_pasid(iommu->ecap)))
514+/* PASID support is thus enabled if ECS is enabled and *either* of the old
515+ * or new capability bits are set. */
516+#define pasid_enabled(iommu) (ecs_enabled(iommu) && \
517+ (ecap_pasid(iommu->ecap) || ecap_broken_pasid(iommu->ecap)))
496518
497519 int intel_iommu_gfx_mapped;
498520 EXPORT_SYMBOL_GPL(intel_iommu_gfx_mapped);
@@ -555,6 +577,11 @@ static int __init intel_iommu_setup(char *str) · 56 unmodified lines
555577 printk(KERN_INFO
556578 "Intel-IOMMU: disable extended context table support\n");
557579 intel_iommu_ecs = 0;
580+ } else if (!strncmp(str, "pasid28", 7)) {
581+ printk(KERN_INFO
582+ "Intel-IOMMU: enable pre-production PASID support\n");
583+ intel_iommu_pasid28 = 1;
584+ iommu_identity_mapping |= IDENTMAP_GFX;
558585 } else if (!strncmp(str, "tboot_noforce", 13)) {
559586 printk(KERN_INFO
560587 "Intel-IOMMU: not forcing on after tboot. This could expose security risk for tboot\n");
@@ -3713,30 +3740,61 @@ static void *intel_alloc_coherent(struct device *dev, size_t size, · 3152 unmodified lines
37133740 dma_addr_t *dma_handle, gfp_t flags,
37143741 unsigned long attrs)
37153742 {
3716− void *vaddr;
3743+ struct page *page = NULL;
3744+ int order;
37173745
3718− vaddr = dma_direct_alloc(dev, size, dma_handle, flags, attrs);
3719− if (iommu_no_mapping(dev) || !vaddr)
3720− return vaddr;
3746+ size = PAGE_ALIGN(size);
3747+ order = get_order(size);
37213748
3722− *dma_handle = __intel_map_single(dev, virt_to_phys(vaddr),
3723− PAGE_ALIGN(size), DMA_BIDIRECTIONAL,
3724− dev->coherent_dma_mask);
3725− if (!*dma_handle)
3726− goto out_free_pages;
3727− return vaddr;
3749+ if (!iommu_no_mapping(dev))
3750+ flags &= ~(GFP_DMA | GFP_DMA32);
3751+ else if (dev->coherent_dma_mask < dma_get_required_mask(dev)) {
3752+ if (dev->coherent_dma_mask < DMA_BIT_MASK(32))
3753+ flags |= GFP_DMA;
3754+ else
3755+ flags |= GFP_DMA32;
3756+ }
3757+
3758+ if (gfpflags_allow_blocking(flags)) {
3759+ unsigned int count = size >> PAGE_SHIFT;
3760+
3761+ page = dma_alloc_from_contiguous(dev, count, order, flags);
3762+ if (page && iommu_no_mapping(dev) &&
3763+ page_to_phys(page) + size > dev->coherent_dma_mask) {
3764+ dma_release_from_contiguous(dev, page, count);
3765+ page = NULL;
3766+ }
3767+ }
3768+
3769+ if (!page)
3770+ page = alloc_pages(flags, order);
3771+ if (!page)
3772+ return NULL;
3773+ memset(page_address(page), 0, size);
3774+
3775+ *dma_handle = __intel_map_single(dev, page_to_phys(page), size,
3776+ DMA_BIDIRECTIONAL,
3777+ dev->coherent_dma_mask);
3778+ if (*dma_handle)
3779+ return page_address(page);
3780+ if (!dma_release_from_contiguous(dev, page, size >> PAGE_SHIFT))
3781+ __free_pages(page, order);
37283782
3729−out_free_pages:
3730− dma_direct_free(dev, size, vaddr, *dma_handle, attrs);
37313783 return NULL;
37323784 }
37333785
37343786 static void intel_free_coherent(struct device *dev, size_t size, void *vaddr,
37353787 dma_addr_t dma_handle, unsigned long attrs)
37363788 {
3737− if (!iommu_no_mapping(dev))
3738− intel_unmap(dev, dma_handle, PAGE_ALIGN(size));
3739− dma_direct_free(dev, size, vaddr, dma_handle, attrs);
3789+ int order;
3790+ struct page *page = virt_to_page(vaddr);
3791+
3792+ size = PAGE_ALIGN(size);
3793+ order = get_order(size);
3794+
3795+ intel_unmap(dev, dma_handle, size);
3796+ if (!dma_release_from_contiguous(dev, page, size >> PAGE_SHIFT))
3797+ __free_pages(page, order);
37403798 }
37413799
37423800 static void intel_unmap_sg(struct device *dev, struct scatterlist *sglist,
drivers/irqchip/irq-gic-v2m.c+1−1
@@ -199,7 +199,7 @@ static int gicv2m_irq_domain_alloc(struct irq_domain *domain, unsigned int virq, · 198 unmodified lines
199199
200200 fail:
201201 irq_domain_free_irqs_parent(domain, virq, nr_irqs);
202− gicv2m_unalloc_msi(v2m, hwirq, get_count_order(nr_irqs));
202+ gicv2m_unalloc_msi(v2m, hwirq, nr_irqs);
203203 return err;
204204 }
205205
drivers/irqchip/irq-gic-v3-its.c+50−12
@@ -182,6 +182,22 @@ static struct its_collection *dev_event_to_col(struct its_device *its_dev, · 181 unmodified lines
182182 return its->collections + its_dev->event_map.col_map[event];
183183 }
184184
185+static struct its_collection *valid_col(struct its_collection *col)
186+{
187+ if (WARN_ON_ONCE(col->target_address & GENMASK_ULL(0, 15)))
188+ return NULL;
189+
190+ return col;
191+}
192+
193+static struct its_vpe *valid_vpe(struct its_node *its, struct its_vpe *vpe)
194+{
195+ if (valid_col(its->collections + vpe->col_idx))
196+ return vpe;
197+
198+ return NULL;
199+}
200+
185201 /*
186202 * ITS command descriptors - parameters to be encoded in a command
187203 * block.
@@ -439,7 +455,7 @@ static struct its_collection *its_build_mapti_cmd(struct its_node *its, · 251 unmodified lines
439455
440456 its_fixup_cmd(cmd);
441457
442− return col;
458+ return valid_col(col);
443459 }
444460
445461 static struct its_collection *its_build_movi_cmd(struct its_node *its,
@@ -458,7 +474,7 @@ static struct its_collection *its_build_movi_cmd(struct its_node *its, · 12 unmodified lines
458474
459475 its_fixup_cmd(cmd);
460476
461− return col;
477+ return valid_col(col);
462478 }
463479
464480 static struct its_collection *its_build_discard_cmd(struct its_node *its,
@@ -476,7 +492,7 @@ static struct its_collection *its_build_discard_cmd(struct its_node *its, · 11 unmodified lines
476492
477493 its_fixup_cmd(cmd);
478494
479− return col;
495+ return valid_col(col);
480496 }
481497
482498 static struct its_collection *its_build_inv_cmd(struct its_node *its,
@@ -494,7 +510,7 @@ static struct its_collection *its_build_inv_cmd(struct its_node *its, · 11 unmodified lines
494510
495511 its_fixup_cmd(cmd);
496512
497− return col;
513+ return valid_col(col);
498514 }
499515
500516 static struct its_collection *its_build_int_cmd(struct its_node *its,
@@ -512,7 +528,7 @@ static struct its_collection *its_build_int_cmd(struct its_node *its, · 11 unmodified lines
512528
513529 its_fixup_cmd(cmd);
514530
515− return col;
531+ return valid_col(col);
516532 }
517533
518534 static struct its_collection *its_build_clear_cmd(struct its_node *its,
@@ -530,7 +546,7 @@ static struct its_collection *its_build_clear_cmd(struct its_node *its, · 11 unmodified lines
530546
531547 its_fixup_cmd(cmd);
532548
533− return col;
549+ return valid_col(col);
534550 }
535551
536552 static struct its_collection *its_build_invall_cmd(struct its_node *its,
@@ -554,7 +570,7 @@ static struct its_vpe *its_build_vinvall_cmd(struct its_node *its, · 17 unmodified lines
554570
555571 its_fixup_cmd(cmd);
556572
557− return desc->its_vinvall_cmd.vpe;
573+ return valid_vpe(its, desc->its_vinvall_cmd.vpe);
558574 }
559575
560576 static struct its_vpe *its_build_vmapp_cmd(struct its_node *its,
@@ -576,7 +592,7 @@ static struct its_vpe *its_build_vmapp_cmd(struct its_node *its, · 15 unmodified lines
576592
577593 its_fixup_cmd(cmd);
578594
579− return desc->its_vmapp_cmd.vpe;
595+ return valid_vpe(its, desc->its_vmapp_cmd.vpe);
580596 }
581597
582598 static struct its_vpe *its_build_vmapti_cmd(struct its_node *its,
@@ -599,7 +615,7 @@ static struct its_vpe *its_build_vmapti_cmd(struct its_node *its, · 16 unmodified lines
599615
600616 its_fixup_cmd(cmd);
601617
602− return desc->its_vmapti_cmd.vpe;
618+ return valid_vpe(its, desc->its_vmapti_cmd.vpe);
603619 }
604620
605621 static struct its_vpe *its_build_vmovi_cmd(struct its_node *its,
@@ -622,7 +638,7 @@ static struct its_vpe *its_build_vmovi_cmd(struct its_node *its, · 16 unmodified lines
622638
623639 its_fixup_cmd(cmd);
624640
625− return desc->its_vmovi_cmd.vpe;
641+ return valid_vpe(its, desc->its_vmovi_cmd.vpe);
626642 }
627643
628644 static struct its_vpe *its_build_vmovp_cmd(struct its_node *its,
@@ -640,7 +656,7 @@ static struct its_vpe *its_build_vmovp_cmd(struct its_node *its, · 11 unmodified lines
640656
641657 its_fixup_cmd(cmd);
642658
643− return desc->its_vmovp_cmd.vpe;
659+ return valid_vpe(its, desc->its_vmovp_cmd.vpe);
644660 }
645661
646662 static u64 its_cmd_ptr_to_offset(struct its_node *its,
@@ -1824,11 +1840,16 @@ static int its_alloc_tables(struct its_node *its) · 1177 unmodified lines
18241840
18251841 static int its_alloc_collections(struct its_node *its)
18261842 {
1843+ int i;
1844+
18271845 its->collections = kcalloc(nr_cpu_ids, sizeof(*its->collections),
18281846 GFP_KERNEL);
18291847 if (!its->collections)
18301848 return -ENOMEM;
18311849
1850+ for (i = 0; i < nr_cpu_ids; i++)
1851+ its->collections[i].target_address = ~0ULL;
1852+
18321853 return 0;
18331854 }
18341855
@@ -2310,7 +2331,14 @@ static int its_irq_domain_activate(struct irq_domain *domain, · 475 unmodified lines
23102331 cpu_mask = cpumask_of_node(its_dev->its->numa_node);
23112332
23122333 /* Bind the LPI to the first possible CPU */
2313− cpu = cpumask_first(cpu_mask);
2334+ cpu = cpumask_first_and(cpu_mask, cpu_online_mask);
2335+ if (cpu >= nr_cpu_ids) {
2336+ if (its_dev->its->flags & ITS_FLAGS_WORKAROUND_CAVIUM_23144)
2337+ return -EINVAL;
2338+
2339+ cpu = cpumask_first(cpu_online_mask);
2340+ }
2341+
23142342 its_dev->event_map.col_map[event] = cpu;
23152343 irq_data_update_effective_affinity(d, cpumask_of(cpu));
23162344
@@ -3399,6 +3427,16 @@ static int redist_disable_lpis(void) · 1082 unmodified lines
33993427 u64 timeout = USEC_PER_SEC;
34003428 u64 val;
34013429
3430+ /*
3431+ * If coming via a CPU hotplug event, we don't need to disable
3432+ * LPIs before trying to re-enable them. They are already
3433+ * configured and all is well in the world. Detect this case
3434+ * by checking the allocation of the pending table for the
3435+ * current CPU.
3436+ */
3437+ if (gic_data_rdist()->pend_page)
3438+ return 0;
3439+
34023440 if (!gic_rdists_supports_plpis()) {
34033441 pr_info("CPU%d: LPIs not supported\n", smp_processor_id());
34043442 return -ENXIO;
drivers/irqchip/irq-ls-scfg-msi.c+7−3
@@ -93,8 +93,12 @@ static void ls_scfg_msi_compose_msg(struct irq_data *data, struct msi_msg *msg) · 92 unmodified lines
9393 msg->address_lo = lower_32_bits(msi_data->msiir_addr);
9494 msg->data = data->hwirq;
9595
96− if (msi_affinity_flag)
97− msg->data |= cpumask_first(data->common->affinity);
96+ if (msi_affinity_flag) {
97+ const struct cpumask *mask;
98+
99+ mask = irq_data_get_effective_affinity_mask(data);
100+ msg->data |= cpumask_first(mask);
101+ }
98102
99103 iommu_dma_map_msi_msg(data->irq, msg);
100104 }
@@ -121,7 +125,7 @@ static int ls_scfg_msi_set_affinity(struct irq_data *irq_data, · 20 unmodified lines

8 more lines aren’t shown here.

drivers/isdn/mISDN/socket.c+1−1

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

drivers/lightnvm/Kconfig+1−1

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

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

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

drivers/md/dm-table.c+4−3

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

drivers/md/dm-thin-metadata.c+0−9

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

drivers/md/dm-thin.c+9−2

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

drivers/md/dm-writecache.c+34−19

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

drivers/md/dm-zoned-target.c+1−1

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

drivers/md/dm.c+3−5

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

drivers/md/md.c+5−3

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

drivers/md/raid10.c+7−0

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

drivers/media/platform/vsp1/vsp1_drm.c+1−3

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

drivers/media/rc/bpf-lirc.c+3−12

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

drivers/media/rc/rc-ir-raw.c+4−4

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

drivers/media/rc/rc-main.c+10−2

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

drivers/misc/cxl/api.c+4−4

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

drivers/misc/ibmasm/ibmasmfs.c+3−24

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

drivers/misc/mei/interrupt.c+4−1

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

drivers/misc/vmw_balloon.c+2−2

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

drivers/mmc/core/slot-gpio.c+1−1

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

drivers/mmc/host/dw_mmc.c+4−3

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

drivers/mmc/host/mxcmmc.c+2−1

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

drivers/mmc/host/renesas_sdhi_internal_dmac.c+7−8

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

drivers/mmc/host/sdhci-esdhc-imx.c+9−12

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

drivers/mmc/host/sunxi-mmc.c+7−0

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

drivers/mtd/chips/cfi_cmdset_0002.c+11−8

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

drivers/mtd/devices/mtd_dataflash.c+2−2

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

drivers/mtd/nand/raw/denali_dt.c+5−1

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

drivers/mtd/nand/raw/mxc_nand.c+4−1

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

drivers/mtd/nand/raw/nand_base.c+1−1

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

drivers/mtd/nand/raw/nand_macronix.c+36−12

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

drivers/mtd/nand/raw/nand_micron.c+2−0

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

drivers/mtd/spi-nor/cadence-quadspi.c+4−2

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

drivers/net/bonding/bond_main.c+12−2

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

drivers/net/bonding/bond_options.c+14−9

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

drivers/net/can/m_can/m_can.c+9−9

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

drivers/net/can/mscan/mpc5xxx_can.c+5−0

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

drivers/net/can/peak_canfd/peak_pciefd_main.c+19−0

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

drivers/net/can/usb/ems_usb.c+1−0

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

drivers/net/can/xilinx_can.c+288−104

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

drivers/net/dsa/mv88e6xxx/chip.c+15−10

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

drivers/net/ethernet/3com/Kconfig+1−1

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

drivers/net/ethernet/amazon/ena/ena_com.c+1−0

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

drivers/net/ethernet/amd/Kconfig+3−3

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

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

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

drivers/net/ethernet/apm/xgene-v2/Kconfig+0−1

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

drivers/net/ethernet/apm/xgene/Kconfig+0−1

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

drivers/net/ethernet/aquantia/atlantic/aq_cfg.h+0−2

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

drivers/net/ethernet/aquantia/atlantic/aq_hw.h+3−1

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

drivers/net/ethernet/aquantia/atlantic/aq_main.c+2−9

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

drivers/net/ethernet/aquantia/atlantic/aq_nic.c+27−20

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

drivers/net/ethernet/aquantia/atlantic/aq_nic.h+1−1

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

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c+1−1

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

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c+3−3

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

drivers/net/ethernet/arc/Kconfig+4−2

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

drivers/net/ethernet/atheros/alx/main.c+7−1

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

drivers/net/ethernet/atheros/atl1c/atl1c_main.c+1−0

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

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

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

drivers/net/ethernet/broadcom/bcmsysport.c+2−2

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

drivers/net/ethernet/broadcom/bcmsysport.h+2−1

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

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

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

drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c+6−0

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

drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c+10−3

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

drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c+6−0

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

drivers/net/ethernet/broadcom/bnxt/bnxt.c+17−7

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

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

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

drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c+27−3

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

drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c+0−2

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

drivers/net/ethernet/broadcom/cnic.c+1−1

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

drivers/net/ethernet/broadcom/tg3.c+13−0

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

drivers/net/ethernet/broadcom/tg3.h+2−0

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

drivers/net/ethernet/cadence/macb.h+11−0

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

drivers/net/ethernet/cadence/macb_main.c+27−11

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

drivers/net/ethernet/cadence/macb_ptp.c+1−4

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

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

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

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

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

drivers/net/ethernet/cavium/liquidio/lio_main.c+4−1

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

drivers/net/ethernet/cavium/octeon/octeon_mgmt.c+11−3

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

drivers/net/ethernet/cavium/thunder/thunder_bgx.c+2−0

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

drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c+2−0

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

drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c+2−4

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

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c+3−1

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

drivers/net/ethernet/chelsio/cxgb4/t4_hw.c+13−22

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

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

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

drivers/net/ethernet/cisco/enic/enic_clsf.c+1−2

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

drivers/net/ethernet/cisco/enic/enic_main.c+34−58

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

drivers/net/ethernet/faraday/ftgmac100.c+2−2

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

drivers/net/ethernet/freescale/dpaa/dpaa_eth.c+8−7

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

drivers/net/ethernet/freescale/fman/fman_port.c+8−0

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

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

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

drivers/net/ethernet/huawei/hinic/hinic_main.c+1−0

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

drivers/net/ethernet/huawei/hinic/hinic_rx.c+1−0

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

drivers/net/ethernet/huawei/hinic/hinic_tx.c+1−0

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

drivers/net/ethernet/ibm/ibmvnic.c+29−14

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

drivers/net/ethernet/intel/i40e/i40e_txrx.c+18−13

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

drivers/net/ethernet/intel/ixgbe/ixgbe_common.c+11−1

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

drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c+1−1

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

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c+14−10

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

drivers/net/ethernet/marvell/Kconfig+3−5

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

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

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

drivers/net/ethernet/mellanox/mlx4/en_rx.c+6−2

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

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

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

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

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

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

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

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

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

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

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

drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c+21−28

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

drivers/net/ethernet/mellanox/mlx5/core/en_main.c+8−7

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

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

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

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

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

drivers/net/ethernet/mellanox/mlx5/core/eswitch.c+8−10

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

drivers/net/ethernet/mellanox/mlx5/core/sriov.c+6−1

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

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

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

drivers/net/ethernet/mellanox/mlx5/core/wq.c+22−12

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

drivers/net/ethernet/mellanox/mlxsw/Kconfig+1−1

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

drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c+29−22

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

drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+24−24

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

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

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

drivers/net/ethernet/netronome/nfp/bpf/main.c+6−3

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

drivers/net/ethernet/netronome/nfp/flower/main.c+3−1

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

drivers/net/ethernet/netronome/nfp/flower/match.c+14−0

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

drivers/net/ethernet/netronome/nfp/flower/offload.c+11−0

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

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

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

drivers/net/ethernet/netronome/nfp/nfp_main.c+1−5

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

drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nffw.c+1−1

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

drivers/net/ethernet/qlogic/qed/qed.h+1−0

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

drivers/net/ethernet/qlogic/qed/qed_dcbx.c+8−11

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

drivers/net/ethernet/qlogic/qed/qed_debug.c+1−1

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

drivers/net/ethernet/qlogic/qed/qed_dev.c+1−1

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

drivers/net/ethernet/qlogic/qed/qed_l2.c+7−8

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

drivers/net/ethernet/qlogic/qed/qed_l2.h+1−1

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

drivers/net/ethernet/qlogic/qed/qed_ll2.c+9−2

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

drivers/net/ethernet/qlogic/qed/qed_main.c+19−3

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

drivers/net/ethernet/qlogic/qed/qed_mcp.c+37−15

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

drivers/net/ethernet/qlogic/qed/qed_sriov.c+18−3

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

drivers/net/ethernet/qlogic/qed/qed_vf.c+2−2

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

drivers/net/ethernet/qlogic/qed/qed_vf.h+6−1

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

drivers/net/ethernet/qlogic/qede/qede_ptp.c+8−2

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

drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c+2−0

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

drivers/net/ethernet/qualcomm/qca_spi.c+12−9

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

drivers/net/ethernet/realtek/r8169.c+3−3

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

drivers/net/ethernet/renesas/Kconfig+0−2

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

drivers/net/ethernet/renesas/ravb_main.c+17−76

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

drivers/net/ethernet/renesas/sh_eth.c+17−77

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

drivers/net/ethernet/sfc/ef10.c+21−9

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

drivers/net/ethernet/sfc/efx.c+9−9

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

drivers/net/ethernet/sfc/farch.c+1−0

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

drivers/net/ethernet/stmicro/stmmac/Kconfig+1−1

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

drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c+14−4

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

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

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

drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c+12−0

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

drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h+2−0

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

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

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

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c+13−1

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

drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c+38−2

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

drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c+0−1

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

drivers/net/ethernet/sun/sungem.c+12−10

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

drivers/net/ethernet/ti/cpsw.c+11−14

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

drivers/net/ethernet/ti/cpsw_ale.c+1−1

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

drivers/net/ethernet/ti/davinci_cpdma.c+1−1

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

drivers/net/ethernet/ti/davinci_emac.c+17−2

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

drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c+1−0

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

drivers/net/geneve.c+1−1

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

drivers/net/hamradio/bpqether.c+2−6

This diff is large: its 22 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.c+46−8

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

drivers/net/hyperv/netvsc_drv.c+16−1

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

drivers/net/hyperv/rndis_filter.c+13−49

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

drivers/net/ieee802154/adf7242.c+32−2

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

drivers/net/ieee802154/at86rf230.c+5−10

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

drivers/net/ieee802154/fakelb.c+1−1

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

drivers/net/ieee802154/mcr20a.c+2−1

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

drivers/net/ipvlan/ipvlan_main.c+31−9

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

drivers/net/net_failover.c+1−1

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

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

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

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

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

drivers/net/phy/marvell.c+36−18

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

drivers/net/phy/mdio-mux-bcm-iproc.c+1−1

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

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

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

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

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

drivers/net/phy/sfp-bus.c+26−9

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

drivers/net/ppp/pppoe.c+1−1

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

drivers/net/tun.c+1−1

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

drivers/net/usb/asix_devices.c+3−1

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

drivers/net/usb/cdc_ncm.c+1−2

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

drivers/net/usb/lan78xx.c+40−4

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

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

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

drivers/net/usb/r8152.c+2−1

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

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

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

drivers/net/usb/smsc75xx.c+62−0

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

drivers/net/virtio_net.c+38−25

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

drivers/net/vxlan.c+88−42

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

drivers/net/wan/lmc/lmc_main.c+1−1

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

drivers/net/wireless/ath/ath10k/mac.c+14−2

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

drivers/net/wireless/ath/ath10k/wmi.h+1−0

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

drivers/net/wireless/ath/wcn36xx/testmode.c+1−1

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

drivers/net/wireless/broadcom/brcm80211/Kconfig+0−1

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

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

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

drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c+7−0

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

drivers/net/wireless/intel/iwlwifi/cfg/9000.c+69−0

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

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

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

drivers/net/wireless/intel/iwlwifi/pcie/drv.c+22−0

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

drivers/net/wireless/marvell/mwifiex/usb.c+2−5

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

drivers/net/wireless/mediatek/mt7601u/phy.c+4−2

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

drivers/net/wireless/quantenna/qtnfmac/Kconfig+1−1

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

drivers/net/wireless/quantenna/qtnfmac/cfg80211.c+1−2

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

drivers/net/wireless/realtek/rtlwifi/base.c+10−7

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

drivers/net/wireless/realtek/rtlwifi/base.h+1−1

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

drivers/net/wireless/realtek/rtlwifi/core.c+1−2

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

drivers/net/wireless/realtek/rtlwifi/pci.c+1−1

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

drivers/net/wireless/realtek/rtlwifi/ps.c+2−2

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

drivers/net/wireless/realtek/rtlwifi/usb.c+1−1

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

drivers/net/xen-netfront.c+16−9

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

drivers/nfc/pn533/usb.c+2−2

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

drivers/nvdimm/claim.c+1−0

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

drivers/nvdimm/pmem.c+2−1

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

drivers/nvme/host/core.c+35−29

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

drivers/nvme/host/fabrics.c+7−3

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

drivers/nvme/host/fabrics.h+2−1

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

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

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

drivers/nvme/host/nvme.h+1−0

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

drivers/nvme/host/pci.c+41−7

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

drivers/nvme/host/rdma.c+41−37

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

drivers/nvme/target/configfs.c+7−2

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

drivers/nvme/target/core.c+9−1

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

drivers/nvme/target/fc.c+35−9

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

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

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

drivers/nvmem/core.c+4−0

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

drivers/of/base.c+3−3

This diff is large: its 27 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+11−0

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

drivers/opp/core.c+1−1

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

drivers/pci/Makefile+3−3

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

drivers/pci/bus.c+3−3

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

drivers/pci/controller/Kconfig+0−3

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

drivers/pci/controller/dwc/Kconfig+0−1

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

drivers/pci/controller/dwc/pcie-designware-host.c+2−1

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

drivers/pci/controller/pci-aardvark.c+1−1

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

drivers/pci/controller/pci-ftpci100.c+3−1

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

drivers/pci/controller/pci-hyperv.c+5−3

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

drivers/pci/controller/pci-v3-semi.c+1−1

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

drivers/pci/controller/pci-versatile.c+1−1

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

drivers/pci/controller/pci-xgene.c+1−1

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

drivers/pci/controller/pcie-mediatek.c+1−1

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

drivers/pci/controller/pcie-mobiveil.c+1−1

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

drivers/pci/controller/pcie-rcar.c+13−3

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

drivers/pci/controller/pcie-xilinx-nwl.c+1−1

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

drivers/pci/controller/pcie-xilinx.c+1−0

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

drivers/pci/endpoint/pci-epf-core.c+43−19

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

drivers/pci/hotplug/acpi_pcihp.c+9−1

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

drivers/pci/hotplug/acpiphp_glue.c+1−1

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

drivers/pci/iov.c+16−0

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

drivers/pci/of.c+1−1

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

drivers/pci/pci-acpi.c+12−0

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

drivers/pci/pci-driver.c+1−0

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

drivers/pci/pci.c+38−0

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

drivers/pci/pci.h+15−0

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

drivers/pci/pcie/err.c+2−0

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

drivers/pci/probe.c+2−2

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

drivers/pci/remove.c+3−2

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

drivers/perf/xgene_pmu.c+1−1

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

drivers/phy/broadcom/phy-brcm-usb-init.c+4−0

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

drivers/phy/motorola/phy-mapphone-mdm6600.c+2−2

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

drivers/pinctrl/actions/pinctrl-owl.c+1−1

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

drivers/pinctrl/bcm/pinctrl-nsp-mux.c+4−2

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

drivers/pinctrl/devicetree.c+5−2

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

drivers/pinctrl/mediatek/pinctrl-mt7622.c+38−16

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

drivers/pinctrl/mediatek/pinctrl-mtk-common.c+0−5

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

drivers/pinctrl/pinctrl-ingenic.c+1−1

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

drivers/pinctrl/pinctrl-single.c+11−3

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

drivers/pinctrl/sh-pfc/pfc-r8a77970.c+6−8

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

drivers/platform/x86/dell-laptop.c+1−1

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

drivers/ptp/ptp_chardev.c+3−2

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

drivers/ptp/ptp_qoriq.c+1−1

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

drivers/rtc/interface.c+5−3

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

drivers/rtc/rtc-mrst.c+1−3

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

drivers/s390/block/dasd.c+67−117

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

drivers/s390/block/dasd_alias.c+3−3

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

drivers/s390/block/dasd_diag.c+2−1

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

drivers/s390/block/dasd_eckd.c+25−21

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

drivers/s390/block/dasd_eer.c+5−5

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

drivers/s390/block/dasd_fba.c+4−2

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

drivers/s390/block/dasd_int.h+5−29

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

drivers/s390/cio/Makefile+1−0

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

drivers/s390/cio/vfio_ccw_cp.c+75−65

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

drivers/s390/cio/vfio_ccw_drv.c+4−1

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

drivers/s390/cio/vfio_ccw_fsm.c+16−1

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

drivers/s390/cio/vfio_ccw_trace.h+54−0

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

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

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

drivers/s390/net/qeth_core_main.c+28−19

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

drivers/s390/net/qeth_l2_main.c+15−9

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

drivers/s390/net/qeth_l3_main.c+2−1

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

drivers/scsi/aacraid/aachba.c+7−8

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

drivers/scsi/cxlflash/main.h+2−2

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

drivers/scsi/cxlflash/ocxl_hw.c+2−3

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

drivers/scsi/fcoe/fcoe_ctlr.c+3−3

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

drivers/scsi/hpsa.c+21−4

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

drivers/scsi/hpsa.h+1−0

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

drivers/scsi/ipr.c+0−2

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

drivers/scsi/libfc/fc_rport.c+1−0

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

drivers/scsi/libiscsi.c+6−6

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

drivers/scsi/mpt3sas/mpt3sas_base.c+8−8

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

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

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

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

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

drivers/scsi/qla2xxx/qla_attr.c+1−0

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

drivers/scsi/qla2xxx/qla_def.h+2−0

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

drivers/scsi/qla2xxx/qla_gbl.h+1−0

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

drivers/scsi/qla2xxx/qla_gs.c+30−14

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

drivers/scsi/qla2xxx/qla_init.c+11−10

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

drivers/scsi/qla2xxx/qla_inline.h+2−0

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

drivers/scsi/qla2xxx/qla_iocb.c+27−26

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

drivers/scsi/qla2xxx/qla_isr.c+3−0

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

drivers/scsi/qla2xxx/qla_mbx.c+6−0

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

drivers/scsi/qla2xxx/qla_mid.c+9−2

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

drivers/scsi/qla2xxx/qla_os.c+24−31

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

drivers/scsi/qla2xxx/qla_sup.c+3−0

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

drivers/scsi/qla2xxx/qla_target.c+3−4

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

drivers/scsi/scsi_debug.c+1−1

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

drivers/scsi/scsi_error.c+14−0

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

drivers/scsi/scsi_transport_fc.c+1−1

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

drivers/scsi/sd_zbc.c+3−2

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

drivers/scsi/sg.c+46−11

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

drivers/scsi/sr.c+21−8

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

drivers/scsi/vmw_pvscsi.c+8−3

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

drivers/scsi/xen-scsifront.c+26−7

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

drivers/soc/imx/gpc.c+21−0

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

drivers/soc/imx/gpcv2.c+9−4

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

drivers/soc/qcom/Kconfig+2−1

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

drivers/soc/renesas/rcar-sysc.c+29−6

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

drivers/staging/android/ashmem.c+2−0

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

drivers/staging/android/ion/ion_heap.c+1−1

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

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

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

drivers/staging/ks7010/ks_hostif.c+6−6

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

drivers/staging/media/omap4iss/iss_video.c+2−1

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

drivers/staging/rtl8188eu/Kconfig+0−1

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

drivers/staging/rtl8188eu/core/rtw_recv.c+114−47

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

drivers/staging/rtl8188eu/core/rtw_security.c+46−46

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

drivers/staging/rtl8723bs/core/rtw_ap.c+1−1

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

drivers/staging/rtlwifi/rtl8822be/hw.c+1−1

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

drivers/staging/rtlwifi/wifi.h+1−0

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

drivers/staging/speakup/speakup_soft.c+5−1

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

drivers/staging/typec/Kconfig+1−0

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

drivers/target/iscsi/cxgbit/cxgbit_target.c+9−7

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

drivers/target/target_core_pr.c+10−5

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

drivers/target/target_core_user.c+36−8

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

drivers/thunderbolt/domain.c+4−0

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

drivers/tty/n_tty.c+32−23

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

drivers/tty/serdev/core.c+1−0

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

drivers/tty/serial/8250/8250_pci.c+0−2

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

drivers/tty/vt/vt.c+2−2

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

drivers/uio/uio.c+103−36

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

drivers/usb/chipidea/Kconfig+1−8

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

drivers/usb/chipidea/Makefile+1−2

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

drivers/usb/chipidea/ci.h+0−8

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

drivers/usb/chipidea/host.c+4−1

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

drivers/usb/chipidea/ulpi.c+3−0

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

drivers/usb/class/cdc-acm.c+6−0

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

drivers/usb/core/hub.c+6−2

This diff is large: its 17 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/dwc2/core.h+3−0

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

drivers/usb/dwc2/gadget.c+15−11

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

drivers/usb/dwc2/hcd.c+118−29

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

drivers/usb/dwc2/hcd.h+8−0

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

drivers/usb/dwc2/hcd_intr.c+16−4

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

drivers/usb/dwc2/hcd_queue.c+4−1

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

drivers/usb/dwc3/core.c+13−10

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

drivers/usb/dwc3/dwc3-of-simple.c+2−1

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

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

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

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

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

drivers/usb/dwc3/ep0.c+0−3

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

drivers/usb/gadget/composite.c+3−1

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

drivers/usb/gadget/function/f_fs.c+19−9

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

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

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

drivers/usb/gadget/function/u_audio.c+33−55

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

drivers/usb/gadget/udc/aspeed-vhub/Kconfig+1−0

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

drivers/usb/gadget/udc/aspeed-vhub/ep0.c+10−1

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

drivers/usb/gadget/udc/aspeed-vhub/epn.c+11−3

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

drivers/usb/gadget/udc/aspeed-vhub/vhub.h+33−0

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

drivers/usb/gadget/udc/r8a66597-udc.c+3−3

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

drivers/usb/host/xhci-dbgcap.c+8−4

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

drivers/usb/host/xhci-mem.c+3−3

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

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

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

drivers/usb/host/xhci-trace.h+31−5

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

drivers/usb/host/xhci.c+44−4

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

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

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

drivers/usb/misc/yurex.c+6−17

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

drivers/usb/phy/phy-fsl-usb.c+3−1

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

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

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

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

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

drivers/usb/serial/keyspan_pda.c+3−1

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

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

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

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

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

drivers/usb/typec/ucsi/ucsi.c+13−0

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

drivers/usb/typec/ucsi/ucsi_acpi.c+5−0

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

drivers/vfio/pci/Kconfig+10−2

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

drivers/vfio/pci/vfio_pci.c+4−0

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

drivers/vfio/vfio_iommu_spapr_tce.c+5−5

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

drivers/vfio/vfio_iommu_type1.c+7−9

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

drivers/vhost/net.c+2−1

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

drivers/vhost/vhost.c+6−3

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

drivers/virtio/virtio_balloon.c+2−0

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

drivers/xen/Makefile+1−1

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

drivers/xen/events/events_base.c+0−2

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

drivers/xen/grant-table.c+2−2

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

drivers/xen/manage.c+15−3

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

drivers/xen/privcmd-buf.c+210−0

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

drivers/xen/privcmd.c+9−0

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

drivers/xen/privcmd.h+3−0

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

drivers/xen/xen-scsiback.c+13−3

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

fs/aio.c+6−147

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

fs/autofs/Makefile+2−2

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

fs/autofs/dev-ioctl.c+13−9

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

fs/autofs/init.c+1−1

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

fs/binfmt_elf.c+2−3

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

fs/block_dev.c+5−4

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

fs/btrfs/extent_io.c+9−3

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

fs/btrfs/inode.c+5−2

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

fs/btrfs/ioctl.c+7−5

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

fs/btrfs/qgroup.c+13−4

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

fs/btrfs/scrub.c+9−8

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

fs/btrfs/volumes.c+2−0

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

fs/cachefiles/bind.c+2−1

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

fs/cachefiles/namei.c+1−2

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

fs/cachefiles/rdwr.c+12−5

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

fs/ceph/inode.c+1−0

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

fs/cifs/cifs_debug.c+29−0

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

fs/cifs/cifsencrypt.c+15−5

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

fs/cifs/cifsglob.h+39−4

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

fs/cifs/cifsproto.h+3−5

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

fs/cifs/cifssmb.c+12−6

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

fs/cifs/connect.c+11−5

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

fs/cifs/inode.c+11−2

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

fs/cifs/misc.c+6−3

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

fs/cifs/smb1ops.c+1−0

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

fs/cifs/smb2file.c+4−7

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

fs/cifs/smb2misc.c+17−2

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

fs/cifs/smb2ops.c+216−73

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

fs/cifs/smb2pdu.c+305−60

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

fs/cifs/smb2pdu.h+22−7

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

fs/cifs/smb2proto.h+6−0

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

fs/cifs/smb2transport.c+55−19

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

fs/cifs/smbdirect.c+7−15

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

fs/cifs/smbdirect.h+2−2

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

fs/cifs/trace.h+2−1

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

fs/cifs/transport.c+97−97

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

fs/dcache.c+6−7

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

fs/eventfd.c+6−13

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

fs/eventpoll.c+5−10

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

fs/exec.c+3−4

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

fs/ext2/ext2.h+0−2

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

fs/ext2/super.c+3−3

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

fs/ext4/balloc.c+16−8

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

fs/ext4/ext4.h+1−8

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

fs/ext4/ext4_extents.h+1−0

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

fs/ext4/extents.c+6−0

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

fs/ext4/ialloc.c+19−3

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

fs/ext4/inline.c+13−45

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

fs/ext4/inode.c+11−12

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

fs/ext4/mballoc.c+4−2

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

fs/ext4/mmp.c+2−5

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

fs/ext4/super.c+82−14

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

fs/ext4/xattr.c+18−22

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

fs/fat/inode.c+13−7

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

fs/fscache/cache.c+1−1

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

fs/fscache/cookie.c+4−3

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

fs/fscache/object.c+1−0

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

fs/fscache/operation.c+4−2

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

fs/hugetlbfs/inode.c+2−0

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

fs/inode.c+6−0

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

fs/internal.h+0−1

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

fs/iomap.c+1−1

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

fs/jbd2/transaction.c+8−1

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

fs/jfs/jfs_dinode.h+7−0

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

fs/jfs/jfs_incore.h+1−0

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

fs/jfs/super.c+1−2

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

fs/jfs/xattr.c+6−4

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

fs/namespace.c+26−2

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

fs/nfs/delegation.c+3−1

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

fs/nfs/flexfilelayout/flexfilelayout.c+16−5

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

fs/nfs/nfs4proc.c+39−20

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

fs/nfs/pnfs.h+5−0

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

fs/pipe.c+9−13

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

fs/proc/base.c+23−5

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

fs/proc/generic.c+10−1

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

fs/proc/task_mmu.c+2−1

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

fs/quota/dquot.c+2−5

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

fs/reiserfs/prints.c+81−60

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

fs/select.c+0−23

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

fs/squashfs/block.c+2−0

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

fs/squashfs/cache.c+3−0

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

fs/squashfs/file.c+34−24

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

fs/squashfs/file_cache.c+2−2

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

fs/squashfs/file_direct.c+12−12

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

fs/squashfs/fragment.c+10−7

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

fs/squashfs/squashfs.h+2−1

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

fs/squashfs/squashfs_fs.h+6−0

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

fs/squashfs/squashfs_fs_sb.h+1−0

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

fs/squashfs/super.c+3−2

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

fs/timerfd.c+11−11

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

fs/udf/balloc.c+2−3

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

fs/udf/directory.c+4−4

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

fs/udf/inode.c+4−4

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

fs/udf/namei.c+3−11

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

fs/udf/udfdecl.h+7−2

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

fs/userfaultfd.c+10−6

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

fs/xfs/libxfs/xfs_ag_resv.c+27−4

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

fs/xfs/libxfs/xfs_alloc.c+3−2

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

fs/xfs/libxfs/xfs_bmap.c+26−0

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

fs/xfs/libxfs/xfs_bmap.h+2−0

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

fs/xfs/libxfs/xfs_format.h+5−0

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

fs/xfs/libxfs/xfs_inode_buf.c+51−31

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

fs/xfs/libxfs/xfs_rtbitmap.c+2−2

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

fs/xfs/xfs_bmap_util.c+52−54

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

fs/xfs/xfs_fsmap.c+2−2

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

fs/xfs/xfs_fsops.c+1−1

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

fs/xfs/xfs_inode.c+21−36

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

fs/xfs/xfs_iomap.c+14−1

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

fs/xfs/xfs_trans.c+6−1

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

include/acpi/processor.h+1−2

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

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

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

include/asm-generic/tlb.h+8−0

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

include/crypto/if_alg.h+2−1

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

include/dt-bindings/clock/imx6ul-clock.h+19−21

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

include/linux/acpi.h+3−0

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

include/linux/atmdev.h+15−0

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

include/linux/backing-dev-defs.h+1−1

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

include/linux/blk-mq.h+14−0

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

include/linux/blkdev.h+2−2

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

include/linux/bpf-cgroup.h+27−0

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

include/linux/bpf.h+20−0

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

include/linux/bpf_lirc.h+3−2

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

include/linux/bpfilter.h+3−3

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

include/linux/compat.h+7−1

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

include/linux/compiler-gcc.h+47−7

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

include/linux/compiler_types.h+18−0

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

include/linux/cpu.h+1−1

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

include/linux/dax.h+1−1

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

include/linux/delayacct.h+1−1

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

include/linux/dma-contiguous.h+1−1

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

include/linux/eventfd.h+1−0

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

include/linux/filter.h+29−32

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

include/linux/fs.h+1−2

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

include/linux/fsl/guts.h+1−0

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

include/linux/ftrace.h+0−2

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

include/linux/hid.h+2−1

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

include/linux/if_bridge.h+2−2

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

include/linux/igmp.h+2−0

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

include/linux/iio/buffer-dma.h+1−1

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

include/linux/input/mt.h+1−1

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

include/linux/intel-iommu.h+1−0

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

include/linux/irq.h+1−0

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

include/linux/irqdesc.h+0−5

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

include/linux/kernel.h+1−1

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

include/linux/kthread.h+0−1

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

include/linux/libata.h+24−0

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

include/linux/marvell_phy.h+2−0

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

include/linux/memory.h+1−0

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

include/linux/mlx5/driver.h+15−3

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

include/linux/mlx5/eswitch.h+2−0

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

include/linux/mlx5/mlx5_ifc.h+1−1

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

include/linux/mm.h+21−2

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

include/linux/mod_devicetable.h+1−0

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

include/linux/net.h+0−1

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

include/linux/netdevice.h+20−0

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

include/linux/nfs_xdr.h+2−0

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

include/linux/pci.h+2−1

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

include/linux/perf_event.h+1−0

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

include/linux/pm_domain.h+3−3

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

include/linux/poll.h+6−6

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

include/linux/refcount.h+3−1

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

include/linux/ring_buffer.h+1−0

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

include/linux/rmi.h+2−0

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

include/linux/rtmutex.h+7−0

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

include/linux/scatterlist.h+0−18

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

include/linux/sched.h+13−12

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

include/linux/sched/task.h+1−1

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

include/linux/skbuff.h+7−6

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

include/linux/slub_def.h+4−0

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

include/linux/spinlock.h+5−0

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

include/linux/syscalls.h+5−0

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

include/linux/uio_driver.h+1−1

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

include/net/af_vsock.h+2−2

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

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

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

include/net/cfg80211.h+6−6

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

include/net/ip6_fib.h+8−2

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

include/net/ip6_route.h+6−0

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

include/net/ipv6.h+4−9

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

include/net/iucv/af_iucv.h+2−0

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

include/net/llc.h+5−0

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

include/net/net_namespace.h+1−0

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

include/net/netfilter/nf_tables.h+2−3

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

include/net/netfilter/nf_tables_core.h+6−0

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

include/net/netfilter/nf_tproxy.h+2−2

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

include/net/netns/ipv6.h+0−1

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

include/net/pkt_cls.h+5−0

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

include/net/sctp/sctp.h+2−1

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

include/net/tc_act/tc_csum.h+0−1

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

include/net/tc_act/tc_tunnel_key.h+0−1

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

include/net/tcp.h+13−3

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

include/net/tls.h+4−2

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

include/net/udp.h+1−1

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

include/net/xdp_sock.h+4−0

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

include/rdma/ib_verbs.h+8−5

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

include/uapi/linux/aio_abi.h+4−8

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

include/uapi/linux/bpf.h+23−5

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

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

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

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

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

include/uapi/linux/nbd.h+3−0

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

include/uapi/linux/perf_event.h+2−0

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

include/uapi/linux/rseq.h+58−44

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

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

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

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

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

include/uapi/linux/types_32_64.h+0−50

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

include/xen/xen.h+5−1

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

init/Kconfig+3−8

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

init/main.c+1−1

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

ipc/sem.c+1−1

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

ipc/shm.c+12−0

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

kernel/Makefile+1−0

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

kernel/auditsc.c+9−4

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

kernel/bpf/arraymap.c+1−1

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

kernel/bpf/btf.c+36−24

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

kernel/bpf/cgroup.c+54−0

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

kernel/bpf/core.c+33−6

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

kernel/bpf/cpumap.c+9−6

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

kernel/bpf/devmap.c+28−5

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

kernel/bpf/hashtab.c+11−5

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

kernel/bpf/sockmap.c+217−89

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

kernel/bpf/syscall.c+27−88

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

kernel/bpf/verifier.c+9−2

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

kernel/cpu.c+1−1

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

kernel/dma/Kconfig+50−0

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

kernel/dma/Makefile+11−0

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

kernel/dma/coherent.crenamed from drivers/base/dma-coherent.c+0−0

File renamed without changes.

kernel/dma/contiguous.crenamed from drivers/base/dma-contiguous.c+0−0

File renamed without changes.

kernel/dma/debug.crenamed from lib/dma-debug.c+0−0

File renamed without changes.

kernel/dma/direct.crenamed from lib/dma-direct.c+0−0

File renamed without changes.

kernel/dma/mapping.crenamed from drivers/base/dma-mapping.c+1−1

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

kernel/dma/noncoherent.crenamed from lib/dma-noncoherent.c+0−0

File renamed without changes.

kernel/dma/swiotlb.crenamed from lib/swiotlb.c+1−0

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

kernel/dma/virt.crenamed from lib/dma-virt.c+0−2

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

kernel/events/core.c+9−3

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

kernel/events/ring_buffer.c+3−3

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

kernel/fork.c+28−5

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

kernel/irq/debugfs.c+1−0

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

kernel/irq/manage.c+8−1

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

kernel/kthread.c+31−7

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

kernel/locking/lockdep.c+6−6

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

kernel/locking/rtmutex.c+25−4

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

kernel/locking/rwsem.c+1−0

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

kernel/memremap.c+19−3

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

kernel/rseq.c+29−19

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

kernel/sched/core.c+32−35

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

kernel/sched/cpufreq_schedutil.c+1−1

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

kernel/sched/deadline.c+17−2

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

kernel/sched/fair.c+22−23

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

kernel/sched/rt.c+12−6

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

kernel/sched/sched.h+9−2

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

kernel/sched/topology.c+1−1

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

kernel/softirq.c+14−6

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

kernel/stop_machine.c+13−1

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

kernel/time/hrtimer.c+1−1

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

kernel/time/posix-cpu-timers.c+0−2

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

kernel/time/tick-common.c+1−2

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

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

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

kernel/time/time.c+4−2

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

kernel/trace/ftrace.c+1−12

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

kernel/trace/ring_buffer.c+16−0

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

kernel/trace/trace.c+16−9

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

kernel/trace/trace.h+1−3

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

kernel/trace/trace_events_filter.c+14−1

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

kernel/trace/trace_events_hist.c+1−1

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

kernel/trace/trace_events_trigger.c+13−5

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

kernel/trace/trace_functions_graph.c+4−1

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

kernel/trace/trace_kprobe.c+18−3

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

kernel/trace/trace_output.c+3−2

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

lib/Kconfig+1−46

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

lib/Kconfig.kasan+2−1

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

lib/Kconfig.ubsan+0−11

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

lib/Makefile+1−11

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

lib/dec_and_lock.c+16−0

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

lib/iov_iter.c+73−4

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

lib/percpu_ida.c+1−1

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

lib/refcount.c+28−0

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

lib/rhashtable.c+19−8

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

lib/scatterlist.c+0−6

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

lib/test_bpf.c+20−0

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

lib/test_printf.c+0−7

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

mm/backing-dev.c+7−13

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

mm/debug.c+16−2

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

mm/gup.c+0−2

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

mm/huge_memory.c+2−0

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

mm/hugetlb.c+8−0

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

mm/kasan/kasan.c+3−2

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

mm/memblock.c+4−1

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

mm/memcontrol.c+12−5

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

mm/memory.c+5−4

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

mm/mempolicy.c+1−0

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

mm/mmap.c+26−41

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

mm/nommu.c+6−6

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

mm/page_alloc.c+4−4

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

mm/rmap.c+7−1

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

mm/shmem.c+1−0

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

mm/slab_common.c+4−0

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

mm/slub.c+6−1

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

mm/vmstat.c+0−2

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

mm/zswap.c+9−0

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

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

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

net/9p/client.c+2−1

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

net/Makefile+0−4

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

net/appletalk/ddp.c+1−1

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

net/atm/br2684.c+1−2

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

net/atm/clip.c+1−2

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

net/atm/common.c+9−5

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

net/atm/common.h+1−1

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

net/atm/lec.c+1−2

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

net/atm/mpc.c+1−2

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

net/atm/pppoatm.c+1−2

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

net/atm/pvc.c+1−1

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

net/atm/raw.c+2−2

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

net/atm/svc.c+1−1

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

net/ax25/af_ax25.c+1−1

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

net/batman-adv/bat_iv_ogm.c+3−1

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

net/batman-adv/bat_v.c+3−1

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

net/batman-adv/debugfs.c+40−0

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

net/batman-adv/debugfs.h+11−0

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

net/batman-adv/hard-interface.c+31−6

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

net/batman-adv/translation-table.c+5−2

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

net/bluetooth/af_bluetooth.c+5−2

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

net/bluetooth/hci_sock.c+1−1

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

net/bluetooth/l2cap_sock.c+1−1

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

net/bluetooth/rfcomm/sock.c+1−1

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

net/bluetooth/sco.c+1−1

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

net/bpf/test_run.c+14−3

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

net/bpfilter/.gitignore+1−0

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

net/bpfilter/Kconfig+1−1

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

net/bpfilter/Makefile+2−13

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

net/bpfilter/bpfilter_kern.c+5−6

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

net/bpfilter/bpfilter_umh_blob.S+7−0

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

net/caif/caif_dev.c+3−1

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

net/caif/caif_socket.c+8−4

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

net/can/bcm.c+1−1

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

net/can/raw.c+1−1

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

net/core/datagram.c+9−4

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

net/core/dev.c+12−9

This diff is large: its 45 lines aren’t shown here.

net/core/dev_ioctl.c+2−9

This diff is large: its 19 lines aren’t shown here.

net/core/fib_rules.c+79−1

This diff is large: its 108 lines aren’t shown here.

net/core/filter.c+186−82

This diff is large: its 601 lines aren’t shown here.

net/core/gen_stats.c+14−2

This diff is large: its 23 lines aren’t shown here.

net/core/lwt_bpf.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/core/page_pool.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/core/rtnetlink.c+6−3

This diff is large: its 16 lines aren’t shown here.

net/core/skbuff.c+7−7

This diff is large: its 42 lines aren’t shown here.

net/core/sock.c+8−5

This diff is large: its 41 lines aren’t shown here.

net/core/xdp.c+2−1

This diff is large: its 10 lines aren’t shown here.

net/dccp/ccids/ccid2.c+4−2

This diff is large: its 19 lines aren’t shown here.

net/dccp/ccids/ccid3.c+9−7

This diff is large: its 49 lines aren’t shown here.

net/dccp/dccp.h+2−1

This diff is large: its 10 lines aren’t shown here.

net/dccp/ipv4.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/dccp/ipv6.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/dccp/proto.c+11−2

This diff is large: its 31 lines aren’t shown here.

net/decnet/af_decnet.c+3−3

This diff is large: its 23 lines aren’t shown here.

net/dns_resolver/dns_key.c+16−12

This diff is large: its 52 lines aren’t shown here.

net/dsa/slave.c+8−2

This diff is large: its 38 lines aren’t shown here.

net/ieee802154/6lowpan/core.c+6−0

This diff is large: its 19 lines aren’t shown here.

net/ieee802154/socket.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/ipv4/af_inet.c+4−4

This diff is large: its 36 lines aren’t shown here.

net/ipv4/fib_frontend.c+3−2

This diff is large: its 22 lines aren’t shown here.

net/ipv4/fou.c+1−3

This diff is large: its 11 lines aren’t shown here.

net/ipv4/gre_offload.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ipv4/igmp.c+44−18

This diff is large: its 154 lines aren’t shown here.

net/ipv4/inet_fragment.c+4−4

This diff is large: its 29 lines aren’t shown here.

net/ipv4/inet_hashtables.c+2−2

This diff is large: its 12 lines aren’t shown here.

net/ipv4/ip_fragment.c+5−0

This diff is large: its 17 lines aren’t shown here.

net/ipv4/ip_output.c+4−1

This diff is large: its 19 lines aren’t shown here.

net/ipv4/ip_sockglue.c+7−4

This diff is large: its 39 lines aren’t shown here.

net/ipv4/netfilter/ip_tables.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/ipv4/netfilter/nf_tproxy_ipv4.c+12−6

This diff is large: its 52 lines aren’t shown here.

net/ipv4/sysctl_net_ipv4.c+16−7

This diff is large: its 60 lines aren’t shown here.

net/ipv4/tcp.c+27−12

This diff is large: its 104 lines aren’t shown here.

net/ipv4/tcp_bbr.c+4−0

This diff is large: its 11 lines aren’t shown here.

net/ipv4/tcp_dctcp.c+16−59

This diff is large: its 117 lines aren’t shown here.

net/ipv4/tcp_input.c+71−16

This diff is large: its 215 lines aren’t shown here.

net/ipv4/tcp_ipv4.c+18−5

This diff is large: its 30 lines aren’t shown here.

net/ipv4/tcp_output.c+24−12

This diff is large: its 107 lines aren’t shown here.

net/ipv4/udp.c+5−5

This diff is large: its 37 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/Kconfig+1−0

This diff is large: its 8 lines aren’t shown here.

net/ipv6/addrconf.c+8−4

This diff is large: its 37 lines aren’t shown here.

net/ipv6/af_inet6.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/ipv6/calipso.c+3−6

This diff is large: its 30 lines aren’t shown here.

net/ipv6/datagram.c+5−2

This diff is large: its 19 lines aren’t shown here.

net/ipv6/esp6.c+3−1

This diff is large: its 12 lines aren’t shown here.

net/ipv6/exthdrs.c+30−81

This diff is large: its 151 lines aren’t shown here.

net/ipv6/icmp.c+3−2

This diff is large: its 13 lines aren’t shown here.

net/ipv6/inet6_hashtables.c+2−2

This diff is large: its 12 lines aren’t shown here.

net/ipv6/ip6_fib.c+89−72

This diff is large: its 263 lines aren’t shown here.

net/ipv6/ip6_gre.c+2−1

This diff is large: its 17 lines aren’t shown here.

net/ipv6/ip6_output.c+4−1

This diff is large: its 19 lines aren’t shown here.

net/ipv6/ip6_tunnel.c+2−6

This diff is large: its 15 lines aren’t shown here.

net/ipv6/ip6_vti.c+6−5

This diff is large: its 27 lines aren’t shown here.

net/ipv6/ipv6_sockglue.c+22−10

This diff is large: its 56 lines aren’t shown here.

net/ipv6/mcast.c+52−24

This diff is large: its 223 lines aren’t shown here.

net/ipv6/ndisc.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ipv6/netfilter/ip6_tables.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/ipv6/netfilter/nf_conntrack_reasm.c+5−3

This diff is large: its 29 lines aren’t shown here.

net/ipv6/netfilter/nf_tproxy_ipv6.c+12−6

This diff is large: its 51 lines aren’t shown here.

net/ipv6/raw.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/ipv6/route.c+39−16

This diff is large: its 164 lines aren’t shown here.

net/ipv6/seg6_hmac.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ipv6/seg6_iptunnel.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ipv6/tcp_ipv6.c+4−2

This diff is large: its 20 lines aren’t shown here.

net/iucv/af_iucv.c+5−2

This diff is large: its 25 lines aren’t shown here.

net/kcm/kcmsock.c+5−5

This diff is large: its 31 lines aren’t shown here.

net/key/af_key.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/l2tp/l2tp_ip.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/l2tp/l2tp_ip6.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/l2tp/l2tp_ppp.c+10−5

This diff is large: its 32 lines aren’t shown here.

net/llc/af_llc.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/llc/llc_core.c+2−2

This diff is large: its 11 lines aren’t shown here.

net/mac80211/rx.c+1−4

This diff is large: its 13 lines aren’t shown here.

net/mac80211/tx.c+2−0

This diff is large: its 10 lines aren’t shown here.

net/mac80211/util.c+2−1

This diff is large: its 10 lines aren’t shown here.

net/ncsi/ncsi-aen.c+5−5

This diff is large: its 24 lines aren’t shown here.

net/ncsi/ncsi-manage.c+22−27

This diff is large: its 137 lines aren’t shown here.

net/netfilter/Kconfig+7−18

This diff is large: its 39 lines aren’t shown here.

net/netfilter/Makefile+4−3

This diff is large: its 22 lines aren’t shown here.

net/netfilter/nf_conncount.c+47−5

This diff is large: its 85 lines aren’t shown here.

net/netfilter/nf_conntrack_core.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/netfilter/nf_conntrack_helper.c+5−0

This diff is large: its 12 lines aren’t shown here.

net/netfilter/nf_conntrack_proto_dccp.c+4−4

This diff is large: its 34 lines aren’t shown here.

net/netfilter/nf_log.c+10−3

This diff is large: its 32 lines aren’t shown here.

net/netfilter/nf_tables_api.c+165−139

This diff is large: its 528 lines aren’t shown here.

net/netfilter/nf_tables_set_core.c+28−0

This diff is large: its 29 lines aren’t shown here.

net/netfilter/nfnetlink_queue.c+3−0

This diff is large: its 10 lines aren’t shown here.

net/netfilter/nft_compat.c+13−0

This diff is large: its 31 lines aren’t shown here.

net/netfilter/nft_immediate.c+3−0

This diff is large: its 20 lines aren’t shown here.

net/netfilter/nft_lookup.c+11−2

This diff is large: its 30 lines aren’t shown here.

net/netfilter/nft_set_bitmap.c+1−18

This diff is large: its 30 lines aren’t shown here.

net/netfilter/nft_set_hash.c+4−26

This diff is large: its 62 lines aren’t shown here.

net/netfilter/nft_set_rbtree.c+6−20

This diff is large: its 61 lines aren’t shown here.

net/netfilter/xt_TPROXY.c+4−4

This diff is large: its 36 lines aren’t shown here.

net/netlink/af_netlink.c+8−1

This diff is large: its 37 lines aren’t shown here.

net/netrom/af_netrom.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/nfc/llcp_commands.c+6−3

This diff is large: its 18 lines aren’t shown here.

net/nfc/llcp_sock.c+6−3

This diff is large: its 36 lines aren’t shown here.

net/nfc/rawsock.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/nsh/nsh.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/openvswitch/meter.c+5−5

This diff is large: its 31 lines aren’t shown here.

net/packet/af_packet.c+20−17

This diff is large: its 98 lines aren’t shown here.

net/phonet/socket.c+6−3

This diff is large: its 35 lines aren’t shown here.

net/qrtr/qrtr.c+12−3

This diff is large: its 36 lines aren’t shown here.

net/rds/connection.c+10−1

This diff is large: its 29 lines aren’t shown here.

net/rds/ib_frmr.c+5−0

This diff is large: its 12 lines aren’t shown here.

net/rds/ib_mr.h+2−1

This diff is large: its 10 lines aren’t shown here.

net/rds/ib_rdma.c+13−8

This diff is large: its 50 lines aren’t shown here.

net/rds/loop.c+56−0

This diff is large: its 89 lines aren’t shown here.

net/rds/loop.h+2−0

This diff is large: its 9 lines aren’t shown here.

net/rds/rdma.c+8−5

This diff is large: its 48 lines aren’t shown here.

net/rds/rds.h+4−1

This diff is large: its 19 lines aren’t shown here.

net/rds/send.c+7−5

This diff is large: its 26 lines aren’t shown here.

net/rose/af_rose.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/rxrpc/af_rxrpc.c+7−3

This diff is large: its 27 lines aren’t shown here.

net/rxrpc/ar-internal.h+4−4

This diff is large: its 22 lines aren’t shown here.

net/rxrpc/call_accept.c+2−2

This diff is large: its 12 lines aren’t shown here.

net/rxrpc/conn_event.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/rxrpc/net_ns.c+3−3

This diff is large: its 16 lines aren’t shown here.

net/rxrpc/output.c+6−6

This diff is large: its 53 lines aren’t shown here.

net/rxrpc/peer_event.c+88−68

This diff is large: its 186 lines aren’t shown here.

net/rxrpc/peer_object.c+4−4

This diff is large: its 29 lines aren’t shown here.

net/rxrpc/rxkad.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/sched/act_csum.c+3−3

This diff is large: its 31 lines aren’t shown here.

net/sched/act_ife.c+5−7

This diff is large: its 48 lines aren’t shown here.

net/sched/act_tunnel_key.c+3−3

This diff is large: its 33 lines aren’t shown here.

net/sched/cls_api.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/sched/cls_flower.c+17−4

This diff is large: its 45 lines aren’t shown here.

net/sched/sch_blackhole.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/sched/sch_fq_codel.c+18−7

This diff is large: its 50 lines aren’t shown here.

net/sched/sch_hfsc.c+2−2

This diff is large: its 11 lines aren’t shown here.

net/sctp/chunk.c+3−1

This diff is large: its 11 lines aren’t shown here.

net/sctp/ipv6.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/sctp/protocol.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/sctp/socket.c+3−1

This diff is large: its 16 lines aren’t shown here.

net/sctp/transport.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/smc/af_smc.c+105−46

This diff is large: its 315 lines aren’t shown here.

net/smc/smc.h+8−0

This diff is large: its 20 lines aren’t shown here.

net/smc/smc_cdc.c+2−1

This diff is large: its 10 lines aren’t shown here.

net/smc/smc_clc.c+2−1

This diff is large: its 24 lines aren’t shown here.

net/smc/smc_close.c+2−0

This diff is large: its 9 lines aren’t shown here.

net/smc/smc_tx.c+10−2

This diff is large: its 30 lines aren’t shown here.

net/socket.c+11−44

This diff is large: its 102 lines aren’t shown here.

net/strparser/strparser.c+2−20

This diff is large: its 59 lines aren’t shown here.

net/sunrpc/xprt.c+7−3

This diff is large: its 31 lines aren’t shown here.

net/tipc/discover.c+11−7

This diff is large: its 48 lines aren’t shown here.

net/tipc/net.c+9−6

This diff is large: its 22 lines aren’t shown here.

net/tipc/node.c+5−2

This diff is large: its 25 lines aren’t shown here.

net/tipc/socket.c+9−5

This diff is large: its 56 lines aren’t shown here.

net/tls/tls_main.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/tls/tls_sw.c+19−10

This diff is large: its 79 lines aren’t shown here.

net/unix/af_unix.c+19−11

This diff is large: its 83 lines aren’t shown here.

net/vmw_vsock/af_vsock.c+21−13

This diff is large: its 104 lines aren’t shown here.

net/vmw_vsock/virtio_transport.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/vmw_vsock/vmci_transport.c+1−2

This diff is large: its 10 lines aren’t shown here.

net/wireless/nl80211.c+30−30

This diff is large: its 137 lines aren’t shown here.

net/wireless/reg.c+3−25

This diff is large: its 49 lines aren’t shown here.

net/wireless/trace.h+10−8

This diff is large: its 34 lines aren’t shown here.

net/x25/af_x25.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/xdp/xsk.c+20−24

This diff is large: its 127 lines aren’t shown here.

net/xdp/xsk_queue.h+3−8

This diff is large: its 34 lines aren’t shown here.

net/xfrm/xfrm_policy.c+3−0

This diff is large: its 10 lines aren’t shown here.

net/xfrm/xfrm_user.c+11−7

This diff is large: its 32 lines aren’t shown here.

samples/bpf/.gitignore+49−0

This diff is large: its 50 lines aren’t shown here.

samples/bpf/parse_varlen.c+1−5

This diff is large: its 20 lines aren’t shown here.

samples/bpf/test_overhead_user.c+15−4

This diff is large: its 40 lines aren’t shown here.

samples/bpf/trace_event_user.c+24−3

This diff is large: its 58 lines aren’t shown here.

samples/bpf/xdp2skb_meta.sh+3−3

This diff is large: its 20 lines aren’t shown here.

samples/bpf/xdp_fwd_kern.c+4−4

This diff is large: its 38 lines aren’t shown here.

samples/bpf/xdp_redirect_cpu_kern.c+1−1

This diff is large: its 9 lines aren’t shown here.

samples/bpf/xdp_redirect_cpu_user.c+2−2

This diff is large: its 18 lines aren’t shown here.

samples/bpf/xdpsock_user.c+1−1

This diff is large: its 9 lines aren’t shown here.

samples/vfio-mdev/mbochs.c+11−12

This diff is large: its 72 lines aren’t shown here.

scripts/Kbuild.include+1−1

This diff is large: its 9 lines aren’t shown here.

scripts/Makefile.build+1−4

This diff is large: its 24 lines aren’t shown here.

scripts/Makefile.clean+0−3

This diff is large: its 8 lines aren’t shown here.

scripts/Makefile.modbuiltin+0−4

This diff is large: its 9 lines aren’t shown here.

scripts/Makefile.modinst+0−4

This diff is large: its 9 lines aren’t shown here.

scripts/Makefile.modpost+0−4

This diff is large: its 9 lines aren’t shown here.

scripts/Makefile.modsign+0−3

This diff is large: its 8 lines aren’t shown here.

scripts/Makefile.ubsan+0−4

This diff is large: its 11 lines aren’t shown here.

scripts/cc-can-link.sh+1−1

This diff is large: its 9 lines aren’t shown here.

scripts/checkpatch.pl+3−9

This diff is large: its 31 lines aren’t shown here.

scripts/extract-vmlinux+2−0

This diff is large: its 9 lines aren’t shown here.

scripts/gcc-x86_64-has-stack-protector.sh+1−1

This diff is large: its 6 lines aren’t shown here.

scripts/kconfig/expr.h+3−0

This diff is large: its 10 lines aren’t shown here.

scripts/kconfig/preprocess.c+1−1

This diff is large: its 9 lines aren’t shown here.

scripts/kconfig/zconf.y+6−2

This diff is large: its 29 lines aren’t shown here.

scripts/tags.sh+2−1

This diff is large: its 17 lines aren’t shown here.

security/keys/dh.c+4−2

This diff is large: its 20 lines aren’t shown here.

security/selinux/selinuxfs.c+33−45

This diff is large: its 142 lines aren’t shown here.

security/smack/smack_lsm.c+1−0

This diff is large: its 8 lines aren’t shown here.

sound/core/rawmidi.c+14−6

This diff is large: its 57 lines aren’t shown here.

sound/core/seq/seq_clientmgr.c+2−1

This diff is large: its 10 lines aren’t shown here.

sound/core/timer.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/pci/hda/hda_codec.c+3−2

This diff is large: its 12 lines aren’t shown here.

sound/pci/hda/hda_codec.h+1−0

This diff is large: its 8 lines aren’t shown here.

sound/pci/hda/patch_ca0132.c+25−42

This diff is large: its 174 lines aren’t shown here.

sound/pci/hda/patch_conexant.c+1−0

This diff is large: its 8 lines aren’t shown here.

sound/pci/hda/patch_hdmi.c+19−5

This diff is large: its 77 lines aren’t shown here.

sound/pci/hda/patch_realtek.c+23−3

This diff is large: its 83 lines aren’t shown here.

sound/pci/lx6464es/lx6464es.c+1−0

This diff is large: its 8 lines aren’t shown here.

tools/arch/arm/include/uapi/asm/kvm.h+1−0

This diff is large: its 8 lines aren’t shown here.

tools/arch/arm64/include/uapi/asm/kvm.h+1−0

This diff is large: its 8 lines aren’t shown here.

tools/arch/powerpc/include/uapi/asm/kvm.h+1−0

This diff is large: its 8 lines aren’t shown here.

tools/arch/powerpc/include/uapi/asm/unistd.h+2−0

This diff is large: its 8 lines aren’t shown here.

tools/arch/x86/include/asm/cpufeatures.h+2−0

This diff is large: its 10 lines aren’t shown here.

tools/arch/x86/include/asm/mcsafe_test.h+13−0

This diff is large: its 14 lines aren’t shown here.

tools/arch/x86/lib/memcpy_64.S+54−58

This diff is large: its 172 lines aren’t shown here.

tools/bpf/bpftool/common.c+8−3

This diff is large: its 25 lines aren’t shown here.

tools/bpf/bpftool/map.c+9−5

This diff is large: its 60 lines aren’t shown here.

tools/bpf/bpftool/perf.c+3−2

This diff is large: its 13 lines aren’t shown here.

tools/bpf/bpftool/prog.c+11−5

This diff is large: its 35 lines aren’t shown here.

tools/build/Build.include+3−3

This diff is large: its 17 lines aren’t shown here.

tools/build/Makefile+1−1

This diff is large: its 9 lines aren’t shown here.

tools/include/uapi/drm/drm.h+7−0

This diff is large: its 14 lines aren’t shown here.

tools/include/uapi/linux/bpf.h+24−6

This diff is large: its 62 lines aren’t shown here.

tools/include/uapi/linux/btf.h+1−1

This diff is large: its 9 lines aren’t shown here.

tools/include/uapi/linux/if_link.h+2−0

This diff is large: its 16 lines aren’t shown here.

tools/include/uapi/linux/kvm.h+1−0

This diff is large: its 8 lines aren’t shown here.

tools/include/uapi/linux/perf_event.h+2−0

This diff is large: its 9 lines aren’t shown here.

tools/lib/bpf/btf.c+19−22

This diff is large: its 128 lines aren’t shown here.

tools/lib/bpf/btf.h+7−5

This diff is large: its 30 lines aren’t shown here.

tools/lib/bpf/libbpf.c+46−41

This diff is large: its 153 lines aren’t shown here.

tools/lib/bpf/libbpf.h+2−2

This diff is large: its 11 lines aren’t shown here.

tools/objtool/check.c+1−0

This diff is large: its 8 lines aren’t shown here.

tools/objtool/elf.c+32−15

This diff is large: its 63 lines aren’t shown here.

tools/perf/Documentation/perf-stat.txt+3−0

This diff is large: its 10 lines aren’t shown here.

tools/perf/Makefile.config+1−2

This diff is large: its 10 lines aren’t shown here.

tools/perf/arch/powerpc/util/skip-callchain-idx.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/perf/arch/x86/entry/syscalls/syscall_64.tbl+2−0

This diff is large: its 9 lines aren’t shown here.

tools/perf/arch/x86/util/perf_regs.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/perf/arch/x86/util/pmu.c+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/arch/x86/util/tsc.c+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/bench/Build+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/bench/mem-memcpy-x86-64-asm.S+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/bench/mem-memcpy-x86-64-lib.c+24−0

This diff is large: its 25 lines aren’t shown here.

tools/perf/bench/numa.c+3−2

This diff is large: its 19 lines aren’t shown here.

tools/perf/builtin-annotate.c+10−1

This diff is large: its 25 lines aren’t shown here.

tools/perf/builtin-c2c.c+5−5

This diff is large: its 22 lines aren’t shown here.

tools/perf/builtin-report.c+2−1

This diff is large: its 10 lines aren’t shown here.

tools/perf/builtin-script.c+39−3

This diff is large: its 84 lines aren’t shown here.

tools/perf/builtin-stat.c+28−20

This diff is large: its 175 lines aren’t shown here.

tools/perf/jvmti/jvmti_agent.c+2−1

This diff is large: its 17 lines aren’t shown here.

tools/perf/perf.h+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/pmu-events/Build+1−1

This diff is large: its 9 lines aren’t shown here.

tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py+17−23

This diff is large: its 63 lines aren’t shown here.

tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py+3−1

This diff is large: its 18 lines aren’t shown here.

tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py+1−1

This diff is large: its 9 lines aren’t shown here.

tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py+6−5

This diff is large: its 32 lines aren’t shown here.

tools/perf/scripts/python/sched-migration.py+9−5

This diff is large: its 40 lines aren’t shown here.

tools/perf/tests/builtin-test.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/perf/tests/parse-events.c+20−5

This diff is large: its 78 lines aren’t shown here.

tools/perf/tests/shell/record+probe_libc_inet_pton.sh+21−16

This diff is large: its 64 lines aren’t shown here.

tools/perf/tests/shell/trace+probe_vfs_getname.sh+1−1

This diff is large: its 9 lines aren’t shown here.

tools/perf/tests/topology.c+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/ui/gtk/hists.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/perf/util/c++/clang.cpp+9−2

This diff is large: its 18 lines aren’t shown here.

tools/perf/util/header.c+10−2

This diff is large: its 40 lines aren’t shown here.

tools/perf/util/header.h+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/util/hist.c+8−4

This diff is large: its 36 lines aren’t shown here.

tools/perf/util/hist.h+2−2

This diff is large: its 18 lines aren’t shown here.

tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/perf/util/llvm-utils.c+3−3

This diff is large: its 20 lines aren’t shown here.

tools/perf/util/namespaces.h+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/util/parse-events.y+5−0

This diff is large: its 17 lines aren’t shown here.

tools/perf/util/pmu.c+97−2

This diff is large: its 138 lines aren’t shown here.

tools/perf/util/scripting-engines/trace-event-python.c+17−20

This diff is large: its 98 lines aren’t shown here.

tools/perf/util/sort.h+3−1

This diff is large: its 18 lines aren’t shown here.

tools/power/x86/turbostat/turbostat.8+3−3

This diff is large: its 27 lines aren’t shown here.

tools/power/x86/turbostat/turbostat.c+215−129

This diff is large: its 563 lines aren’t shown here.

tools/testing/nvdimm/test/nfit.c+1−2

This diff is large: its 10 lines aren’t shown here.

tools/testing/selftests/bpf/Makefile+1−1

This diff is large: its 9 lines aren’t shown here.

tools/testing/selftests/bpf/bpf_helpers.h+9−0

This diff is large: its 16 lines aren’t shown here.

tools/testing/selftests/bpf/config+11−0

This diff is large: its 16 lines aren’t shown here.

tools/testing/selftests/bpf/test_btf.c+112−2

This diff is large: its 142 lines aren’t shown here.

tools/testing/selftests/bpf/test_btf_haskv.c+2−5

This diff is large: its 21 lines aren’t shown here.

tools/testing/selftests/bpf/test_kmod.sh+9−0

This diff is large: its 16 lines aren’t shown here.

tools/testing/selftests/bpf/test_lirc_mode2.sh+9−0

This diff is large: its 16 lines aren’t shown here.

tools/testing/selftests/bpf/test_lwt_seg6local.sh+12−3

This diff is large: its 34 lines aren’t shown here.

tools/testing/selftests/bpf/test_offload.py+10−2

This diff is large: its 33 lines aren’t shown here.

tools/testing/selftests/bpf/test_sockmap.c+1−7

This diff is large: its 28 lines aren’t shown here.

tools/testing/selftests/bpf/test_tunnel.sh+14−12

This diff is large: its 58 lines aren’t shown here.

tools/testing/selftests/bpf/test_verifier.c+62−1

This diff is large: its 85 lines aren’t shown here.

tools/testing/selftests/ftrace/test.d/00basic/snapshot.tc+28−0

This diff is large: its 29 lines aren’t shown here.

tools/testing/selftests/net/.gitignore+1−0

This diff is large: its 5 lines aren’t shown here.

tools/testing/selftests/net/config+2−0

This diff is large: its 6 lines aren’t shown here.

tools/testing/selftests/net/fib_tests.sh+0−41

This diff is large: its 69 lines aren’t shown here.

tools/testing/selftests/net/tcp_mmap.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/testing/selftests/net/udpgso_bench.sh+0−3

This diff is large: its 10 lines aren’t shown here.

tools/testing/selftests/pstore/pstore_post_reboot_tests+4−1

This diff is large: its 18 lines aren’t shown here.

tools/testing/selftests/rseq/param_test.c+24−0

This diff is large: its 31 lines aren’t shown here.

tools/testing/selftests/rseq/rseq-arm.h+1−0

This diff is large: its 8 lines aren’t shown here.

tools/testing/selftests/rseq/rseq-mips.h+725−0

This diff is large: its 726 lines aren’t shown here.

tools/testing/selftests/rseq/rseq.h+19−7

This diff is large: its 44 lines aren’t shown here.

tools/testing/selftests/rseq/run_param_test.sh+0−0

File mode changed from 100644 to 100755.

tools/testing/selftests/sparc64/Makefile+12−8

This diff is large: its 46 lines aren’t shown here.

tools/testing/selftests/sparc64/drivers/Makefile+1−1

This diff is large: its 6 lines aren’t shown here.

tools/testing/selftests/static_keys/test_static_keys.sh+13−0

This diff is large: its 20 lines aren’t shown here.

tools/testing/selftests/sync/config+4−0

This diff is large: its 5 lines aren’t shown here.

tools/testing/selftests/sysctl/sysctl.sh+13−7

This diff is large: its 64 lines aren’t shown here.

tools/testing/selftests/user/test_user_copy.sh+7−0

This diff is large: its 14 lines aren’t shown here.

tools/testing/selftests/vm/compaction_test.c+3−1

This diff is large: its 18 lines aren’t shown here.

tools/testing/selftests/vm/mlock2-tests.c+7−5

This diff is large: its 54 lines aren’t shown here.

tools/testing/selftests/vm/run_vmtests+4−1

This diff is large: its 19 lines aren’t shown here.

tools/testing/selftests/vm/userfaultfd.c+3−1

This diff is large: its 18 lines aren’t shown here.

tools/testing/selftests/x86/sigreturn.c+36−23

This diff is large: its 84 lines aren’t shown here.

tools/testing/selftests/zram/zram.sh+4−1

This diff is large: its 17 lines aren’t shown here.

tools/testing/selftests/zram/zram_lib.sh+4−1

This diff is large: its 19 lines aren’t shown here.

tools/usb/ffs-test.c+16−3

This diff is large: its 29 lines aren’t shown here.

tools/virtio/asm/barrier.h+2−2

This diff is large: its 11 lines aren’t shown here.

tools/virtio/linux/kernel.h+5−0

This diff is large: its 12 lines aren’t shown here.

tools/virtio/linux/scatterlist.h+0−18

This diff is large: its 58 lines aren’t shown here.

virt/kvm/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

virt/kvm/arm/mmu.c+2−0

This diff is large: its 9 lines aren’t shown here.

virt/kvm/arm/vgic/vgic-v3.c+0−5

This diff is large: its 12 lines aren’t shown here.

virt/kvm/eventfd.c+11−6

This diff is large: its 47 lines aren’t shown here.

virt/kvm/kvm_main.c+9−10

This diff is large: its 59 lines aren’t shown here.